/* =========================================================
   CureGuard CLOUD HMI V1.3 — CG DARK INDUSTRIAL (#33)
   DEFAULT stylesheet since 1.3.63 (promoted 2026-07-31);
   styles_cloud_v1.2.css stays as the fallback UI's sheet.

   Design rules of this theme:
   - layered near-black surfaces, crisp 1px borders, NO blur shadows
   - corner radius capped at 2px (sharp edges)
   - weight 900 reserved for DATA VALUES; labels are 600
   - color = status only; one accent (purple); data values in mono
   - legacy var names (--cg-purple, --status-*) are REMAPPED here so
     var() references inside JS-injected inline styles inherit the
     dark theme automatically.
   ========================================================= */

:root {
    color-scheme: dark; /* native date pickers, scrollbars, selects go dark */

    /* surfaces: 0 = deepest (sidebar), 1 = canvas, 2 = panel, 3 = raised/hover */
    --s0: #0b0e13;
    --s1: #151a21;
    --s2: #1c232c;
    --s3: #252d38;
    --line: #39424e;
    --line-strong: #4d5866;

    --t1: #e6edf3;  /* primary text */
    --t2: #a3abb5;  /* secondary */
    --t3: #667180;  /* muted/labels */

    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* ---- legacy names, remapped to dark values (JS uses these in var()) ---- */
    --cg-purple: #a371f7;
    --cg-dark: #0b0e13;
    --cg-light: #151a21;          /* was the light canvas; now THE canvas */

    --status-ok: #3fb950;
    --status-alert: #f85149;
    --status-warning: #d29922;
    --status-stale: #768390;

    --bg-ok-soft: rgba(63, 185, 80, 0.12);
    --bg-alert-soft: rgba(248, 81, 73, 0.12);
    --bg-warning-soft: rgba(210, 153, 34, 0.14);

    --radius-sm: 2px;
    --radius-md: 2px;
    --radius-lg: 2px;

    --sidebar-width: 230px;       /* was 22% — fixed rail, workspace gets the screen */

    /* #33.2 conveyor rail: line-flow unit identity (entry unit vs exit unit) */
    --rail-entry: #79b8ff;
    --rail-exit: #a371f7;
}

/* --- 1. RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; display: flex; height: 100vh; background: var(--s1); overflow: hidden; color: var(--t1); }
.hidden-section { display: none !important; }

.text-status-ok { color: var(--status-ok) !important; }
.text-status-warning { color: var(--status-warning) !important; }
.text-status-alert { color: var(--status-alert) !important; }

/* --- 2. LAYOUT: SIDEBAR --- */
#left-panel { width: var(--sidebar-width); flex-shrink: 0; background: var(--s0); color: var(--t1); padding: 14px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 10; }
#cg-logo { width: 82%; height: auto; margin: 0 auto 16px; display: block; background: #ffffff; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }

.sidebar-alerts-btn { width: 100%; padding: 12px 10px; margin-bottom: 6px; background: transparent; color: var(--t2); font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s; border: none; border-left: 3px solid transparent; border-radius: 0; text-align: left; font-size: 0.88rem; letter-spacing: 0.8px; }
.sidebar-alerts-btn:hover { background: var(--s2); color: var(--t1); }
.sidebar-alerts-btn.active-nav { background: var(--s2) !important; color: var(--t1); border-left: 3px solid var(--cg-purple); }
.nav-line-separator { border-top: 1px solid var(--line) !important; margin-top: 10px; padding-top: 14px; }

/* TEST-build marker — REMOVED at promotion */

.side-meta { margin-top: auto; padding: 10px 4px; font-family: var(--mono); font-size: 0.75rem; color: var(--t3); line-height: 1.8; border-top: 1px solid var(--line); }
.logout-btn { margin-bottom: 8px; background: transparent; color: var(--t3); border: 1px solid var(--line-strong); padding: 12px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 0.82rem; letter-spacing: 1px; transition: color 0.15s, border-color 0.15s; text-transform: uppercase; text-align: center; }
.logout-btn:hover { color: var(--t1); border-color: var(--t2); }

