/* REUN Cockpit Shell CSS — extracted from cockpit v0.3 (2026-05-06)
   tokens 已在 reun-tokens-v01.css,本檔只含 component / layout CSS
   var(--xxx) 全替換成 var(--reun-xxx) 對齊 token */

.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
  @media (max-width: 768px) { .layout { grid-template-columns: 1fr; } }

  /* Sidebar — Apple/Claude cream · 淺色奶油風 */
  .sidebar {
    background: var(--reun-surface); border-right: 1px solid var(--reun-border);
    padding: 20px 12px; position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; overflow-y: auto;
  }
  @media (max-width: 768px) {
    .sidebar { position: sticky; top: 0; z-index: 10; height: auto;
      flex-direction: row; align-items: center; padding: 10px 16px;
      overflow-x: auto; gap: 4px; border-right: none; border-bottom: 1px solid var(--reun-border); }
    .sidebar .logo { margin: 0 12px 0 0; padding: 4px 0; flex-shrink: 0; }
    .sidebar .nav-section { display: none; }
    .sidebar .nav { flex-direction: row; gap: 4px; }
    .sidebar .nav-item { white-space: nowrap; padding: 6px 12px; font-size: 13px; }
    .sidebar .nav-item svg, .sidebar .nav-item .tag { display: none; }
    .sidebar .footer-info { display: none; }
  }
  .logo { padding: 4px 12px 18px; font-size: 15px; font-weight: 600; letter-spacing: 0.08em; }
  .logo .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--reun-tint); margin-right: 8px; vertical-align: 2px; }
  .nav-section { font-size: 10px; font-weight: 600; color: var(--reun-muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 14px 12px 6px; }
  .nav { display: flex; flex-direction: column; gap: 2px; }
  .nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px;
    color: var(--reun-text-2); font-size: 13px; font-weight: 500; cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease; user-select: none; }
  .nav-item:hover { background: var(--reun-surface-2); color: var(--reun-text); }
  .nav-item.active { background: var(--reun-tint-soft); color: var(--reun-tint); font-weight: 600; }
  .nav-item .tag { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; letter-spacing: 0.04em; margin-left: auto; }
  .tag-dms { background: var(--tag-dms-bg); color: var(--tag-dms-fg); }
  .tag-crm { background: var(--tag-crm-bg); color: var(--tag-crm-fg); }
  .tag-mi  { background: var(--tag-mi-bg);  color: var(--tag-mi-fg); }
  .tag-erp { background: var(--tag-erp-bg); color: var(--tag-erp-fg); }
  .tag-kb  { background: var(--tag-kb-bg);  color: var(--tag-kb-fg); }
  .tag-ins { background: var(--tag-ins-bg); color: var(--tag-ins-fg); }
  .nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.85; }
  .nav-item .badge-mini { margin-left: auto; font-size: 10px; font-weight: 700; background: var(--reun-err); color: white; padding: 1px 6px; border-radius: 999px; letter-spacing: 0; }
  .footer-info { margin-top: auto; padding: 14px 12px; font-size: 10px; color: var(--reun-muted); line-height: 1.7; border-top: 1px solid var(--reun-border); }

  /* Main */
  .main { padding: 28px 44px 64px; max-width: 1240px; width: 100%; }
  @media (max-width: 768px) { .main { padding: 20px 18px 48px; } }

  .topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
  .topbar .meta { font-size: 12px; color: var(--reun-muted); font-variant-numeric: tabular-nums; }
  .topbar .meta .pulse-dot { display: inline-block; width: 6px; height: 6px; background: var(--reun-ok); border-radius: 50%; margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 3px var(--reun-ok-soft); }
  .role-switch {
    background: var(--reun-surface-2); border-radius: 7px; padding: 5px 10px;
    font-size: 12px; color: var(--reun-text-2); border: 0.5px solid var(--reun-border);
    appearance: none; cursor: pointer;
  }
  .search-trigger {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 8px 5px 12px; background: var(--reun-surface);
    border: 0.5px solid var(--reun-border); border-radius: 7px;
    color: var(--reun-muted); font-size: 12px; cursor: pointer;
    transition: all 0.15s ease; min-width: 240px;
    font-family: inherit;
  }
  .search-trigger:hover { background: var(--reun-surface-2); border-color: var(--reun-border-strong); color: var(--reun-text-2); }
  .search-trigger svg { color: var(--reun-muted); flex-shrink: 0; }
  .search-trigger .placeholder { flex: 1; text-align: left; }
  .kbd {
    font-size: 10px; font-family: "SF Mono", ui-monospace, monospace;
    padding: 1px 5px; background: var(--reun-surface-2);
    border: 0.5px solid var(--reun-border); border-radius: 3px;
    color: var(--reun-muted); letter-spacing: 0.04em;
  }
  @media (max-width: 768px) {
    .search-trigger { min-width: 0; }
    .search-trigger .placeholder, .search-trigger .kbd { display: none; }
  }

  .page-head { margin-bottom: 24px; }
  .page-title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .page-title { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
  .section-tag {
    font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
    letter-spacing: 0.06em; vertical-align: middle;
  }
  .page-subtitle { font-size: 14px; color: var(--reun-text-2); margin: 6px 0 0 0; line-height: 1.55; }
  .page-subtitle .accent { color: var(--reun-text); font-weight: 500; }

  /* SoT footer */
  .sot-footer {
    background: var(--reun-surface-2); border-radius: 8px;
    padding: 10px 14px; margin-bottom: 20px;
    font-size: 11px; color: var(--reun-text-2); line-height: 1.6;
    display: flex; gap: 18px; flex-wrap: wrap;
  }
  .sot-footer .lbl { color: var(--reun-muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 10px; }
  .sot-footer code { font-size: 11px; }

  /* Segmented control */
  .seg-control { display: inline-flex; background: var(--reun-surface-2); padding: 3px;
    border-radius: 9px; margin-bottom: 24px; flex-wrap: wrap; gap: 0; }
  @media (max-width: 600px) { .seg-control { display: flex; width: 100%; overflow-x: auto; }
    .seg-btn { flex-shrink: 0; } }
  .seg-btn { padding: 6px 14px; font-size: 12px; font-weight: 500;
    color: var(--reun-text-2); border-radius: 6px; transition: all 0.18s ease; letter-spacing: 0.02em; white-space: nowrap; }
  .seg-btn:hover { color: var(--reun-text); }
  .seg-btn.active { background: var(--reun-surface); color: var(--reun-text); font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 0.5px rgba(0,0,0,.04); }

  .section-label { font-size: 11px; font-weight: 600; color: var(--reun-muted);
    text-transform: uppercase; letter-spacing: 0.08em; margin: 24px 0 12px 0; }
  .section-label:first-child { margin-top: 0; }
  .section-label .lbl-meta { font-weight: 500; color: var(--reun-text-2); text-transform: none; letter-spacing: 0.02em; margin-left: 8px; }

  /* KPI Grid */
  .kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .kpi-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
  .kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  @media (max-width: 1100px) { .kpi-grid, .kpi-grid.cols-6 { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 768px) { .kpi-grid, .kpi-grid.cols-6, .kpi-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 480px) { .kpi-grid, .kpi-grid.cols-6, .kpi-grid.cols-3, .kpi-grid.cols-2 { grid-template-columns: 1fr; } }

  .kpi { background: var(--reun-surface); border-radius: 12px; padding: 20px; box-shadow: var(--shadow-sm);
    cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease; }
  .kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
  .kpi.compact { padding: 16px 18px; }
  .kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .kpi-label { font-size: 11px; font-weight: 600; color: var(--reun-muted);
    letter-spacing: 0.04em; text-transform: uppercase; }
  .status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .status-dot.ok   { background: var(--reun-ok);   box-shadow: 0 0 0 3px var(--reun-ok-soft); }
  .status-dot.warn { background: var(--reun-warn); box-shadow: 0 0 0 3px var(--reun-warn-soft); }
  .status-dot.err  { background: var(--reun-err);  box-shadow: 0 0 0 3px var(--reun-err-soft); }
  .status-dot.neut { background: var(--reun-muted); }
  .status-dot.tint { background: var(--reun-tint); box-shadow: 0 0 0 3px var(--reun-tint-soft); }

  .kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
    font-variant-numeric: tabular-nums; margin-bottom: 8px; }
  .kpi.compact .kpi-value { font-size: 24px; }
  .kpi-value .unit { font-size: 12px; font-weight: 500; color: var(--reun-muted);
    margin-left: 4px; letter-spacing: 0.02em; }
  .kpi-meta { font-size: 11.5px; color: var(--reun-text-2); display: flex; align-items: center; gap: 6px;
    font-variant-numeric: tabular-nums; line-height: 1.4; }
  .delta.up   { color: var(--reun-ok); font-weight: 600; }
  .delta.down { color: var(--reun-err); font-weight: 600; }
  .delta.flat { color: var(--reun-muted); font-weight: 600; }

  /* Panel */
  .panel { background: var(--reun-surface); border-radius: 12px; padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
  .panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
  .panel-title { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
  .panel-meta { font-size: 11.5px; color: var(--reun-muted); }

  /* Table */
  .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--reun-border); }
  .data-table th { font-size: 10px; font-weight: 600; color: var(--reun-muted); text-transform: uppercase; letter-spacing: 0.06em; }
  .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .data-table tr:last-child td { border-bottom: none; }
  .data-table tr:hover td { background: var(--reun-surface-2); }
  .data-table .pill { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px;
    background: var(--reun-surface-2); color: var(--reun-text-2); letter-spacing: 0.04em; }
  .data-table .pill.ok { background: var(--reun-ok-soft); color: var(--reun-ok); }
  .data-table .pill.warn { background: var(--reun-warn-soft); color: var(--reun-warn); }
  .data-table .pill.err { background: var(--reun-err-soft); color: var(--reun-err); }
  .data-table .pill.tint { background: var(--reun-tint-soft); color: var(--reun-tint); }

  /* Action rows */
  .actions { background: var(--reun-surface); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
  .action-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--reun-border); cursor: pointer; transition: background 0.12s ease; }
  .action-row:last-child { border-bottom: none; }
  .action-row:hover { background: var(--reun-surface-2); }
  .action-icon { width: 26px; height: 26px; border-radius: 7px; background: var(--reun-surface-2);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .action-icon svg { width: 13px; height: 13px; opacity: 0.7; }
  .action-icon.warn { background: var(--reun-warn-soft); } .action-icon.warn svg { color: var(--reun-warn); opacity: 1; }
  .action-icon.tint { background: var(--reun-tint-soft); } .action-icon.tint svg { color: var(--reun-tint); opacity: 1; }
  .action-icon.ok   { background: var(--reun-ok-soft); }   .action-icon.ok svg { color: var(--reun-ok); opacity: 1; }
  .action-icon.err  { background: var(--reun-err-soft); }  .action-icon.err svg { color: var(--reun-err); opacity: 1; }
  .action-icon.purple { background: var(--reun-purple-soft); } .action-icon.purple svg { color: var(--reun-purple); opacity: 1; }
  .action-text { flex: 1; font-size: 13.5px; color: var(--reun-text); line-height: 1.4; min-width: 0; }
  .action-text .kicker { font-size: 10px; color: var(--reun-muted); text-transform: uppercase;
    letter-spacing: 0.06em; font-weight: 600; display: block; margin-bottom: 2px; }
  .action-time { font-size: 11.5px; color: var(--reun-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
  .action-row .chev { color: var(--reun-muted); opacity: 0; transition: opacity 0.15s ease; }
  .action-row:hover .chev { opacity: 1; }

  /* Bar list */
  .bar-list { display: flex; flex-direction: column; gap: 9px; }
  .bar-row { display: grid; grid-template-columns: 160px 1fr 90px; gap: 10px; align-items: center; }
  .bar-row .nm { font-size: 12.5px; font-weight: 500; color: var(--reun-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bar-row .bar-track { background: var(--reun-surface-2); border-radius: 999px; height: 6px; overflow: hidden; }
  .bar-row .bar-fill { background: var(--reun-tint); height: 100%; border-radius: 999px; transition: width 0.6s ease; }
  .bar-row .bar-fill.ok { background: var(--reun-ok); }
  .bar-row .bar-fill.warn { background: var(--reun-warn); }
  .bar-row .bar-fill.err { background: var(--reun-err); }
  .bar-row .num { font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
  @media (max-width: 600px) { .bar-row { grid-template-columns: 130px 1fr 80px; } }

  /* Service three-layer flow */
  .service-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; }
  @media (max-width: 768px) { .service-flow { grid-template-columns: 1fr; }
    .service-flow .flow-arrow { transform: rotate(90deg); justify-self: center; padding: 4px 0; } }
  .flow-card { background: var(--reun-surface); border-radius: 12px; padding: 20px; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease; }
  .flow-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
  .flow-arrow { color: var(--reun-muted); display: flex; align-items: center; justify-content: center; }
  .layer-num { font-size: 10px; font-weight: 700; color: var(--reun-muted); letter-spacing: 0.1em; }
  .layer-name { font-size: 15px; font-weight: 600; margin: 4px 0 6px 0; letter-spacing: -0.01em; }
  .layer-role { font-size: 11.5px; color: var(--reun-text-2); margin-bottom: 12px; line-height: 1.5; }
  .layer-stat { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
  .layer-stat .lbl { font-size: 10px; font-weight: 500; color: var(--reun-muted); margin-left: 6px; letter-spacing: 0.04em; text-transform: uppercase; }

  /* Mini grid */
  .mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  @media (max-width: 768px) { .mini-grid { grid-template-columns: repeat(2, 1fr); } }
  .mini-cell { background: var(--reun-surface-2); border-radius: 8px; padding: 12px; cursor: pointer; transition: background 0.15s ease; }
  .mini-cell:hover { background: var(--reun-border); }
  .mini-cell .nm { font-size: 12.5px; font-weight: 600; color: var(--reun-text); }
  .mini-cell .st { font-size: 10px; color: var(--reun-muted); margin-top: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
  .mini-cell.draft .nm { color: var(--reun-text-2); }
  .mini-cell.live { background: var(--reun-ok-soft); }
  .mini-cell.live .nm { color: var(--reun-ok); }

  /* Domain grid (KB brands, Drive domains, etc) */
  .domain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
  .domain-cell { background: var(--reun-surface-2); border-radius: 8px; padding: 11px 13px; display: flex; align-items: center; gap: 8px; }
  .domain-cell.system { border: 1px dashed var(--reun-border-strong); }
  .domain-cell .nm { font-size: 12px; font-weight: 500; flex: 1; }
  .domain-cell .status-dot { width: 5px; height: 5px; }
  .domain-cell .ct { font-size: 10px; color: var(--reun-muted); font-variant-numeric: tabular-nums; }

  /* Big number panel */
  .big-num-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  @media (max-width: 768px) { .big-num-row { grid-template-columns: 1fr; } }
  .big-num { font-size: 44px; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
  .big-num.ok { color: var(--reun-ok); }
  .big-num.warn { color: var(--reun-warn); }
  .big-num.err { color: var(--reun-err); }

  /* Pulse chart */
  .pulse-chart { width: 100%; height: 110px; display: block; color: var(--reun-text); }
  .pulse-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 11.5px; color: var(--reun-text-2); }
  .pulse-legend .item { display: flex; align-items: center; gap: 6px; }
  .pulse-legend .swatch { width: 10px; height: 2px; border-radius: 1px; }

  /* Two col */
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

  /* Placeholder card (W1-W8 not yet built) */
  .placeholder {
    background: var(--reun-surface); border-radius: 12px; padding: 24px;
    box-shadow: var(--shadow-sm); border: 1px dashed var(--reun-border-strong);
    text-align: center; color: var(--reun-text-2);
  }
  .placeholder .ph-num { font-size: 11px; font-weight: 700; color: var(--reun-muted); letter-spacing: 0.1em; margin-bottom: 6px; }
  .placeholder .ph-title { font-size: 16px; font-weight: 600; color: var(--reun-text); margin-bottom: 8px; }
  .placeholder .ph-desc { font-size: 12.5px; line-height: 1.6; max-width: 480px; margin: 0 auto; }

  /* View transitions */
  .view { display: none; }
  .view.active { display: block; animation: fadeIn 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
  .sub-view { display: none; }
  .sub-view.active { display: block; animation: fadeIn 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

  .page-footer { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--reun-border);
    font-size: 10.5px; color: var(--reun-muted); display: flex; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; letter-spacing: 0.04em; }
  code { font-family: "SF Mono", ui-monospace, monospace; font-size: 11px; background: var(--reun-surface-2); padding: 1px 5px; border-radius: 4px; }
  .alert-banner {
    background: var(--reun-err-soft); border-radius: 10px; padding: 12px 16px;
    margin-bottom: 14px; display: flex; gap: 12px; align-items: center;
    border: 0.5px solid var(--reun-err); border-color: rgba(255,59,48,.3);
  }
  .alert-banner .icon { color: var(--reun-err); flex-shrink: 0; }
  .alert-banner .txt { font-size: 13px; color: var(--reun-text); line-height: 1.4; }
  .alert-banner .txt strong { color: var(--reun-err); }

  /* ============ Drawer ============ */
  .drawer-overlay {
    position: fixed; inset: 0; background: rgba(31, 29, 26, 0.28);
    opacity: 0; pointer-events: none;
    transition: opacity 0.22s ease; z-index: 100;
    backdrop-filter: blur(2px);
  }
  .drawer-overlay.open { opacity: 1; pointer-events: auto; }
  .drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 480px; max-width: 100vw;
    background: var(--reun-surface);
    box-shadow: -8px 0 32px rgba(0,0,0,.08);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 101; overflow-y: auto;
    display: flex; flex-direction: column;
  }
  .drawer.open { transform: translateX(0); }
  @media (max-width: 600px) { .drawer { width: 100vw; } }
  .drawer-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--reun-border);
    position: sticky; top: 0; background: var(--reun-surface); z-index: 1;
  }
  .drawer-title { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
  .drawer-close {
    width: 28px; height: 28px; border-radius: 6px;
    background: var(--reun-surface-2); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.12s ease; border: none; color: var(--reun-text-2);
  }
  .drawer-close:hover { background: var(--reun-border); color: var(--reun-text); }
  .drawer-body { padding: 22px 24px 32px; flex: 1; }
  .drawer-body h4 { font-size: 11px; font-weight: 600; color: var(--reun-muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 22px 0 10px; }
  .drawer-body h4:first-child { margin-top: 0; }
  .drawer-body p { font-size: 13px; line-height: 1.6; color: var(--reun-text); margin: 0 0 12px; }
  .drawer-body .stat-big { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 6px; }
  .drawer-body .stat-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--reun-border); font-size: 13px; }
  .drawer-body .stat-row:last-child { border-bottom: none; }
  .drawer-body .stat-row .lbl { color: var(--reun-text-2); }
  .drawer-body .stat-row .val { font-weight: 600; font-variant-numeric: tabular-nums; }
  .drawer-body .actions-mini { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
  .drawer-body .btn-mini {
    padding: 7px 12px; background: var(--reun-tint); color: white;
    border-radius: 7px; font-size: 12px; font-weight: 500; cursor: pointer;
    border: none; transition: opacity 0.12s ease;
  }
  .drawer-body .btn-mini:hover { opacity: 0.9; }
  .drawer-body .btn-mini.secondary { background: var(--reun-surface-2); color: var(--reun-text); }

  /* ============ Collapsible table / 漸進揭露 ============ */
  .data-table.collapsed tbody tr:nth-child(n+6) { display: none; }
  .show-more {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; margin-top: 14px;
    background: var(--reun-surface); border: 1px solid var(--reun-border);
    color: var(--reun-text-2); border-radius: 7px;
    font-size: 12px; font-weight: 500; cursor: pointer;
    font-family: inherit; transition: all 0.12s ease;
  }
  .show-more:hover { background: var(--reun-surface-2); border-color: var(--reun-border-strong); color: var(--reun-text); }

  /* ============ Role filtering ============ */
  body[data-role="sales"]      [data-hide-from~="sales"],
  body[data-role="accountant"] [data-hide-from~="accountant"],
  body[data-role="repair"]     [data-hide-from~="repair"],
  body[data-role="marketing"]  [data-hide-from~="marketing"],
  body[data-role="warehouse"]  [data-hide-from~="warehouse"],
  body[data-role="design"]     [data-hide-from~="design"],
  body[data-role="dealer"]     [data-hide-from~="dealer"] { display: none !important; }

  /* Role banner */
  .role-banner {
    background: var(--reun-tint-soft);
    padding: 9px 14px; border-radius: 8px;
    font-size: 12px; color: var(--reun-text);
    margin-bottom: 16px; display: none;
    align-items: center; gap: 10px;
    border: 0.5px solid rgba(0, 122, 255, 0.18);
  }
  body[data-role]:not([data-role="paul"]) .role-banner { display: flex; }
  .role-banner svg { color: var(--reun-tint); flex-shrink: 0; }

  /* ============ Drawer trigger interaction ============ */
  [data-drawer-id] { cursor: pointer; transition: background 0.12s ease; }
  tr[data-drawer-id]:hover td { background: var(--reun-tint-soft); }
  .kpi[data-drawer-id]:hover { background: var(--reun-surface); }

  /* ============ Cron / launchd status grid ============ */
  .cron-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
  .cron-cell { background: var(--reun-surface-2); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
  .cron-cell .head { display: flex; align-items: center; gap: 8px; }
  .cron-cell .nm { font-size: 13px; font-weight: 600; flex: 1; font-family: "SF Mono", ui-monospace, monospace; }
  .cron-cell .meta { font-size: 11px; color: var(--reun-muted); display: flex; gap: 10px; font-variant-numeric: tabular-nums; }
  .cron-cell .desc { font-size: 11px; color: var(--reun-text-2); margin-top: 2px; }
