/* Theme controls are shared by every account and the private login page. */
:root{color-scheme:light;--theme-surface:#fff;--theme-soft:#f1eff9;--theme-text:#34364f;--theme-muted:#74788f;--theme-border:#e2dfed;--theme-accent:#5459bb}
.theme-picker{position:relative;flex:none;color:var(--theme-text);font-size:12px;text-align:left}
.theme-picker>summary{display:flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:8px 10px;border:1px solid var(--theme-border);border-radius:11px;list-style:none;cursor:pointer;white-space:nowrap;background:var(--theme-surface);font-weight:600}
.theme-picker>summary::-webkit-details-marker{display:none}
.theme-picker>summary:hover,.theme-picker[open]>summary{background:var(--theme-soft)}
.theme-picker svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;flex:none}.theme-picker svg path{fill:currentColor;stroke:none}
.theme-menu{position:absolute;right:0;top:calc(100% + 9px);width:240px;max-width:calc(100vw - 32px);padding:12px;border:1px solid var(--theme-border);border-radius:16px;background:var(--theme-surface);box-shadow:0 12px 40px #080d2026;z-index:50}
.theme-menu-title{padding:2px 9px 10px;font-size:11px;color:var(--theme-muted);font-weight:600}
.theme-menu button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:42px;padding:10px;border:0;border-radius:9px;background:transparent;color:var(--theme-text);font:inherit;text-align:left;cursor:pointer}
.theme-menu button:hover{background:var(--theme-soft)}.theme-menu button[aria-pressed=true]{background:var(--theme-soft);color:var(--theme-accent);font-weight:600}
.theme-check{visibility:hidden}.theme-menu button[aria-pressed=true] .theme-check{visibility:visible}
.theme-menu .theme-schedule{font-size:11px;line-height:1.6;color:var(--theme-muted);padding:12px 9px 2px;margin-top:8px;border-top:1px solid var(--theme-border)}
.private-login .theme-picker{margin-right:auto}.private-login .theme-menu{left:0;right:auto}
.theme-picker :focus-visible{outline:2px solid var(--theme-accent);outline-offset:3px}
/* Give the extra control room in the existing top navigation. */
@media(min-width:1181px) and (max-width:1600px){.workspace .appbar{grid-template-columns:1fr auto}.appbar .langbox{grid-column:2}.nav-main{grid-row:2;grid-column:1/-1;justify-content:flex-start;overflow-x:auto}.nav-sub{grid-row:3;justify-content:flex-start}}
@media(max-width:700px){.appbar .theme-picker>summary{padding:8px;min-width:42px}.appbar .theme-picker [data-theme-label]{display:none}.appbar-in .langbox{max-width:190px}}
@media(max-width:380px){.workspace .appbar{column-gap:8px}.appbar .brand{gap:7px;font-size:18px}.appbar .brand small{display:none}.appbar .brand-mark{width:32px;height:32px}.appbar-in .langbox{max-width:150px}.appbar .lang,.appbar .nav-logout{padding-left:5px;padding-right:5px}}

