/* store-profit - dark theme (Settings -> Appearance).
 * data-theme="dark" forces it; data-theme="system" follows the OS setting.
 * Only colours change: the tokens are redefined, and the handful of rules in
 * the design sheet that use literal light colours get dark counterparts. */
:root[data-theme="dark"]{--bg:#101113;--surface:#17181B;--subtle:#1C1E22;--sunk:#222429;
--line:#2A2C31;--line-2:#393C43;
--ink:#ECEDEF;--ink-2:#C8CAD0;--muted:#9A9EA6;--faint:#70747C;
--accent:#8594FF;--accent-ink:#AEB8FF;--accent-soft:#1E2240;--accent-line:#3B4585;
--pos:#4FC48C;--pos-soft:#13281D;--pos-line:#245A3F;
--warn:#F0B55E;--warn-soft:#2A2113;--warn-line:#5E4721;--warn-icon:#F0B55E;
--neg:#F47C71;--neg-soft:#2E1716;--neg-line:#612C28;
--refund:#EA8F8F;
color-scheme:dark;}
:root[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
:root[data-theme="dark"] .btn.pri,:root[data-theme="dark"] .chip.on,:root[data-theme="dark"] .pg.on{background:var(--ink);border-color:var(--ink);color:#111214}
:root[data-theme="dark"] .btn.pri:hover{background:#FFFFFF;color:#111214}
:root[data-theme="dark"] .btn.acc{color:#0F1330}
:root[data-theme="dark"] .btn[disabled],:root[data-theme="dark"] .btn.dis{background:var(--sunk);border-color:var(--line);color:var(--faint)}
:root[data-theme="dark"] .nav.on{background:rgba(255,255,255,.06)}
:root[data-theme="dark"] .seg button.on{background:#2E3036;box-shadow:0 0 0 1px var(--line-2)}
:root[data-theme="dark"] .metric.hero{background:var(--surface)}
:root[data-theme="dark"] .tbl tbody tr:hover td{background:var(--subtle)}
:root[data-theme="dark"] .tbl tr.hov td{background:var(--subtle)}
:root[data-theme="dark"] .tbl tr.sel td,:root[data-theme="dark"] #ads tr.sel td{background:var(--accent-soft)}
:root[data-theme="dark"] .scope.on{background:var(--accent-soft)}
:root[data-theme="dark"] .scope:hover{border-color:var(--line-2)}
:root[data-theme="dark"] .nrow.unread{background:#1A1D27}
:root[data-theme="dark"] .banner.warn .bi{background:#3A2D15}
:root[data-theme="dark"] .banner.bad .bi{background:#3D1D1A}
:root[data-theme="dark"] .banner.ok .bi{background:#18352A}
:root[data-theme="dark"] .banner.info .bi{background:#262B52}
:root[data-theme="dark"] .sk{background:linear-gradient(90deg,var(--sunk),var(--subtle),var(--sunk))}
:root[data-theme="dark"] .radio,:root[data-theme="dark"] .tdot{background:var(--surface)}
:root[data-theme="dark"] .tdot.cur{background:var(--ink);box-shadow:inset 0 0 0 3px var(--surface)}
:root[data-theme="dark"] .savebar,:root[data-theme="dark"] .bulkbar{background:#26282E;box-shadow:0 12px 32px rgba(0,0,0,.5)}
:root[data-theme="dark"] .savebar .btn.pri,:root[data-theme="dark"] .bulkbar .btn.pri{background:#FFFFFF;color:#111214;border-color:#FFFFFF}
:root[data-theme="dark"] .tabs{background:rgba(23,24,27,.96)}
:root[data-theme="dark"] .modal,:root[data-theme="dark"] .drawer,:root[data-theme="dark"] .sr-list{box-shadow:0 24px 64px rgba(0,0,0,.6)}
:root[data-theme="dark"] .scrim,:root[data-theme="dark"] .sheet{background:rgba(0,0,0,.6)}
:root[data-theme="dark"] .tl .o.hit{background:#2A3160;border-color:#4A56A8}
:root[data-theme="dark"] .card.missing{border-color:#6B5424}
:root[data-theme="dark"] .miss,:root[data-theme="dark"] .ptag,:root[data-theme="dark"] .ul-partial{border-color:#8A6A2E}
:root[data-theme="dark"] .seg.cogs{background:#6F6D66}
:root[data-theme="dark"] .seg.gp{background:var(--ink)}
:root[data-theme="dark"] .input,:root[data-theme="dark"] .select,:root[data-theme="dark"] .affix,:root[data-theme="dark"] .search,:root[data-theme="dark"] .dr,:root[data-theme="dark"] .srch{background:var(--surface);color:var(--ink);border-color:var(--line-2)}
:root[data-theme="dark"] .srch{background:var(--subtle)}
:root[data-theme="dark"] .affix > span,:root[data-theme="dark"] .affix span{color:var(--muted)}
:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea{color:var(--ink)}
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(.85)}
:root[data-theme="dark"] .kbd{background:var(--sunk);border-color:var(--line-2)}
:root[data-theme="dark"] .emptyic{background:var(--sunk);border-color:var(--line)}
:root[data-theme="dark"] .userav{background:var(--sunk);color:var(--ink)}
:root[data-theme="dark"] .skip-link{background:var(--ink);color:#111214}
:root[data-theme="dark"] .sw2{background:var(--line-2)}
:root[data-theme="dark"] .sw2.on{background:var(--accent)}
:root[data-theme="dark"] .codeblk{background:#0B0C0E}
:root[data-theme="dark"] .mark svg{stroke:#111214}
:root[data-theme="dark"] .stepn.done{color:#111214}
:root[data-theme="dark"] .stepn.done svg{stroke:#111214}
:root[data-theme="dark"] .mbell .bdg{border-color:var(--bg)}
:root[data-theme="dark"] [data-auth-split] > .wide-only{background:#1C1E22 !important;border-right:1px solid var(--line)}
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(.9);opacity:.75}

@media (prefers-color-scheme: dark) {
:root[data-theme="system"]{--bg:#101113;--surface:#17181B;--subtle:#1C1E22;--sunk:#222429;
--line:#2A2C31;--line-2:#393C43;
--ink:#ECEDEF;--ink-2:#C8CAD0;--muted:#9A9EA6;--faint:#70747C;
--accent:#8594FF;--accent-ink:#AEB8FF;--accent-soft:#1E2240;--accent-line:#3B4585;
--pos:#4FC48C;--pos-soft:#13281D;--pos-line:#245A3F;
--warn:#F0B55E;--warn-soft:#2A2113;--warn-line:#5E4721;--warn-icon:#F0B55E;
--neg:#F47C71;--neg-soft:#2E1716;--neg-line:#612C28;
--refund:#EA8F8F;
color-scheme:dark;}
:root[data-theme="system"] body{background:var(--bg);color:var(--ink)}
:root[data-theme="system"] .btn.pri,:root[data-theme="system"] .chip.on,:root[data-theme="system"] .pg.on{background:var(--ink);border-color:var(--ink);color:#111214}
:root[data-theme="system"] .btn.pri:hover{background:#FFFFFF;color:#111214}
:root[data-theme="system"] .btn.acc{color:#0F1330}
:root[data-theme="system"] .btn[disabled],:root[data-theme="system"] .btn.dis{background:var(--sunk);border-color:var(--line);color:var(--faint)}
:root[data-theme="system"] .nav.on{background:rgba(255,255,255,.06)}
:root[data-theme="system"] .seg button.on{background:#2E3036;box-shadow:0 0 0 1px var(--line-2)}
:root[data-theme="system"] .metric.hero{background:var(--surface)}
:root[data-theme="system"] .tbl tbody tr:hover td{background:var(--subtle)}
:root[data-theme="system"] .tbl tr.hov td{background:var(--subtle)}
:root[data-theme="system"] .tbl tr.sel td,:root[data-theme="system"] #ads tr.sel td{background:var(--accent-soft)}
:root[data-theme="system"] .scope.on{background:var(--accent-soft)}
:root[data-theme="system"] .scope:hover{border-color:var(--line-2)}
:root[data-theme="system"] .nrow.unread{background:#1A1D27}
:root[data-theme="system"] .banner.warn .bi{background:#3A2D15}
:root[data-theme="system"] .banner.bad .bi{background:#3D1D1A}
:root[data-theme="system"] .banner.ok .bi{background:#18352A}
:root[data-theme="system"] .banner.info .bi{background:#262B52}
:root[data-theme="system"] .sk{background:linear-gradient(90deg,var(--sunk),var(--subtle),var(--sunk))}
:root[data-theme="system"] .radio,:root[data-theme="system"] .tdot{background:var(--surface)}
:root[data-theme="system"] .tdot.cur{background:var(--ink);box-shadow:inset 0 0 0 3px var(--surface)}
:root[data-theme="system"] .savebar,:root[data-theme="system"] .bulkbar{background:#26282E;box-shadow:0 12px 32px rgba(0,0,0,.5)}
:root[data-theme="system"] .savebar .btn.pri,:root[data-theme="system"] .bulkbar .btn.pri{background:#FFFFFF;color:#111214;border-color:#FFFFFF}
:root[data-theme="system"] .tabs{background:rgba(23,24,27,.96)}
:root[data-theme="system"] .modal,:root[data-theme="system"] .drawer,:root[data-theme="system"] .sr-list{box-shadow:0 24px 64px rgba(0,0,0,.6)}
:root[data-theme="system"] .scrim,:root[data-theme="system"] .sheet{background:rgba(0,0,0,.6)}
:root[data-theme="system"] .tl .o.hit{background:#2A3160;border-color:#4A56A8}
:root[data-theme="system"] .card.missing{border-color:#6B5424}
:root[data-theme="system"] .miss,:root[data-theme="system"] .ptag,:root[data-theme="system"] .ul-partial{border-color:#8A6A2E}
:root[data-theme="system"] .seg.cogs{background:#6F6D66}
:root[data-theme="system"] .seg.gp{background:var(--ink)}
:root[data-theme="system"] .input,:root[data-theme="system"] .select,:root[data-theme="system"] .affix,:root[data-theme="system"] .search,:root[data-theme="system"] .dr,:root[data-theme="system"] .srch{background:var(--surface);color:var(--ink);border-color:var(--line-2)}
:root[data-theme="system"] .srch{background:var(--subtle)}
:root[data-theme="system"] .affix > span,:root[data-theme="system"] .affix span{color:var(--muted)}
:root[data-theme="system"] input,:root[data-theme="system"] select,:root[data-theme="system"] textarea{color:var(--ink)}
:root[data-theme="system"] input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(.85)}
:root[data-theme="system"] .kbd{background:var(--sunk);border-color:var(--line-2)}
:root[data-theme="system"] .emptyic{background:var(--sunk);border-color:var(--line)}
:root[data-theme="system"] .userav{background:var(--sunk);color:var(--ink)}
:root[data-theme="system"] .skip-link{background:var(--ink);color:#111214}
:root[data-theme="system"] .sw2{background:var(--line-2)}
:root[data-theme="system"] .sw2.on{background:var(--accent)}
:root[data-theme="system"] .codeblk{background:#0B0C0E}
:root[data-theme="system"] .mark svg{stroke:#111214}
:root[data-theme="system"] .stepn.done{color:#111214}
:root[data-theme="system"] .stepn.done svg{stroke:#111214}
:root[data-theme="system"] .mbell .bdg{border-color:var(--bg)}
:root[data-theme="system"] [data-auth-split] > .wide-only{background:#1C1E22 !important;border-right:1px solid var(--line)}
:root[data-theme="system"] input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(.9);opacity:.75}
}
