:root{--surface:#fff;--surface-alt:#f8faf9;--hover:#fafcfb;--text-on-brand:#fff}
:root[data-theme=blue]{--brand:#174f87;--brand-dark:#103d6b;--ink:#18334c;--muted:#52677b;--ground:#f0f5fa;--line:#d4e0eb;--soft:#e4eef8}
:root[data-theme=dark]{color-scheme:dark;--brand:#80cdb6;--brand-dark:#a1dfcc;--ink:#e4ecef;--muted:#b0c0c8;--ground:#10191e;--line:#3b4d56;--white:#1b282f;--surface:#1b282f;--surface-alt:#22323a;--hover:#293d46;--soft:#243f3b;--amber:#f2ce8d;--amber-bg:#42351e;--red:#ffaaa2;--text-on-brand:#10251e}
body{background:var(--ground);color:var(--ink)}.sidebar,.topbar,.panel,button,input,select,textarea{background-color:var(--surface);color:var(--ink)}button.primary,.mark{background:var(--brand);color:var(--text-on-brand)}button.primary:hover{background:var(--brand-dark)}button:hover{background-color:var(--soft)}.nav button{background:transparent;color:var(--muted)}.nav button.active{background:var(--soft);color:var(--brand)}th,dialog .dialog-foot{background:var(--surface-alt)}tbody tr:hover{background:var(--hover)}th,td{border-color:var(--line)}input,select,textarea{border-color:var(--line)}.stat{background:var(--surface)}dialog{background:var(--surface);color:var(--ink)}.notice{color:var(--amber)}.bar-track{background:var(--surface-alt)}.chip.gray{background:var(--surface-alt);color:var(--muted)}.chip.red{background:var(--amber-bg);color:var(--red)}.text-button{color:var(--brand);background:transparent}.theme-options{display:flex;flex-wrap:wrap;gap:12px}.theme-options button{display:flex;align-items:center;gap:8px}.theme-options [aria-pressed=true]{border:2px solid var(--brand)}.theme-swatch{display:block;width:20px;height:20px;border:1px solid var(--line);border-radius:50%}.swatch-green{background:#165c51}.swatch-blue{background:#174f87}.swatch-dark{background:#10191e}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}.settings-grid .panel-body{display:grid;gap:12px}.settings-grid .field{min-width:0}.lock-panel{max-width:480px;margin:48px auto}.lock-panel .panel-body{display:grid;gap:16px}.side-bottom #settings-button{display:flex;align-items:center;gap:12px;text-align:left}.side-bottom #settings-button .od-icon{--od-icon-size:20px}:root[data-theme=dark] select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e4ecef' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}
@media(max-width:1024px){.settings-grid{grid-template-columns:minmax(0,1fr)}}@media(max-width:768px){.settings-grid{gap:16px}.side-bottom{display:flex;flex-wrap:wrap;margin-top:0;padding:0;border:0}.side-bottom .local-status,.side-bottom>p{display:none}.side-bottom #settings-button{margin-left:auto}.lock-panel{margin:16px auto}}
@media print{body{background:#fff;color:#000}.panel,td,th{background:#fff;color:#000}}

/* Optional glass theme; existing palettes remain independent. */
:root[data-theme=glass]{color-scheme:light;--brand:#155e65;--brand-dark:#104a50;--ink:#17343c;--muted:#465f67;--ground:#e7f0f3;--line:rgba(100,138,149,.32);--white:#f7fbfc;--surface:rgba(255,255,255,.76);--surface-alt:rgba(236,245,248,.88);--hover:rgba(218,237,242,.86);--soft:rgba(212,234,238,.92);--text-on-brand:#fff;--glass-blur:16px;--glass-shadow:0 8px 28px rgba(31,73,88,.08)}
:root[data-theme=glass] body{background:radial-gradient(ellipse at 12% 10%,#c5e4e2 0,transparent 48%),radial-gradient(ellipse at 88% 72%,#d0dfef 0,transparent 52%),var(--ground);background-attachment:fixed}
:root[data-theme=glass] :is(.sidebar,.topbar,.panel,dialog,#person-actions){background:var(--surface);-webkit-backdrop-filter:blur(var(--glass-blur)) saturate(120%);backdrop-filter:blur(var(--glass-blur)) saturate(120%);box-shadow:var(--glass-shadow);border-color:rgba(255,255,255,.85)}
:root[data-theme=glass] .panel{border:1px solid rgba(255,255,255,.85);outline:1px solid rgba(100,138,149,.16)}
:root[data-theme=glass] :is(input,select,textarea){background-color:rgba(255,255,255,.9);border-color:rgba(100,138,149,.48)}
:root[data-theme=glass] button:not(.primary):not(.text-button){background-color:rgba(255,255,255,.65)}
:root[data-theme=glass] button:hover{background-color:var(--soft)}
:root[data-theme=glass] .nav button.active{background:var(--soft);color:var(--brand)}
:root[data-theme=glass] .stat{background:rgba(255,255,255,.62)}
.swatch-glass{background:linear-gradient(135deg,#c5e4e2,#e9f2f9);box-shadow:inset 0 0 0 3px rgba(255,255,255,.65)}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){:root[data-theme=glass]{--surface:#f7fbfc}}
@media(prefers-reduced-transparency:reduce){:root[data-theme=glass]{--surface:#f7fbfc;--glass-blur:0px}}
@media print{:root[data-theme=glass] body{background:#fff}:root[data-theme=glass] :is(.panel,dialog){background:#fff;backdrop-filter:none;box-shadow:none}}
.account-panel .panel-body{display:grid;gap:16px}.account-panel h1{font-size:30px}.account-panel textarea{font-family:ui-monospace,monospace;overflow-wrap:anywhere;word-break:break-all}.account-panel .inline-check{align-items:flex-start}.account-panel .inline-check input{flex:none;margin-top:4px}.account-panel .error:empty,.account-panel [role=status]:empty{display:none}
