/* Offline light / dark design tokens. Loaded after landing and workspace styles. */
:root[data-theme="light"]{
 color-scheme:light;--surface:#ffffff;--canvas:#f4f7fb;--ink:#172a40;--ink-soft:#667b91;
 --outline-soft:#e2eaf2;--control-soft:#edf3fa;--text-primary:#1e3a55;--muted:#70859a;
 --policy-bg:#f6f9fe;--field-bg:#fff7f7;
}
:root[data-theme="dark"]{
 color-scheme:dark;--surface:#18283c;--canvas:#0d1929;--ink:#e9f1fa;--ink-soft:#a6bbcf;
 --outline-soft:#2e4560;--control-soft:#263e55;--text-primary:#e8f1fa;--muted:#a7bacb;
 --policy-bg:#1d3249;--field-bg:#45283d;
}
:root[data-theme="dark"] body{background:var(--canvas);color:var(--ink)}
:root[data-theme="dark"] body a{color:#91cded}
:root[data-theme="dark"] .app-body, :root[data-theme="dark"] .workspace-body{background:#0d1929;color:#e8f0f9}
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .workspace-body .panel,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .auth.panel{background:#18293d;border-color:#2b415b;color:#e8f2fa;box-shadow:0 8px 30px #0108123d}
:root[data-theme="dark"] .panel h1,:root[data-theme="dark"] .panel h2,:root[data-theme="dark"] .panel h3,
:root[data-theme="dark"] .page-heading h1,:root[data-theme="dark"] .section-heading h2,
:root[data-theme="dark"] .topbar-location strong{color:#e9f4ff}
:root[data-theme="dark"] .muted,:root[data-theme="dark"] .metric-card .metric-label,
:root[data-theme="dark"] .metric-card small,:root[data-theme="dark"] .topbar-location small,
:root[data-theme="dark"] .table-sub,:root[data-theme="dark"] .catalog-edit-id small{color:#a6bad0}
:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea{
 background:#112136;color:#e5f1ff;border-color:#39516b;box-shadow:none;
}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#839aaf;opacity:1}
:root[data-theme="dark"] input:focus,:root[data-theme="dark"] select:focus,:root[data-theme="dark"] textarea:focus{border-color:#5ccbc0;outline-color:#5ccbc0}
:root[data-theme="dark"] input[data-jdp][readonly]{background-color:#112136}
:root[data-theme="dark"] .secondary,:root[data-theme="dark"] .btn.secondary,:root[data-theme="dark"] button.secondary{
 background:#284159!important;color:#d7ebff!important
}
:root[data-theme="dark"] .notice{background:#153d3b;color:#c1f4e5;border-color:#287164}
:root[data-theme="dark"] .error{color:#ffaab3}
:root[data-theme="dark"] .work-topbar{background:#16263b;border-color:#2d445e;box-shadow:0 3px 17px #0004}
:root[data-theme="dark"] .topbar-user{border-color:#344b63}
:root[data-theme="dark"] .avatar-letter{background:#244656;color:#8ae4d8}
:root[data-theme="dark"] .theme-switch{border-color:#3a576e;background:#253a51;color:#ffdb9e}
:root[data-theme="dark"] .theme-switch:hover{background:#35526d}
:root[data-theme="dark"] .logout-button{background:#462d3c;color:#ffd6df}
:root[data-theme="dark"] .menu-toggle{background:#263e57;color:#e1f1ff}
:root[data-theme="dark"] .top-date,:root[data-theme="dark"] .date-chip{background:#1c3b51;color:#8dd2d6}
:root[data-theme="dark"] .metric-card:after{background:#6fdbcf10}
:root[data-theme="dark"] .metric-card.money strong,:root[data-theme="dark"] .metric-card strong{color:#f2faff}
:root[data-theme="dark"] .shortcut-grid a{background:#1b3046;color:#e7f5ff;border-color:#344e69}
:root[data-theme="dark"] .shortcut-grid a:hover{background:#264656;border-color:#347c7f}
:root[data-theme="dark"] .shortcut-grid strong{color:#e7f5ff}
:root[data-theme="dark"] .modern-table th,:root[data-theme="dark"] th{background:#22384e;color:#c1d6e8;border-color:#34516c}
:root[data-theme="dark"] .modern-table td,:root[data-theme="dark"] td{color:#dbe8f5;border-color:#2f465c}
:root[data-theme="dark"] .modern-table tbody tr:hover{background:#243b52}
:root[data-theme="dark"] .catalog-edit-row{border-color:#34495f;background:#1b3046}
:root[data-theme="dark"] .new-unit{background:#1b3e40;border-color:#27645f}
:root[data-theme="dark"] .info-grid>div{background:#21374e}
:root[data-theme="dark"] .info-grid small{color:#a3b8ca}
/* Apply to BOTH the create-employee form and existing employee permission forms. */
:root[data-theme="dark"] .professional-permissions label{background:#20364c;color:#edf6ff;border-color:#3a5872}
:root[data-theme="dark"] .professional-permissions label:hover{background:#29465e;border-color:#668aa4}
:root[data-theme="dark"] .professional-permissions label:has(input:checked){background:#174941;border-color:#49a995;color:#d4fff2;font-weight:700}
:root[data-theme="dark"] .professional-permissions input[type="checkbox"]{accent-color:#55d3b8;color-scheme:dark}
:root[data-theme="dark"] .professional-permissions label:has(input:focus-visible){outline-color:#6ce5d1}
:root[data-theme="dark"] .admin-product-card details{border-color:#355069}
:root[data-theme="dark"] .sales-bar-track{background:#263b50}
:root[data-theme="dark"] .password-policy-panel{background:#1e3349;border-color:#38516a}
:root[data-theme="dark"] .password-rule-grid [data-rule].passed{color:#75d8bc}
:root[data-theme="dark"] .password-toggle{background:#2c4961;color:#e7f7ff}
:root[data-theme="dark"] .register-panel .form-section-title{border-color:#38506a}
:root[data-theme="dark"] .form-validation-toast{background:#892e42;color:#fff}
:root[data-theme="dark"] .error-stat strong{color:#dceeff}
:root[data-theme="dark"] .error-stat>div,:root[data-theme="dark"] .error-details-grid span{color:#aebed0}
:root[data-theme="dark"] .error-trace{background:#071324;color:#d7e9fb}
:root[data-theme="dark"] .error-status-open{background:#4b3227;color:#ffd2a4}
:root[data-theme="dark"] .error-status-done{background:#194f43;color:#9ae1bd}
:root[data-theme="dark"] jdp-container{color:#1c3249}
:root[data-theme="dark"] .footer-theme-toggle{color:#e8fcff}
:root[data-theme="dark"] .global-footer{background:linear-gradient(135deg,#091525,#081522)}
:root[data-theme="dark"] .landing-body{background:#0d1929;color:#e8f3ff;--land-ink:#eaf3ff;--land-text:#b4c4d6;--land-navy:#e8f4ff;--land-line:#314860}
:root[data-theme="dark"] .landing-header{background:#14243aec;border-color:#2e4359}
:root[data-theme="dark"] .landing-brand strong{color:#eaf5ff}
:root[data-theme="dark"] .landing-nav a{color:#c2d5e4}
:root[data-theme="dark"] .landing-nav a:hover{color:#ffb284}
:root[data-theme="dark"] .header-login{background:#28616f;color:#fff!important}
:root[data-theme="dark"] .landing-menu-toggle{background:#284157;color:#eaf7ff}
:root[data-theme="dark"] .landing-hero{background:radial-gradient(circle at 70% 28%,#263345 0%,#142137 40%,transparent 70%),linear-gradient(180deg,#102036,#111e30)}
:root[data-theme="dark"] .hero-copy h1,:root[data-theme="dark"] .section-heading h2,
:root[data-theme="dark"] .service-card h3,:root[data-theme="dark"] .flow-list h3{color:#ebf5ff}
:root[data-theme="dark"] .hero-lead,:root[data-theme="dark"] .hero-lead strong,:root[data-theme="dark"] .hero-trust,
:root[data-theme="dark"] .section-heading p,:root[data-theme="dark"] .service-card p,
:root[data-theme="dark"] .showcase-copy>p,:root[data-theme="dark"] .showcase-points>div,
:root[data-theme="dark"] .flow-list p,:root[data-theme="dark"] .faq-questions details p{color:#b4c6d6}
:root[data-theme="dark"] .floating-order-card,:root[data-theme="dark"] .hero-step-strip,
:root[data-theme="dark"] .service-card,:root[data-theme="dark"] .showcase-stamp,
:root[data-theme="dark"] .faq-questions details{background:#1a2f45;border-color:#2f4a63;color:#e4f1fe}
:root[data-theme="dark"] .floating-order-card strong,:root[data-theme="dark"] .showcase-stamp strong{color:#e8f4ff}
:root[data-theme="dark"] .floating-order-card small,:root[data-theme="dark"] .hero-step-strip small{color:#a4b9c9}
:root[data-theme="dark"] .service-section,:root[data-theme="dark"] .faq-section,
:root[data-theme="dark"] .categories-section{background:#122237}
:root[data-theme="dark"] .showcase-section,:root[data-theme="dark"] .flow-section{background:#0d1929}
:root[data-theme="dark"] .faq-questions summary{color:#f0f7ff}
:root[data-theme="dark"] .faq-questions summary span{background:#2d4961;color:#ffc095}
:root[data-theme="dark"] .hero-step-strip>div:not(:last-child):after{background:#3a5268}
:root[data-theme="dark"] .landing-button-outline{background:#1e354b;border-color:#4a6780;color:#eaf3fa!important}
:root[data-theme="dark"] .landing-button-outline:hover{background:#29445e}
:root[data-theme="dark"] .showcase-small{border-color:#14283c}
:root[data-theme="dark"] .eyebrow{background:#523329;color:#ffba92}
:root[data-theme="dark"] .service-card>span{color:#344b60}
:root[data-theme="dark"] .flow-list li:not(:last-child):after{border-color:#3d536a}
:root[data-theme="dark"] .landing-nav.is-open{background:#182b42;box-shadow:0 15px 35px #0007}
:root[data-theme="dark"] .landing-nav a{border-color:#2d455c}
:root[data-theme="dark"] .landing-body .closing-panel{background:#162b43}
:root[data-theme="dark"] .closing-image:after{background:linear-gradient(90deg,transparent 52%,#162b43 100%)}
:root[data-theme="dark"] .status-pill.pending{background:#4b3a21;color:#ffd59b}
:root[data-theme="dark"] .status-pill.review{background:#203f5b;color:#add8ff}
:root[data-theme="dark"] .status-pill.issued{background:#3c315b;color:#d3c2ff}
:root[data-theme="dark"] .status-pill.done{background:#194c40;color:#9de4bf}
:root[data-theme="dark"] .status-pill.cancelled{background:#512b3b;color:#ffb9c2}
@media print{
 :root[data-theme="dark"] body{background:#fff!important;color:#222!important}
 :root[data-theme="dark"] .panel{background:#fff!important;color:#222!important}
}

:root[data-theme="dark"] .compact-admin-footer{background:#14263a;border-color:#2c435c;color:#9ab2c9}
:root[data-theme="dark"] .compact-admin-footer a{color:#8cd5d1}
:root[data-theme="dark"] .existing-order-row{background:#243a50}
:root[data-theme="dark"] .existing-product-name small{color:#a3bbd0}
:root[data-theme="dark"] .quantity-control button{background:#244d54;color:#9cf4da}
:root[data-theme="dark"] .quantity-control button:hover:not(:disabled){background:#32666b}
:root[data-theme="dark"] .catalog-save-panel{background:#1b3043!important}
:root[data-theme="dark"] .reopen-panel{background:#392d31;border-color:#985c55}

:root[data-theme="dark"] .superadmin-rollback{background:#302d37;border-right-color:#df8575!important}
:root[data-theme="dark"] .history-status-change,:root[data-theme="dark"] .history-value-line{background:#1b3a42}
:root[data-theme="dark"] .history-status-change strong{color:#8be5ce}
:root[data-theme="dark"] .history-reason{background:#463829;color:#ffe1b7}
:root[data-theme="dark"] .history-snapshot,:root[data-theme="dark"] .superadmin-role-editor{border-color:#38516a}

:root[data-theme="dark"] .vision-setup pre{background:#102035;color:#deecfa}
:root[data-theme="dark"] .vision-setup,:root[data-theme="dark"] .vision-review-result{border-color:#38516a}
:root[data-theme="dark"] .vision-warning{background:#483522;color:#ffe0a5;border-color:#947040}

/* Dashboard analytic cards use true dark contrast in both chart modes. */
:root[data-theme="dark"] .dashboard-visual-grid{
  --chart-ink:#eaf6ff;--chart-muted:#a5bed1;--chart-grid:#30485e;
  --chart-point-fill:#18293d;--chart-card-bg:#18293d;--chart-tooltip-bg:#0b1727;
  --chart-switch-bg:#102439;--chart-tile-bg:#21354b;--chart-ring-track:#2b4259;
}
:root[data-theme="dark"] .dashboard-chart-switch button.active{background:#29465b;color:#9ef2e2;box-shadow:none}
:root[data-theme="dark"] .chart-highlight-sales{background:#16493f;color:#83ebcf}
:root[data-theme="dark"] .chart-highlight-count{background:#343460;color:#c8baff}
:root[data-theme="dark"] .chart-highlight-average{background:#4a3528;color:#ffdb9e}
:root[data-theme="dark"] .dashboard-analytics-card:before{background:radial-gradient(ellipse at 95% 0%,rgba(31,187,170,.12),transparent 73%)}
:root[data-theme="dark"] .dashboard-status-card:before{background:radial-gradient(ellipse at 90% 0%,rgba(100,112,235,.12),transparent 73%)}