/* Screen-only tokens leave printed reports on white paper. */
@media screen{
  :root[data-theme=dark]{color-scheme:dark;--paper:#11131b;--card:#1b1e2b;--ink:#e7ebf4;--muted:#adb5cb;--line:#34394d;--night:#bbc5ed;--night-2:#b4b6ff;--day:#edcf9a;--day-soft:#b99a6a;--ok:#9be1c3;--danger:#ffafa8;--theme-surface:#1b1e2b;--theme-soft:#2b2e46;--theme-text:#e7ebf4;--theme-muted:#adb5cb;--theme-border:#3c425b;--theme-accent:#c2c3ff}
  [data-theme=dark] body,[data-theme=dark] body.workspace,[data-theme=dark] body.login-bg,[data-theme=dark] .login-bg .wrap{background:var(--paper);color:var(--ink)}
  [data-theme=dark] .workspace .appbar{background:#171a25;box-shadow:0 1px 0 var(--line);color:var(--ink)}
  [data-theme=dark] .workspace-top{background:transparent}
  [data-theme=dark] .nav a{color:var(--muted)}
  [data-theme=dark] .nav a:hover,[data-theme=dark] .nav-sub a.on{background:#2b2e46;color:#ceceff}
  [data-theme=dark] .nav-main a.on{background:#555fc5;color:#fff}
  [data-theme=dark] .lang:hover,[data-theme=dark] .lang[aria-current=true]{background:#2b3541;color:#d3eddd}
  [data-theme=dark] .owner-preview-link,[data-theme=dark] .owner-preview-bar{background:#29283d;border-color:#44415e;color:#cfc1ef}
  [data-theme=dark] .owner-preview-bar a{color:#dcd2f4}
  [data-theme=dark] .demo-banner{background:#3c3227!important;color:#edcf9a!important}

  [data-theme=dark] :is(.private-login,.card,.setblock,.place-form,.row-form,.day-block,.dir-row,.property-card,.complex-card,.team-card,.scroll-x,.wallet-card,.finance-panel,.finance-kpis article,.hotel-kpis article,.expense-direction,.hotel-tabs a,.tab,.hero-card){background:var(--card);border-color:var(--line);color:var(--ink);box-shadow:none}
  [data-theme=dark] :is(.cols2,.cols3)>.block{background:var(--card);border-color:var(--line);color:var(--ink);box-shadow:none}
  [data-theme=dark] :is(.payroll-people article,.owner-object,.expense-category,.expense-purchases,.hotel-stay-card,.hotel-employee-stats,.history-change>div,.shift-rules span,.salary-box,.steps code,.empty,.photo-box){background:#222635;border-color:var(--line);color:var(--ink)}
  [data-theme=dark] :is(.page-title,.seth,.property-title,.complex-card strong,.team-amount,.team-facts b,.team-bonus,.finance-heading h1,.entry-edit .finance-form,.owner-other-balances b,.owner-object-pair b,.expense-days b,.hotel-kpis strong,.hotel-stay-card strong,.hotel-employee-stats b,.hotel-large,.hotel-methods b,.history-shift-date,.expense-category){color:var(--ink)}
  [data-theme=dark] :is(.property-sub,.property-stats span,.property-meta,.complex-card span,.team-head small,.team-facts,.day-head,.dr-time,.finance-heading p,.finance-muted,.finance-kpis span,.finance-kpis small,.finance-kpis p,.finance-entry p,.finance-entry strong small,.payroll-people strong small,.payroll-people p,.expense-usd,.finance-empty,.audit-line,.owner-total>.eyebrow,.owner-date-note,.owner-breakdown p,.owner-breakdown small,.owner-object-result>span,.owner-object-result small,.owner-object-pair,.expense-scope,.expense-category .finance-row span,.expense-category p,.expense-purchases span small,.expense-chart>div,.expense-days,.hotel-kpis span,.hotel-kpis p,.hotel-legend,.hotel-empty,.hotel-stay-card p,.hotel-employee-stats span,.hotel-cost .finance-row,.hotel-cost small,.hotel-methods span,.history-change span){color:var(--muted)}
  [data-theme=dark] :is(.finance-heading .eyebrow,.wallet-icon,.wallet-link,.finance-period a,.entry-edit,.owner-other-balances a,.owner-more,.owner-section-heading .eyebrow,.hotel-back,.hotel-empty>span,.hotel-empty h3,.complex-card b,.property-foot a,.login-password .password-toggle){color:#c0b4ef}
  [data-theme=dark] :is(.property-stats,.team-facts,.finance-entry,.audit-line,.owner-other-balances a,.owner-object-pair,.expense-purchases>div,.expense-list-filter,.hotel-calendar,.hotel-calendar th,.hotel-calendar td,.hotel-daily-table th,.hotel-daily-table td,.day-row,.an-row,.mon-row,.shift-row,.kv,.tbl td){border-color:var(--line)}
  [data-theme=dark] :is(.dir-row:hover,.property-card:hover,.owner-object:hover){background:#252a3b;border-color:#66678c}

  [data-theme=dark] :is(input,select,textarea),[data-theme=dark] .gate-form input,[data-theme=dark] .wallet-home input{background:#181c28;color:var(--ink);border-color:#48506a;color-scheme:dark}
  [data-theme=dark] ::placeholder{color:#9ca5be;opacity:1}
  [data-theme=dark] :is(input,select,textarea):focus{border-color:#afb2ff;outline-color:#555b87}
  [data-theme=dark] :focus-visible{outline-color:#b4b6ff}
  [data-theme=dark] input:autofill{background:#242b41;color:var(--ink)}
  [data-theme=dark] input:-webkit-autofill{-webkit-text-fill-color:var(--ink);-webkit-box-shadow:0 0 0 1000px #242b41 inset;caret-color:var(--ink)}
  [data-theme=dark] .btn{background:#36426c;color:#f7f8ff}
  [data-theme=dark] .btn-small,[data-theme=dark] .wallet-archive .btn{background:#2b2e46;color:#d0d2ff}
  [data-theme=dark] .btn-primary,[data-theme=dark] .btn-primary.btn-small{background:#575fc6;color:#fff}
  [data-theme=dark] :is(.btn-ok,.btn-in,.btn-pay,.okmark){background:#256b58;color:#fff}
  [data-theme=dark] :is(.btn-danger,.day-row .btn-x){background:#422930;color:#ffafa8}
  [data-theme=dark] .btn:hover:not(:disabled){filter:brightness(1.12)}
  [data-theme=dark] .tab.on,[data-theme=dark] .hotel-tabs a.active{background:#514876;border-color:#8376ae;color:#fff}
  [data-theme=dark] :is(.property-icon,.avatar,.entry-symbol,.finance-pill,.tag-night){background:#302d48;color:#d0c1fa}
  [data-theme=dark] .property-card:nth-child(3n+2) .property-icon{background:#243d37;color:#a2dcca}
  [data-theme=dark] .property-card:nth-child(3n+3) .property-icon{background:#3c3227;color:#edcf9a}
  [data-theme=dark] :is(.finance-notice,.tag-day,.tag-wait,.badge-wait,.net-bad,.offsite){background:#3c3227;color:#edcf9a;border-color:#615239}
  [data-theme=dark] .alarm{color:#edcf9a}
  [data-theme=dark] .card.card-pending{background:#302c25}
  [data-theme=dark] :is(.tag-ok,.badge-ok,.pill-ok,.entry-income,.net-ok,.alert.ok){background:#203e36;color:#9be1c3}
  [data-theme=dark] :is(.tag-bad,.badge-no,.alert.error,.danger-card){background:#422930;color:#ffafa8;border-color:#69404a}
  [data-theme=dark] .danger-card .seth,[data-theme=dark] .team-deduction{color:#ffafa8}
  [data-theme=dark] .alert,[data-theme=dark] .alert.wait{background:#2b2e46;color:#d0d2ff}

  [data-theme=dark] .summary .sum-grid>div,[data-theme=dark] .expense-kpis .expense-paid,[data-theme=dark] .hotel-kpis article:first-child{background:#292b44;border-color:#3d405b}
  [data-theme=dark] .summary .sum-grid>div:nth-child(2){background:#21372f;border-color:#385248}
  [data-theme=dark] .summary .sum-grid>div:nth-child(3){background:#352f26;border-color:#524739}
  [data-theme=dark] .summary .sum-grid b{color:var(--ink)}
  [data-theme=dark] .summary .sum-grid span{color:#b9c1d4}
  [data-theme=dark] .summary .sum-grid b.plus,[data-theme=dark] .owner-object-result strong{color:#9be1c3}
  [data-theme=dark] .summary .sum-grid b.minus,[data-theme=dark] .owner-object-result .owner-negative{color:#ffafa8}
  [data-theme=dark] .sum-main,[data-theme=dark] .status-open{background:#29334b;color:#f4f5fb;border-color:#485371}
  [data-theme=dark] .wallet-card.wallet-home{background:linear-gradient(130deg,#2e2b46,#413652);border-color:#584b6e;color:#f3f0fa}
  [data-theme=dark] .wallet-home .finance-pill{background:#ffffff15;color:#e0d2f2}
  [data-theme=dark] .wallet-stats span,[data-theme=dark] .wallet-amount small,[data-theme=dark] .wallet-opening summary{opacity:.85}
  [data-theme=dark] .expense-direction.selected{background:#3d3556;border-color:#9181b6;color:#f4efff}
  [data-theme=dark] .expense-category.selected{border-color:#a997d2}

  [data-theme=dark] :is(.tbl th,.tbl-grid thead th.sticky,.grid-group td,.grid-group .sticky,.tbl-total td){background:#262b3c;color:#c2c9dc;border-color:var(--line)}
  [data-theme=dark] .tbl tbody tr:hover{background:#24293a}
  [data-theme=dark] .paid-row,[data-theme=dark] .row-paid{background:#23342f}
  [data-theme=dark] .hotel-calendar th:first-child{background:var(--card);color:var(--ink)}
  [data-theme=dark] :is(.hotel-calendar thead th,.hotel-calendar th small,.hotel-calendar tfoot td,.hotel-daily-table th,.hotel-daily-table td){color:var(--muted)}
  [data-theme=dark] .hotel-calendar .selected-day{background:#302d46}
  [data-theme=dark] .room-free{background:#242735;color:#9da6c0}
  [data-theme=dark] .room-free:hover,[data-theme=dark] .room-free:focus{background:#48405e;color:#f0e4ff}
  [data-theme=dark] .room-empty{color:#9da6c0}
  [data-theme=dark] .state-booked{background:#4a3c25;color:#f1d399}
  [data-theme=dark] .state-checked_in{background:#264a40;color:#b3e6d2}
  [data-theme=dark] .state-checked_out{background:#3e3552;color:#d5c5ec}
  [data-theme=dark] :is(.scale-track,.bar,.an-bar,.mon-bar,.team-progress,.owner-bar,.expense-share,.expense-chart-track,.hotel-cost-track){background:#35394e}
  [data-theme=dark] .feedback-toast{background:#252a3c;border-color:#555e7e;color:var(--ink);box-shadow:0 12px 40px #0005}
  [data-theme=dark] .toast-close{background:#383e54;color:var(--ink)}
  [data-theme=dark] .skip-link{background:var(--card);color:var(--ink)}
  [data-theme=dark] ::selection{background:#575080;color:#fff}
}
@media print{.theme-picker{display:none!important}}