/* --- 3. LAYOUT: MAIN WINDOW --- */
#main-window { width: 100%; display: flex; flex-direction: column; overflow-y: auto; background: var(--s1); }
.view-container { display: none; padding: 24px; flex: 1; }
.view-container.active { display: block; }
.section-label { font-size: 0.8rem; font-weight: 600; color: var(--t3); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1.2px; }

/* --- 4. PANELS (the one card recipe: s2 + 1px line, no shadows) --- */
.panel { background: var(--s2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.panel + .panel, .panel-row + .panel, .panel + .panel-row { margin-top: 16px; }
.panel-row { display: flex; gap: 12px; }
.panel-row > .panel { flex: 1; min-width: 0; }

/* --- 5. BUTTONS: one hierarchy — primary(accent) / neutral / danger / ghost --- */
.primary-action-btn { padding: 11px 24px; font-size: 0.88rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; border-radius: var(--radius-sm); cursor: pointer; background: var(--cg-purple); color: #0d1117; border: 1px solid var(--cg-purple); transition: filter 0.15s; }
.primary-action-btn:hover:not(:disabled) { filter: brightness(1.12); }
.action-btn { padding: 10px 16px; font-weight: 600; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--s3); color: var(--t1); font-size: 0.82rem; cursor: pointer; transition: border-color 0.15s; text-transform: uppercase; letter-spacing: 0.5px; }
.action-btn:hover:not(:disabled) { border-color: var(--t2); }
.btn-danger { background: transparent !important; border: 1px solid var(--status-alert) !important; color: var(--status-alert) !important; }
.btn-danger:hover:not(:disabled) { background: var(--bg-alert-soft) !important; }

/* --- 6. FORMS & INPUTS --- */
.form-section { margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.sub-label { display: block; font-size: 0.78rem; color: var(--t3); margin-bottom: 6px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.industrial-input, input[type="datetime-local"], select { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 0.95rem; color: var(--t1); background-color: var(--s1); transition: border-color 0.15s; }
.industrial-input:focus, input[type="datetime-local"]:focus, select:focus { border-color: var(--cg-purple); outline: 0; }
.mode-control-bar { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; padding: 16px; background: var(--s2); border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* --- 7. GRID & STATUS VISUALS (10-Foot Walk-By: status = fill, rest = line work) --- */
.hmi-grid-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sensor-block { background: var(--s2); border: 2px solid var(--line-strong); border-radius: var(--radius-sm); padding: 15px 20px; text-align: center; cursor: pointer; transition: border-color 0.15s; color: var(--t2); display: flex; flex-direction: column; justify-content: center; min-height: 180px; }
.sensor-block:hover { border-color: var(--t2); }
.sensor-block .node-label { font-size: 0.8rem; color: var(--t3); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: auto; }
.sensor-block h3 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: 0; font-weight: 600; letter-spacing: 0.5px; color: var(--t1); }
.deviation-value { font-size: 4.2rem; font-weight: 900; font-family: var(--mono); color: inherit; line-height: 1; letter-spacing: -2px; margin-top: 15px; margin-bottom: auto; }

.sensor-block.status-ok { border: 2px solid var(--line-strong) !important; color: var(--t2); background: var(--s2) !important; }
.sensor-block.status-warning { border: 2px solid var(--status-warning) !important; background: var(--bg-warning-soft) !important; color: var(--status-warning) !important; }
.sensor-block.status-warning h3, .sensor-block.status-warning .node-label { color: var(--status-warning) !important; }
.sensor-block.status-alert { border: 2px solid var(--status-alert) !important; background: var(--bg-alert-soft) !important; color: var(--status-alert) !important; }
.sensor-block.status-alert h3, .sensor-block.status-alert .node-label { color: var(--status-alert) !important; }
.sensor-block.status-stale { background: repeating-linear-gradient( 45deg, var(--s2), var(--s2) 20px, var(--s3) 20px, var(--s3) 40px ) !important; border: 2px solid var(--line-strong) !important; color: var(--status-stale); }
.sensor-block.status-stale h3, .sensor-block.status-stale .node-label { color: var(--status-stale) !important; }

@keyframes criticalPulse {
    0% { border-color: var(--status-alert); background-color: var(--s2); }
    50% { border-color: var(--status-alert); background-color: var(--bg-alert-soft); }
    100% { border-color: var(--status-alert); background-color: var(--s2); }
}
.sensor-block.status-critical-blink { animation: criticalPulse 1.5s infinite; border: 2px solid var(--status-alert) !important; color: var(--status-alert) !important; }
.sensor-block.status-critical-blink h3, .sensor-block.status-critical-blink .node-label { color: var(--status-alert) !important; }

/* --- 8. DATA TABLES, WELLS & GRAPHS --- */
.diagnostic-split { display: flex; flex-direction: row; gap: 16px; margin: 20px 0; align-items: flex-start; width: 100%; }
.split-col { flex: 1 1 50%; min-width: 0; background: var(--s2); padding: 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); min-height: 250px; }
.panel .status-checklist { background: var(--s1); border: 1px solid var(--line); }
.status-checklist { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.status-checklist td, .status-checklist th { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.status-checklist thead th { border-bottom: 2px solid var(--line-strong); }
.status-checklist th { color: var(--t3); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.status-checklist td { color: var(--t1); }
.status-checklist tbody tr:nth-child(even) { background-color: rgba(255,255,255,0.035); }
.status-checklist tbody tr:hover { background-color: var(--s3); }
.readout-cell { font-family: var(--mono); font-weight: bold; color: var(--cg-purple); font-size: 0.92rem; }

/* Charts stay LIGHT WELLS in iteration 1 — Dygraphs axes/legend are drawn for a
   light bg; a bordered white well reads as an instrument face. Iteration 2 may
   move to a dark chart config. */
.dygraph-chart-host { width: 100%; height: 320px; margin-bottom: 20px; border: 1px solid var(--line-strong); background: #eef1f4; border-radius: var(--radius-sm); padding: 10px 10px 25px 10px; }
.xray-host { height: 250px; margin-bottom: 0; }

.compact-readouts { display: flex; gap: 12px; margin-top: 16px; }
.readout-box { flex: 1; padding: 14px; background: var(--s2); border-radius: var(--radius-sm); text-align: center; border: 1px solid var(--line); }
.readout-box label { display: block; font-size: 0.78rem; color: var(--t3); text-transform: uppercase; margin-bottom: 5px; font-weight: 600; letter-spacing: 1px; }
.readout-box span { font-family: var(--mono); font-weight: 900; font-size: 1.5rem; color: var(--t1); }

/* KPI variant (dashboard pipe counters — compact, not billboards) */
.kpi-number { font-size: 38px; font-weight: 900; font-family: var(--mono); line-height: 1; }
.kpi-sub { font-size: 0.8rem; color: var(--t3); margin-top: 6px; }

/* Canonical empty/computing states (Rule 9.3) */
.empty-state { text-align: center; padding: 60px 20px; background: var(--s2); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.empty-state h2, .empty-state h3 { color: var(--t2); margin-bottom: 8px; font-weight: 600; letter-spacing: 1px; }
.empty-state p { color: var(--t3); font-size: 0.92rem; }
.computing-state { border-color: var(--cg-purple); }
.computing-state h3 { color: var(--cg-purple); }

/* --- 9. DAILY DIGEST & REPORTING --- */
.digest-date-item { padding: 13px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.15s, color 0.15s; font-weight: 600; font-size: 0.95rem; color: var(--t2); display: flex; justify-content: space-between; align-items: center; }
.digest-date-item:hover { background: var(--s3); color: var(--t1); }
.digest-date-item.active { background: var(--s3); color: var(--t1); border-left: 3px solid var(--cg-purple); }
.digest-sidebar { width: 260px; background: var(--s2); border-radius: var(--radius-sm); border: 1px solid var(--line); overflow: hidden; flex-shrink: 0; }
.digest-sidebar-header { background: var(--s0); color: var(--t1); padding: 14px 18px; font-weight: 600; letter-spacing: 1.2px; font-size: 0.85rem; border-bottom: 1px solid var(--line); }
.digest-main-panel { flex: 1; min-width: 0; background: var(--s2); padding: 24px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.digest-big-number { font-size: 46px; display: block; margin-top: 10px; font-weight: 900; font-family: var(--mono); line-height: 1; color: var(--t1); }
.digest-view-title { color: var(--t1); margin: 0 0 24px; font-weight: 600; letter-spacing: 2px; font-size: 1.15rem; text-align: center; }

/* --- 10. LINE UV1: #33.2 CONVEYOR RAIL (replaced zone headers + minimap) ---
   Sticky vertical spine: unit caps (entry/exit), colored segments, one clickable
   node per station in line order. Dataless stations render hollow/striped nodes
   (#26 topology-complete). The rail is navigation AND flow direction. */
.uv1-rail { position: sticky; top: 16px; width: 64px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding: 20px 0 4px; }
.rail-cap { width: 100%; text-align: center; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px; padding: 6px 2px; border: 1px solid; line-height: 1.5; border-radius: var(--radius-sm); }
.rail-cap.rail-entry { background: rgba(55, 138, 221, 0.12); border-color: var(--rail-entry); color: var(--rail-entry); }
.rail-cap.rail-exit { background: rgba(163, 113, 247, 0.12); border-color: var(--rail-exit); color: var(--rail-exit); }
.rail-seg { width: 4px; height: 24px; }
.rail-seg.rail-entry { background: var(--rail-entry); }
.rail-seg.rail-exit { background: var(--rail-exit); }
.rail-node { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; font-family: var(--mono); cursor: pointer; border: 2px solid; border-radius: var(--radius-sm); background: var(--s2); transition: filter 0.15s; }
.rail-node:hover { filter: brightness(1.5); }
.rail-node.rail-entry { border-color: var(--rail-entry); color: var(--rail-entry); }
.rail-node.rail-exit { border-color: var(--rail-exit); color: var(--rail-exit); }
.rail-node.rail-node-empty { border-color: var(--line-strong); color: var(--t3); background: repeating-linear-gradient(45deg, var(--s2), var(--s2) 4px, var(--s3) 4px, var(--s3) 8px); }
.rail-arrow { color: var(--t3); font-size: 0.85rem; padding: 6px 0 2px; }

/* Conformance Scorecard */
.report-scorecard { display: flex; gap: 12px; margin-bottom: 24px; }
.report-card { flex: 1; padding: 20px; background: var(--s2); border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; }
.report-card-title { font-size: 0.78rem; color: var(--t3); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.report-card-value { font-size: 42px; font-weight: 900; font-family: var(--mono); margin-top: 10px; color: var(--cg-purple); line-height: 1; }
.badge-pass { background: var(--bg-ok-soft); color: var(--status-ok); border: 1px solid var(--status-ok); padding: 3px 8px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.5px; }
.badge-fail { background: var(--bg-alert-soft); color: var(--status-alert); border: 1px solid var(--status-alert); padding: 3px 8px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.5px; }

/* --- 11. FORENSICS (adopted into the system — no more orphan styling) --- */
.forensics-filter-btn { padding: 8px 16px; border: 1px solid var(--line-strong); background: var(--s2); color: var(--t2); cursor: pointer; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.5px; border-radius: var(--radius-sm); text-transform: uppercase; }
.forensics-filter-btn:hover { border-color: var(--t2); }
.forensics-filter-btn.active { background: var(--s3); color: var(--t1); border-color: var(--t2); }
.forensics-filter-btn[data-sev="2"].active { color: var(--status-alert); border-color: var(--status-alert); }
.forensics-filter-btn[data-sev="1"].active { color: var(--status-warning); border-color: var(--status-warning); }

/* --- 12. LOGIN (parity for promotion; login.html still loads v1.2 until then) --- */
.login-body { background-color: var(--s0); justify-content: center; align-items: center; }
.login-card { background: var(--s2); border: 1px solid var(--line); padding: 40px; border-radius: var(--radius-sm); width: 350px; display: flex; flex-direction: column; }
.login-card img { width: 200px; align-self: center; margin-bottom: 30px; background: #fff; padding: 8px; border-radius: var(--radius-sm); }
.login-error { color: var(--status-alert); font-size: 0.85rem; font-weight: bold; margin-top: 15px; text-align: center; display: none; }

/* --- 13. PRINT: paper is always light — force the light report --- */
@media print {
    @page { margin: 1cm; size: auto; }
    html, body, #main-window { height: auto !important; overflow: visible !important; background: white !important; color: #000 !important; -webkit-print-color-adjust: exact; padding: 0 !important; margin: 0 !important; display: block !important; }
    .view-container { display: none !important; }
    .view-container.active { display: block !important; height: auto !important; overflow: visible !important; padding: 0 !important; background: white !important; }
    #left-panel, .mode-control-bar, .no-print, .uv1-rail { display: none !important; }
    .panel, .report-card, .uv-station-block, .digest-main-panel { background: white !important; border: 1px solid #000 !important; color: #000 !important; }
    .status-checklist td, .status-checklist th { color: #000 !important; border-bottom: 1px solid #999 !important; }
    .report-card-title, .section-label { color: #333 !important; }
    .report-card-value { color: #000 !important; }
    .badge-pass, .badge-fail { -webkit-print-color-adjust: exact; border: 1px solid #000; }
    #uv1-workspace { display: block !important; width: 100%; margin-top: 0; }
    #uv1-conveyor-main { display: flex !important; flex-direction: column !important; }
    .dygraph-chart-host, .uv-station-block { page-break-inside: avoid !important; break-inside: avoid !important; }
}

/* --- 14. EDGE UI BADGE PARITY (dark tints) --- */
.product-status-badge { padding: 11px 16px; border: 1px solid var(--line-strong) !important; border-radius: var(--radius-sm); font-weight: 600; cursor: default; text-align: left; min-width: 180px; }
.status-ok.product-status-badge { background: var(--bg-ok-soft) !important; color: var(--status-ok) !important; border-color: var(--status-ok) !important; }
.status-alert.product-status-badge { background: var(--bg-alert-soft) !important; color: var(--status-alert) !important; border-color: var(--status-alert) !important; }
.status-warning.product-status-badge { background: var(--bg-warning-soft) !important; color: var(--status-warning) !important; border-color: var(--status-warning) !important; }
.status-id.product-status-badge { background: var(--s2) !important; color: var(--t2) !important; border-color: var(--line-strong) !important; }
.badge-sub { font-size: 0.8rem; display: block; opacity: 0.85; margin-top: 4px; font-family: var(--mono); }

/* #17 canonical state pills — text badges, never emoji (Rule 9) */
.pill { display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.5px; white-space: nowrap; }
.pill-verified   { background: var(--bg-ok-soft); color: var(--status-ok); border: 1px solid var(--status-ok); }
.pill-partial    { background: var(--bg-warning-soft); color: var(--status-warning); border: 1px solid var(--status-warning); }
.pill-unverified { background: var(--bg-alert-soft); color: var(--status-alert); border: 1px solid var(--status-alert); }
.pill-legacy     { background: var(--s3); color: var(--t2); border: 1px solid var(--line-strong); }

/* --- #33.1 additions: disabled fields + chart-well label contrast (Variant A scale) --- */
.industrial-input:disabled, select:disabled { background: var(--s3) !important; color: var(--t3); }
.dygraph-chart-host .dygraph-title { color: #212529 !important; font-size: 14px; font-weight: 600; }
.dygraph-chart-host .dygraph-axis-label { color: #495057 !important; font-size: 12px; }
.dygraph-chart-host .dygraph-legend { background: rgba(255,255,255,0.92); color: #212529; font-size: 12.5px; }
.dygraph-chart-host .dygraph-xlabel, .dygraph-chart-host .dygraph-ylabel { color: #495057; font-size: 12.5px; font-weight: 600; }

/* --- #33.3 additions --- */
/* active rule: selection = size + elevation; color = status only */
.sensor-block.unit-tracked { background: #eef1f4 !important; border-color: #eef1f4 !important; }
.sensor-block.unit-tracked:not(.status-critical-blink):not(.status-alert) h3 { color: #1c232c !important; }
.sensor-block.unit-tracked:not(.status-critical-blink):not(.status-alert) .node-label { color: #5a6470 !important; }
.sensor-block.unit-tracked.status-critical-blink, .sensor-block.unit-tracked.status-alert { background: var(--bg-alert-soft) !important; }
.digest-tab.tab-active { background: var(--s3); color: var(--t1); border-color: var(--line-strong); border-bottom: 2px solid var(--cg-purple); }

/* merged TARGET badge filter pills: solid = active filter, soft = off (no copy) */
.fp { display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; cursor: pointer; margin: 4px 6px 0 0; border: 1px solid; letter-spacing: 0.4px; }
/* #41.1/A (1.3.59): inactive pill = outline only, active = solid — the neutral
   (no-pill = ALL) state reads instantly instead of two soft-filled maybes. */
.fp-v { background: transparent; color: var(--status-ok); border-color: var(--status-ok); }
.fp-v.fp-on-v { background: var(--status-ok); color: var(--s0); }
.fp-u { background: transparent; color: var(--status-alert); border-color: var(--status-alert); }
.fp-u.fp-on-u { background: var(--status-alert); color: var(--s0); }
.fp-hint { display: inline-block; margin: 4px 0 0 2px; font-size: 0.7rem; color: var(--t3); letter-spacing: 0.4px; }

/* forensics severity: dark tints + left edge + pills */
.status-checklist tr.sev-critical { background: var(--bg-alert-soft); }
.status-checklist tr.sev-critical td:first-child { border-left: 3px solid var(--status-alert); }
.status-checklist tr.sev-warning { background: var(--bg-warning-soft); }
.status-checklist tr.sev-warning td:first-child { border-left: 3px solid var(--status-warning); }
.pill-crit { background: var(--bg-alert-soft); color: var(--status-alert); border: 1px solid var(--status-alert); }
.pill-warn { background: var(--bg-warning-soft); color: var(--status-warning); border: 1px solid var(--status-warning); }
.pill-info { background: var(--s3); color: var(--t2); border: 1px solid var(--line-strong); }
.btn-xray { padding: 5px 12px; font-size: 0.72rem; }
.btn-xray-na { opacity: 0.45; cursor: not-allowed; }

/* rail scroll-spy: the station on screen renders solid */
.rail-node.rail-active.rail-entry { background: var(--rail-entry); color: var(--s0); }
.rail-node.rail-active.rail-exit { background: var(--rail-exit); color: var(--s0); }

/* --- #33.4 additions --- */
/* panel/table headings: white, readable (replaces small grey labels on panels) */
.panel-title { font-size: 1rem; font-weight: 600; color: var(--t1); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }

/* --- #33.4 review fixes --- */
/* drill-down BACK chip: its own row under the toolbar, +25% size */
.back-chip { display: inline-block; margin: 0 0 16px; padding: 13px 22px; font-size: 1.02rem; letter-spacing: 1px; }
/* color rule: a ZERO count never wears a status color */
.fp-v.fp-zero, .fp-u.fp-zero { background: transparent; color: var(--t3); border-color: var(--line-strong); }
