/* Shared theme applies to all Razor pages, including the EAN iframe. */
:root[data-theme="light"] { color-scheme:light; --nk-gray-50:#fafbfc; }
:root[data-theme="dark"] {
 color-scheme:dark;
 --nk-background:#000000; --nk-surface:#121212; --nk-black:#ffffff;
 --nk-gray-900:#ffffff; --nk-gray-800:#ffffff; --nk-gray-700:#ffffff;
 --nk-gray-600:#ffffff; --nk-gray-500:#ffffff; --nk-gray-400:#777777;
 --nk-gray-300:#505050; --nk-gray-200:#383838; --nk-gray-100:#202020; --nk-gray-50:#191919;
 --nk-red:#ff4d4d; --nk-red-hover:#ff6666; --nk-red-soft:#2b1010;
 --nk-action:#d9091b; --nk-action-hover:#bb0616;
 --nk-shadow:0 4px 20px #0003;
}
.topbar-actions { display:flex;align-items:center;gap:12px;margin-left:auto;min-width:0; }
.brand-logo { display:block;width:66px;height:42px;object-fit:contain;flex:none; }
.logo-dark { display:none; }
:root[data-theme="dark"] .logo-light { display:none; }
:root[data-theme="dark"] .logo-dark { display:block;border-radius:5px; }
button.theme-toggle { display:grid;place-items:center;flex:none;width:40px;min-height:40px;padding:9px;border:1px solid var(--nk-gray-200);border-radius:50%;background:transparent;color:var(--nk-gray-600); }
button.theme-toggle:hover { background:var(--nk-gray-100);color:var(--nk-black);border-color:var(--nk-gray-400); }
.theme-toggle svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
.theme-toggle .theme-sun { display:none; }
:root[data-theme="dark"] .theme-toggle .theme-sun { display:block; }
:root[data-theme="dark"] .theme-toggle .theme-moon { display:none; }
.panel-theme-toolbar { display:flex;justify-content:flex-end;padding:0 4px 8px; }
:root[data-theme="dark"] .sidebar { background:#0a0a0a; }
:root[data-theme="dark"] :is(.sidebar-link,.sidebar-footer) { color:#ffffff; }
:root[data-theme="dark"] .module-nav { background:#121212f5; }
:root[data-theme="dark"] .metric.warning,
:root[data-theme="dark"] a.manager-kpi:hover,
:root[data-theme="dark"] a.manager-kpi:focus-visible { background:var(--nk-red-soft);border-color:#813030; }
:root[data-theme="dark"] :is(.notice[role="alert"],.scan-status.is-pending,button.danger-link,.settings-tab.is-active) { border-color:#813030; }
:root[data-theme="dark"] .operator-record-pending { background:var(--nk-red-soft);border-color:#813030;color:#ffffff; }
:root[data-theme="dark"] .operator-record-pending > p { color:#ffffff; }
:root[data-theme="dark"] .operator-record-pending .operator-pending-submit { background:var(--nk-action);border-color:var(--nk-action); }
:root[data-theme="dark"] .operator-record-pending .operator-pending-submit:hover { background:var(--nk-action-hover); }
:root[data-theme="dark"] .nk-keyboard { background:#181818;border-color:var(--nk-gray-300);box-shadow:0 -8px 40px #0008; }
:root[data-theme="dark"] .nk-keyboard button { color:var(--nk-black);background:#303030;border-color:#555555;box-shadow:0 2px 0 #000000; }
:root[data-theme="dark"] .nk-keyboard button:active { background:#484848; }
:root[data-theme="dark"] .nk-keyboard-value { background:var(--nk-surface);border-color:var(--nk-gray-300); }
:root[data-theme="dark"] .nk-keyboard-caret { background:#612020; }
:root[data-theme="dark"] .nk-keyboard-actions [data-kb-action="done"] { background:var(--nk-action);color:white; }
:root[data-theme="dark"] .skip-link { background:#202020;color:white; }
:root[data-theme="dark"] .ean-drawer::backdrop { background:#0009; }
:root[data-theme="dark"] .mobile-menu-backdrop:not([hidden]) { background:#0009; }
:root[data-theme="dark"] :focus-visible { outline-color:#ff4d4d; }
@media(max-width:760px) {
 .topbar-actions { gap:5px; }.brand-logo { width:49px;height:34px; }
 button.theme-toggle { width:36px;min-height:36px;padding:7px; }
}
@media(max-width:480px) {
 .topbar-account .account-identity { display:none; }
}
