/* Customer panel: Theme palettes, layout foundation, accessibility, command palette and print stylesheet. */

  /* IT4Y_PHASE311_THEME_SWITCHER_V1 ─────────────────────────────────────
   * :root holds the LIGHT palette (new default). Dark mode is an
   * override under html[data-theme="dark"]. Both palettes share the
   * same variable names so every component re-skins automatically
   * from CSS variables — no JS DOM rewrites needed when toggling. */
  :root {
    /* Surfaces */
    --bg:#f3f5f9; --bg-2:#ffffff; --panel:#ffffff; --panel-2:#f7f9fc;
    /* Borders */
    --border:#d8dde7; --border-soft:#e6e9ef;
    /* Text */
    --text:#0d1117; --text-dim:#2d3748; --muted:#5a6578;
    /* Accent */
    --accent:#2563eb; --accent-soft:#dbeafe;
    /* Semantic */
    --ok:#15803d; --warn:#b45309; --danger:#b91c1c; --info:#2563eb;
    /* Filled buttons: background and ink that keep 4.5:1 in both themes */
    --accent-fill:#2563eb; --warn-fill:#b45309; --warn-ink:#ffffff; --danger-fill:#b91c1c;
    /* Table */
    --table-row-border:#e6e9ef; --row-hover:#eef2f8;
    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
    --shadow-md: 0 4px 12px rgba(15,23,42,.08);
    /* Layout */
    --sidebar-w:220px; --header-h:54px;
  }
  html[data-theme="dark"] {
    --bg:#0a1219; --bg-2:#0c1722; --panel:#0f1e2e; --panel-2:#152a40;
    --border:#1f3a5a; --border-soft:#15273e;
    --text:#e8edf6; --text-dim:#b4c0d0; --muted:#94a3b8;
    --accent:#3b9eff; --accent-soft:#1d3a5e;
    --ok:#34d399; --warn:#fbbf24; --danger:#f87171; --info:#60a5fa;
    --accent-fill:#2563eb; --warn-fill:#fbbf24; --warn-ink:#1c1300; --danger-fill:#dc2626;
    --table-row-border:#131e2d; --row-hover:#11203a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
    --shadow-md: 0 4px 12px rgba(0,0,0,.45);
  }

  /* ===== IT4Y-DARKFIX — customer-panel dark-mode contrast remediation (audit 2026-05) =====
     Dashboard cards (.welcome/.stat/.sec/.vc-h/.lstat/.tab) hardcoded light bg + slate text
     that bypassed the token system. Remap to theme tokens under dark only (light untouched). */
  html[data-theme="dark"] .welcome{background:var(--panel);border-color:var(--border);border-left-color:#2563eb;}
  html[data-theme="dark"] .stat,html[data-theme="dark"] .sec{background:var(--panel);border-color:var(--border);}
  html[data-theme="dark"] .vc-h,html[data-theme="dark"] .lstat{background:var(--panel-2);border-color:var(--border);}
  html[data-theme="dark"] .tab{background:var(--panel-2);border-color:var(--border);color:var(--text-dim)!important;}
  html[data-theme="dark"] .tab.on{background:var(--bg-2);border-color:var(--border-soft);color:var(--text)!important;}
  html[data-theme="dark"] table th{background:var(--panel-2);}
  html[data-theme="dark"] .welcome h1, html[data-theme="dark"] .welcome h2, html[data-theme="dark"] .welcome h3, html[data-theme="dark"] .vtit,
    html[data-theme="dark"] .lstat-v{color:var(--text)!important; }
  html[data-theme="dark"] .vsub, html[data-theme="dark"] .l, html[data-theme="dark"] .lstat-l, html[data-theme="dark"] .welcome p,
    html[data-theme="dark"] .welcome strong, html[data-theme="dark"] summary{color:var(--text-dim)!important; }
  html[data-theme="dark"] .sec,html[data-theme="dark"] .vc{color:var(--text);}
  html[data-theme="dark"] .vc-h span,html[data-theme="dark"] .vc span:not([class]){color:var(--text-dim)!important;}
  /* Smooth ~180ms transition only on background / text — short enough
     that the toggle feels instant, long enough to confirm the switch. */
  body, .app-shell, .app-header, .app-sidebar, .card, .stat, .sec, .ann-banner,
  .nav-item, .btn, table, input, select, textarea {
    transition: background-color 180ms ease-out, color 180ms ease-out, border-color 180ms ease-out;
  }
  /* Light-theme overrides for components that hardcode dark-friendly colours.
     These compensate for inline-styled cards that used dark-mode contrast
     assumptions and would be illegible on the light surface otherwise. */
  html:not([data-theme="dark"]) .ann-banner.info    { background:#eff6ff; color:#1e3a8a; border-left-color:#60a5fa; }
  html:not([data-theme="dark"]) .ann-banner.warning { background:#fef3c7; color:#78350f; border-left-color:#fbbf24; }
  html:not([data-theme="dark"]) .ann-banner.critical{ background:#fef2f2; color:#7f1d1d; border-left-color:#f87171; }
  html:not([data-theme="dark"]) .msg.error          { background:#fef2f2; color:#7f1d1d; border:1px solid #fecaca; padding:8px 12px; border-radius:6px; }
  html:not([data-theme="dark"]) .msg.ok             { background:#f0fdf4; color:#14532d; border:1px solid #bbf7d0; padding:8px 12px; border-radius:6px; }
  html:not([data-theme="dark"]) .msg.info           { background:#eff6ff; color:#1e3a8a; border:1px solid #bfdbfe; padding:8px 12px; border-radius:6px; }
  html:not([data-theme="dark"]) .pill               { background:#dbeafe; color:#1e3a8a; }
  html:not([data-theme="dark"]) .pill.green         { background:#dcfce7; color:#14532d; }
  html:not([data-theme="dark"]) .pill.red           { background:#fee2e2; color:#7f1d1d; }
  html:not([data-theme="dark"]) .pill.amber         { background:#fef3c7; color:#78350f; }
  html:not([data-theme="dark"]) .pill.blue          { background:#dbeafe; color:#1e3a8a; }
  html:not([data-theme="dark"]) code                { background:#f1f5f9; color:#0f172a; padding:2px 5px; border-radius:3px; }
  html:not([data-theme="dark"]) .nav-item.active    { background:#dbeafe; color:#1e3a8a; }
  html:not([data-theme="dark"]) .nav-item:hover     { background:#eef2f8; }
  html:not([data-theme="dark"]) .nav-label          { color:#64748b; }
  html:not([data-theme="dark"]) .session-info .email{ color:#0f172a; }
  html:not([data-theme="dark"]) .session-info .tenant { color:#2563eb; }
  html:not([data-theme="dark"]) .it4dash .welcome   { background:#fff; }
  html:not([data-theme="dark"]) .it4dash .stat      { background:#fff; border-color:#e2e8f0; }
  html:not([data-theme="dark"]) .it4dash .sec-b     { background:#fff; }
  html:not([data-theme="dark"]) .card               { background:#fff; border:1px solid #e2e8f0; }
  html:not([data-theme="dark"]) table th            { background:#f8fafc; color:#475569; }
  html:not([data-theme="dark"]) table td            { color:#0f172a; }
  html:not([data-theme="dark"]) table tr:hover      { background:#f8fafc; }
  html:not([data-theme="dark"]) input,
  html:not([data-theme="dark"]) select,
  html:not([data-theme="dark"]) textarea            { background:#fff; color:#0f172a; border:1px solid #cbd5e1; }
  html:not([data-theme="dark"]) input:focus,
  html:not([data-theme="dark"]) select:focus,
  html:not([data-theme="dark"]) textarea:focus      { border-color:#2563eb; outline:2px solid #93c5fd; outline-offset:-1px; }
  *{box-sizing:border-box} html,body{height:100%;margin:0}
  /* IT4Y_PHASE262_SIDEBAR_SHIFT_FIX_V1 — stabilize scrollbar gutter so
     content never shifts horizontally when the vertical scrollbar
     appears/disappears (caused by content height changes during
     background WS-driven data refresh, sidebar overlay open/close,
     or window minimize/restore). */
  html { scrollbar-gutter: stable; overflow-y: scroll; }
  /* IT4Y_PHASE262_SIDEBAR_SHIFT_FIX_V2 — body scroll lock is now
     done in JavaScript via position:fixed+top:-Ypx. The original CSS
     `overflow:hidden` approach clamped scrollY to 0, causing the very
     "text shift" it was meant to prevent. The .sidebar-open class is
     still toggled (kept for any other CSS hooks), but the lock proper
     happens through inline body styles set by the hamburger handler. */
  /* (no overflow lock here — JS handles it) */
  /* Content-width safety — keep main column's intrinsic min-width at 0
     so it never overflows the grid track due to long unbroken tokens
     (long URLs, tokens, IDs). Combined with break-word on cells, this
     guarantees text layout stability across viewport changes. */
  .app-main { min-width: 0; }
  .card table td, .card table th { word-break: break-word; overflow-wrap: anywhere; }
  /* IT4Y_PHASE272_VPS_BILLING_VISIBILITY_V1 — per-VPS billing chips */
  .billing-chip{display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:11px; font-size:11px; font-weight:600; margin-left:8px;
    cursor:pointer; text-decoration:none; vertical-align:middle; transition:filter .15s; border:1px solid transparent}
  .billing-chip:hover{filter:brightness(1.15)}
  .billing-chip.paid{background:rgba(34,197,94,.14);color:#22c55e;border-color:rgba(34,197,94,.3)}
  .billing-chip.open{background:rgba(251,191,36,.16);color:#fbbf24;border-color:rgba(251,191,36,.35)}
  .billing-chip.overdue{background:rgba(239,68,68,.16);color:#ef4444;border-color:rgba(239,68,68,.4)}
  .billing-chip.void{background:rgba(148,163,184,.14);color:#94a3b8;border-color:rgba(148,163,184,.3)}
  /* end IT4Y_PHASE272_VPS_BILLING_VISIBILITY_V1 */
  /* === IT4Y_PHASE269_LAYOUT_CONTAINMENT_V1 — isolate extension-injected
     DOM from propagating shifts. Browser extensions (password managers,
     wallet extensions, accessibility tools) frequently inject icon
     overlays into INPUT/BUTTON elements after the SPA renders. Without
     containment, those injections can shift adjacent content vertically
     by 18-24px per overlay. With `contain: layout style`, each
     container becomes a layout boundary — extension overlays inside
     one .card can't push other .card siblings around.
     ============================================================== */
  .app-main      { contain: layout style; }
  .card          { contain: layout style; }
  .ann-banner    { contain: layout style; }
  /* end IT4Y_PHASE269_LAYOUT_CONTAINMENT_V1 */
  body{font:14px -apple-system,"Segoe UI",system-ui,sans-serif;background:var(--bg);color:var(--text)}
  /* ===== IT4Y-POLISH-V1 — enterprise UI/UX foundation (audit 2026-05). Additive only. ===== */
  :root{
    --sp-1:4px;--sp-2:8px;--sp-3:12px;--sp-4:16px;--sp-5:20px;--sp-6:24px;--sp-8:32px;--sp-10:40px;--sp-12:48px;
    --r-sm:4px;--r-md:6px;--r-lg:10px;--r-xl:14px;--r-pill:999px;
    --fs-xs:11px;--fs-sm:12px;--fs-base:14px;--fs-md:15px;--fs-lg:17px;--fs-xl:20px;--fs-2xl:26px;
    --fw-normal:400;--fw-medium:500;--fw-semibold:600;--fw-bold:700;--lh-tight:1.25;--lh-normal:1.5;
    --ease:cubic-bezier(.4,0,.2,1);--dur-fast:.12s;--dur:.18s;
    --z-header:100;--z-sidebar:90;--z-drawer:1000;--z-modal:1100;--z-toast:1200;--z-cmd:1300;
    --ok-soft:#dcfce7;--warn-soft:#fef3c7;--danger-soft:#fee2e2;--info-soft:#dbeafe;
    --panel-1:var(--panel);
    color-scheme:light;scrollbar-color:var(--border) transparent;scrollbar-width:thin;
  }
  html[data-theme="dark"]{
    --ok-soft:#0e2a1a;--warn-soft:#2a210e;--danger-soft:#2a1414;--info-soft:#0e1f33;
    --panel-1:var(--panel);
    color-scheme:dark;scrollbar-color:var(--border) transparent;
  }
  body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;}
  ::selection{background:var(--accent-soft);color:var(--text);}
  html[data-theme="dark"] ::selection{background:rgba(59,158,255,.30);color:var(--text);}
  ::-webkit-scrollbar{width:10px;height:10px;}
  ::-webkit-scrollbar-track{background:transparent;}
  ::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--r-pill);border:2px solid transparent;background-clip:padding-box;}
  ::-webkit-scrollbar-thumb:hover{background:var(--muted);}
  a:focus-visible, button:focus-visible, [role="button"]:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
    summary:focus-visible, .btn:focus-visible, .tab:focus-visible, .nav-item:focus-visible, [tabindex]:focus-visible{outline:2px solid var(--accent);
    outline-offset:2px; border-radius:var(--r-sm); }
  a,button,.btn,[role="button"]{-webkit-tap-highlight-color:transparent;}
  .skeleton{position:relative;overflow:hidden;background:var(--panel-2);border-radius:var(--r-md);}
  .skeleton::after{content:""; position:absolute; inset:0; transform:translateX(-100%);
    background:linear-gradient(90deg,transparent,rgba(127,139,160,.14),transparent); animation:it4y-shimmer 1.3s infinite; }
  .skeleton-line{height:12px;margin:8px 0;}
  @keyframes it4y-shimmer{100%{transform:translateX(100%);}}
  .empty-state{text-align:center;padding:var(--sp-12) var(--sp-6);color:var(--muted);}
  .empty-state .es-icon{font-size:34px;opacity:.55;margin-bottom:var(--sp-3);}
  .empty-state .es-title{font-size:var(--fs-md);font-weight:var(--fw-semibold);color:var(--text-dim);margin-bottom:var(--sp-1);}
  .empty-state .es-sub{font-size:var(--fs-sm);max-width:340px;margin:0 auto;line-height:var(--lh-normal);}
  @media (prefers-reduced-motion: reduce){.skeleton::after{animation:none;}}
  /* ===== /IT4Y-POLISH-V1 ===== */
  a{color:var(--accent);text-decoration:none} a:hover{text-decoration:underline}
  code{font:12px ui-monospace,"SF Mono",Menlo,monospace;color:var(--info)}
  pre{font:12px ui-monospace,"SF Mono",Menlo,monospace}
  .app-shell{display:grid;grid-template-columns:var(--sidebar-w) 1fr;grid-template-rows:var(--header-h) 1fr;min-height:100vh}
  .session-info{color:var(--text-dim)} .session-info .email{color:var(--text);font-weight:600}
  .session-info .tenant{color:var(--accent);margin-left:6px}
  .app-sidebar{background:var(--bg-2);border-right:1px solid var(--border-soft);overflow-y:auto;padding:14px 8px}
  .nav-group{margin-bottom:12px}
  .nav-label{font-size:10px;text-transform:uppercase;letter-spacing:1.2px;color:var(--muted);padding:6px 12px;margin-top:6px}
  .nav-item{display:flex; align-items:center; gap:10px; padding:8px 12px; margin:1px 4px; border-radius:6px; cursor:pointer; color:var(--text-dim);
    font-size:13px; user-select:none}
  .nav-item:hover{background:var(--panel-2);color:var(--text)}
  .nav-item.active{background:var(--accent-soft);color:var(--text);font-weight:600}
  /* IT4Y_PHASE192_REALTIME_WS_V1 — brief flash when a WS event lands */
  .nav-item.rt-flash{animation:rtflash 1.4s ease-out 1}
  @keyframes rtflash{0%{box-shadow:inset 3px 0 0 var(--accent)}60%{box-shadow:inset 3px 0 0 var(--accent)}100%{box-shadow:inset 3px 0 0 transparent}}
  .it4y-visually-hidden{position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important;
    overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important}
  .rt-dashboard-live-dot{display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; vertical-align:middle; background:#94a3b8;
    transition:background-color .16s ease,box-shadow .16s ease}
  .rt-dashboard-live-dot.is-disconnected{background:#94a3b8;box-shadow:none;animation:none}
  .rt-dashboard-live-dot.is-connected{background:#22c55e;box-shadow:0 0 6px #22c55e;animation:rtDashboardPulse 2s infinite}
  @keyframes rtDashboardPulse{0%,100%{opacity:1}50%{opacity:.62}}
  .nav-item .icon{width:16px;text-align:center;font-size:14px}
  .app-main{padding:22px 26px;overflow-y:auto}
  .breadcrumbs{color:var(--muted);font-size:12px;margin-bottom:12px}
  .breadcrumbs a{color:var(--muted)} .breadcrumbs .sep{margin:0 8px;opacity:.5}
  .page-title{font-size:22px;font-weight:700;margin:0 0 16px}
  .card{background:var(--panel);border:1px solid var(--border-soft);border-radius:10px;padding:18px;margin-bottom:16px}
  .card h3{margin:0 0 12px 0;font-size:15px}
  .card-toolbar{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap;align-items:center}
  .kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
  .kpi{background:var(--panel-2);padding:14px 16px;border-radius:8px;border:1px solid var(--border-soft)}
  .kpi .v{font-size:26px;font-weight:700;color:var(--accent)}
  .kpi .l{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.7px;margin-top:4px}
  table{width:100%;border-collapse:collapse;font-size:13px}
  th{text-align:left; color:var(--muted); font-weight:600; padding:9px 12px; border-bottom:1px solid var(--border-soft); font-size:11px;
    text-transform:uppercase; letter-spacing:.6px}
  td{padding:9px 12px;border-bottom:1px solid #131e2d}
  tr.clickable{cursor:pointer} tr.clickable:hover td{background:#11203a}
  .pill{display:inline-block; padding:2px 8px; border-radius:11px; font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.4px;
    background:#1f3a5e; color:#b9d3f0}
  .pill.green{background:#14331a;color:#b3f5c4}
  .pill.red{background:#3a1818;color:#fda4a4}
  .pill.amber{background:#3a2f18;color:#fde2a4}
  .field{margin:12px 0}
  .field label{display:block;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:5px}
  .field input,.field select,.field textarea{width:100%; padding:9px 12px; border-radius:6px; border:1px solid var(--border); background:#0a1726;
    color:var(--text); font:13px ui-monospace,monospace}
  .field input:focus,.field select:focus,.field textarea:focus{outline:2px solid var(--accent);border-color:var(--accent)}
  .btn{padding:8px 14px;border-radius:6px;border:0;cursor:pointer;background:var(--accent-fill);color:#fff;font:600 13px system-ui;transition:filter .15s}
  .btn:hover{filter:brightness(1.1)} .btn:disabled{opacity:.5;cursor:not-allowed}
  .btn.small{padding:4px 10px;font-size:11px}
  .btn.ghost{background:transparent;color:var(--text-dim);border:1px solid var(--border)}
  .btn.warn{background:var(--warn-fill);color:var(--warn-ink)} .btn.danger{background:var(--danger-fill)}
  .msg{padding:11px 14px;border-radius:6px;font-size:13px;margin:10px 0}
  .msg.error{background:#3a1818;color:#fda4a4;border:1px solid #7f3333}
  .msg.ok{background:#14331a;color:#b3f5c4;border:1px solid #2f6e44}
  .msg.info{background:#14253d;color:#b6d4f8;border:1px solid #2a4a76}
  .muted{color:var(--muted)} .small{font-size:11px} .right{text-align:right}
  .spinner{display:inline-block; width:14px; height:14px; border:2px solid var(--border); border-top-color:var(--accent); border-radius:50%;
    animation:spin .6s linear infinite; vertical-align:middle; margin-right:6px}
  @keyframes spin{to{transform:rotate(360deg)}}
  /* IT4Y_NOTOPBAR_2026_06_08 — global route/fetch progress bar permanently retired (redundant; SPA transitions are near-instant). Hard-hidden so it can
     never paint, even if a stray .active is added by legacy code. */
  .loading-overlay,.loading-overlay.active{display:none!important;animation:none!important}
  /* IT4Y_NOTOPBAR_2026_06_08 — the router programmatically moves focus to a non-interactive wrapper/heading on route & tab changes; suppress the browser
     default focus ring there so no blue line/box is drawn across the layout. Genuinely interactive controls keep their :focus-visible a11y ring (rule at
     earlier in this stylesheet). */
  #view-root:focus, #view-root:focus-visible, #main-content:focus, #main-content:focus-visible, main.app-main:focus, main.app-main:focus-visible,
    .app-shell:focus, .app-shell:focus-visible, .page-title:focus, .page-title:focus-visible{outline:none!important; box-shadow:none!important}
  @keyframes progress{0%{transform:scaleX(0)}50%{transform:scaleX(.7)}100%{transform:scaleX(1)}}
  .auth-wrap{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:20px}
  .auth-card{width:100%;max-width:440px;background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:28px}
  .auth-card h1{margin:0 0 6px;font-size:22px}
  .auth-card .muted{font-size:13px;line-height:1.5;margin-bottom:18px}
  details{background:var(--panel-2);border:1px solid var(--border-soft);border-radius:6px;padding:8px 12px;margin-top:14px}
  details summary{cursor:pointer;color:var(--text-dim);font-size:12px}
  details[open] summary{margin-bottom:8px}

  /* IT4Y_PHASE99_CUSTOMER_ANN_UI_V1 */
  .ann-banner{display:flex; align-items:flex-start; gap:10px; padding:10px 14px; margin-bottom:8px; border-radius:6px; font-size:13px;
    border-left:4px solid var(--accent)}
  .ann-banner.info{background:#14253d;color:#b6d4f8;border-left-color:var(--info)}

  /* IT4Y_PHASE196_EMPTY_STATE_V1 — friendly empty-state component */
  .empty-state{text-align:center;padding:42px 20px;color:var(--text-dim)}
  .empty-state .ico{font-size:48px;margin-bottom:12px;opacity:.55}
  .empty-state h4{margin:0 0 6px;font-size:16px;color:var(--text)}
  .empty-state p{margin:0 0 16px;font-size:13px;line-height:1.55;max-width:420px;margin-left:auto;margin-right:auto}

  /* IT4Y_PHASE196_RESPONSIVE_V1 — mobile-first responsive layout.
     At ≤900px the sidebar slides off-canvas behind a hamburger button.
     Tables become horizontally scrollable. KPI grid collapses to 2 cols. */
  .sidebar-backdrop{display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1190; animation:fadein .15s}
    /* IT4Y_PRA_DRAWER_ISO_2026_07_02 — was 9: header/bell/hamburger (z50-100) rendered ABOVE the dim */
  @keyframes fadein{from{opacity:0}to{opacity:1}}
  @media (max-width: 900px) {
    :root{--sidebar-w:0px}
    .app-sidebar{
      position:fixed;left:0;top:var(--header-h);bottom:0;width:240px;z-index:11;
      transform:translateX(-105%);transition:transform .2s ease-out;
      box-shadow:4px 0 18px rgba(0,0,0,.45);
    }
    .app-sidebar.open{transform:translateX(0)}
    .sidebar-backdrop.open{display:block}
    .app-main{padding:16px 14px}
    .page-title{font-size:18px}
    .card{padding:14px;margin-bottom:12px}
    .session-info .tenant{display:none}
    .session-info .email{max-width:140px;overflow:hidden;text-overflow:ellipsis;display:inline-block;vertical-align:middle}
    .kpi-grid{grid-template-columns:repeat(2, minmax(0,1fr));gap:8px}
    .kpi .v{font-size:20px}
    table{font-size:12px}
    th,td{padding:6px 8px}
    /* table-overflow guard */
    .card > table, .card > .table-wrap{display:block;max-width:100%;overflow-x:auto}
    .btn{padding:9px 14px;font-size:13px} /* slightly larger touch target */
    .btn.small{padding:5px 10px;font-size:11px}
  }
  @media (max-width: 480px) {
    .kpi-grid{grid-template-columns:1fr}
    #rt-status-pill{font-size:10px;padding:2px 6px}
  }

  /* IT4Y_PHASE196_MODAL_KBD_V1 — focus management baseline */
  .it4y-modal-backdrop:focus{outline:none}
  .it4y-modal:focus-within{outline:none}
  .ann-banner.warning{background:#3a2f18;color:#fde2a4;border-left-color:var(--warn)}
  .ann-banner.critical{background:#3a1818;color:#fda4a4;border-left-color:var(--danger)}
  .ann-banner .body{flex:1;line-height:1.4}
  .ann-banner .body strong{display:block;margin-bottom:2px}
  .ann-banner .dismiss{background:transparent;border:0;color:inherit;cursor:pointer;font-size:18px;line-height:1;opacity:.8;padding:2px 6px;
    min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  /* Values that mix digits and Latin units or ids keep their own reading order in a right-to-left page. */
  .co-spec b,.cp-spec b,.ord-spec b,.vpx-chip-v,td code{unicode-bidi:plaintext}
  .run-ok{color:var(--ok);font-weight:600}
  /* Touch targets: at least 44px on narrow screens (WCAG 2.5.5) */
  @media (max-width:900px){
    .co-rm,.cp-rm,.ip-copy,.vpx-tab{min-height:44px;min-width:44px}
    .breadcrumbs a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
    .it4dash .os-card{min-height:44px}
  }
  .ann-banner .dismiss:hover{opacity:1}

  /* IT4Y_PHASE201_SKIP_LINK_V1 — keyboard skip-link. Visually hidden until
     focused. First focusable element in the shell so Tab from a fresh
     page-load lands here, letting screen-reader / keyboard users jump
     past the sidebar navigation straight to the main content. */
  .skip-link{position:fixed; inset-inline-start:0; top:0; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap;
    z-index:9500}
  .skip-link:focus{inset-inline-start:16px; inset-inline-end:auto; top:12px; width:auto; height:auto; overflow:visible; clip:auto; clip-path:none;
    white-space:normal; padding:8px 14px; background:var(--accent); color:#fff; border-radius:6px; font-weight:600; box-shadow:0 6px 20px rgba(0,0,0,.4);
    outline:2px solid #fff; outline-offset:2px}

  /* IT4Y_PHASE201_ARIA_BUSY_V1 — subtle visual signal for async view loads. */
  [aria-busy="true"]{opacity:.72;pointer-events:none;transition:opacity .12s ease}
  [aria-busy="true"]::after{content:"";display:block;position:absolute;inset:0;background:transparent;cursor:progress}

  /* IT4Y_PHASE201_PAGE_TITLE_FOCUS_V1 — when route() programmatically focuses
     the page-title, suppress the default outline ring (focus is moved
     transparently so screen readers announce the new view; we don't want
     a visible blue ring around the heading on every navigation). */
  .page-title:focus{outline:none}
  .page-title:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:4px}

  /* IT4Y_PHASE201_REDUCED_MOTION_V1 — respect user OS-level preference.
     Honors `prefers-reduced-motion: reduce` (set in macOS / Windows /
     iOS / Android accessibility settings) by neutralising every animation
     + transition the SPA defines. Required for WCAG 2.1 SC 2.3.3 and
     to avoid triggering vestibular disorders. */
  @media (prefers-reduced-motion: reduce){
    *,*::before,*::after{
      animation-duration:0.01ms !important;
      animation-iteration-count:1 !important;
      transition-duration:0.01ms !important;
      scroll-behavior:auto !important;
    }
  }

  /* IT4Y_PHASE203_CMD_PALETTE_V1 — global command palette. Cmd/Ctrl+K (or
     `/`, or the header search button) opens this overlay. Fully keyboard-
     accessible (arrow keys, Enter, Esc). The palette is a transient
     element added to body and removed on close — no persistent DOM
     footprint when not in use. Matches the dark theme; high-contrast
     focus ring is provided by the OS via `:focus-visible`. */
  #it4y-cmd-backdrop{position:fixed; inset:0; background:rgba(0,0,0,.55); display:flex; align-items:flex-start; justify-content:center; z-index:9300;
    padding:60px 16px 16px; animation:cmdFadeIn .12s ease-out}
  @keyframes cmdFadeIn{from{opacity:0}to{opacity:1}}
  #it4y-cmd{background:var(--panel); border:1px solid var(--border); border-radius:10px; width:100%; max-width:600px; max-height:70vh; display:flex;
    flex-direction:column; overflow:hidden; box-shadow:0 16px 64px rgba(0,0,0,.55)}
  #it4y-cmd .cmd-input{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--border-soft)}
  #it4y-cmd .cmd-input .icon{font-size:18px;opacity:.55}
  #it4y-cmd input{flex:1;background:transparent;border:0;outline:0;color:var(--text);font-size:15px;font-family:inherit}
  #it4y-cmd input::placeholder{color:var(--muted)}
  #it4y-cmd .cmd-hint{font-size:11px; color:var(--muted); background:var(--panel-2); padding:2px 6px; border-radius:4px; border:1px solid var(--border-soft);
    font-family:ui-monospace,monospace}
  #it4y-cmd .cmd-list{overflow-y:auto;padding:6px 0;flex:1}
  #it4y-cmd .cmd-group{padding:4px 0}
  #it4y-cmd .cmd-group-label{padding:6px 18px 4px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
  #it4y-cmd .cmd-item{display:flex;align-items:center;gap:10px;padding:8px 18px;cursor:pointer;font-size:14px;color:var(--text-dim)}
  #it4y-cmd .cmd-item .ico{width:18px;text-align:center;font-size:14px;opacity:.85}
  #it4y-cmd .cmd-item .lbl{flex:1}
  #it4y-cmd .cmd-item .kbd{font-size:10px; color:var(--muted); background:var(--panel-2); padding:1px 5px; border-radius:3px;
    border:1px solid var(--border-soft); font-family:ui-monospace,monospace}
  #it4y-cmd .cmd-item.active,#it4y-cmd .cmd-item:hover{background:var(--accent-soft);color:var(--text)}
  #it4y-cmd .cmd-item.active .ico,#it4y-cmd .cmd-item:hover .ico{opacity:1}
  #it4y-cmd .cmd-empty{padding:20px;text-align:center;color:var(--muted);font-size:13px}
  #it4y-cmd .cmd-footer{padding:8px 18px; font-size:11px; color:var(--muted); border-top:1px solid var(--border-soft); display:flex;
    justify-content:space-between; gap:8px; flex-wrap:wrap}
  #it4y-cmd .cmd-footer kbd{font-family:ui-monospace,monospace; background:var(--panel-2); padding:1px 5px; border-radius:3px;
    border:1px solid var(--border-soft); font-size:10px}

  /* Keyboard shortcuts overlay — triggered by `?` */
  #it4y-kbd-overlay .card{max-width:480px;margin:60px auto;font-size:13px}
  #it4y-kbd-overlay h3{margin-top:0}
  #it4y-kbd-overlay .kbd-row{display:flex;justify-content:space-between;padding:5px 0;border-bottom:1px dashed var(--border-soft)}
  #it4y-kbd-overlay .kbd-row:last-child{border-bottom:0}
  #it4y-kbd-overlay kbd{font-family:ui-monospace,monospace; background:var(--panel-2); padding:1px 6px; border-radius:3px; border:1px solid var(--border-soft);
    font-size:11px; color:var(--text)}


  /* IT4Y_PHASE202_PRINT_STYLESHEET_V1 — when the customer prints an
     invoice / ticket / activity log, hide all the SPA chrome (sidebar,
     header, hamburger, status pill, action buttons, toolbars), reset
     the dark theme to print-on-white, and let tables flow at full
     width so receipts come out cleanly. Single SPA, but printable. */
  @media print {
    html,body { background:#fff !important; color:#000 !important; }
    .skip-link,
    .app-header,
    .app-sidebar,
    .sidebar-backdrop,
    .hamburger,
    #rt-status-pill,
    #it4y-toast-root,
    .ann-banner .dismiss,
    .card-toolbar .btn,
    .card-toolbar > button,
    .nav-item,
    .empty-state .btn,
    button.btn { display:none !important; }
    .app-shell {
      display:block !important;
      grid-template:none !important;
      min-height:auto !important;
    }
    .app-main {
      padding:0 !important;
      grid-column:1/-1 !important;
    }
    .card {
      background:#fff !important;
      color:#000 !important;
      border:1px solid #888 !important;
      box-shadow:none !important;
      page-break-inside:avoid;
      margin:0 0 12px 0;
    }
    .muted, .muted.small { color:#444 !important; }
    table { width:100% !important; border-collapse:collapse; }
    table th, table td {
      border:1px solid #aaa !important;
      padding:6px 8px;
      background:#fff !important;
      color:#000 !important;
    }
    .pill { border:1px solid #888 !important; background:#fff !important; color:#000 !important; }
    a { color:#000 !important; text-decoration:underline; }
    a[href]::after { content:" (" attr(href) ")"; font-size:10px; color:#555; }
    /* don't print href for in-page anchors and javascript: */
    a[href^="#"]::after, a[href^="javascript:"]::after { content:""; }
    .page-title { color:#000 !important; border-bottom:1px solid #888; padding-bottom:4px; }
    h1,h2,h3,h4 { color:#000 !important; page-break-after:avoid; }
    tr, td, th { page-break-inside:avoid; }
  }
