/* Theme color tokens extend the existing component design system. */
:root{
  color-scheme:light;
  --theme-media-surface:#fff;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --color-text:#e4edf5;
  --color-page:#101923;
  --color-surface:#192735;
  --color-link:#80d1f6;
  --color-brand:#73d7df;
  --color-border:#344b5d;
  --color-border-soft:#304557;
  --color-muted:#b1c3d2;
  --color-hint:#b1c3d2;
  --color-secondary-bg:#243e4e;
  --color-secondary-text:#b9e7f3;
  --color-input-border:#648093;
  --color-focus:#80d1f6;
  --color-eyebrow:#83e0bd;
  --color-table-border:#344b5d;
  --color-table-heading:#bfcedb;
  --color-qr-border:#648093;
  --color-footer:#b1c3d2;
  --color-pill-bg:#243e4e;
  --color-fieldset-border:#344b5d;
  --color-divider:#344b5d;
  --shadow-card:0 7px 24px #00000026;
  --shadow-sidebar:2px 0 18px #00000033;
  --shadow-mobile:0 2px 10px #00000033;
  --alert-danger-border:#b15e68;
  --alert-danger-bg:#452730;
  --alert-danger-text:#ffc4cc;
  --alert-success-border:#438768;
  --alert-success-bg:#163d32;
  --alert-success-text:#a4efd0;
  --badge-default-bg:#163d32;
  --badge-default-text:#a4efd0;
  --badge-neutral-bg:#2b3d4b;
  --badge-neutral-text:#d0dce5;
  --status-success-bg:#163d32;
  --status-success-text:#a4efd0;
  --status-warning-bg:#47381b;
  --status-warning-text:#ffe0a0;
  --status-danger-bg:#452730;
  --status-danger-text:#ffc4cc;
  --status-info-bg:#203d55;
  --status-info-text:#b5e0ff;
  --status-neutral-bg:#2b3d4b;
  --status-neutral-text:#d0dce5;
  --admin-sidebar-start:#102337;
  --admin-sidebar-end:#0d1e2e;
  --admin-heading:#e4edf5;
  --admin-page-bg:#101923;
  --admin-footer:#b1c3d2;
  --admin-guide-end:#1b3538;
  --admin-task-bg:#243e4e;
  --admin-task-text:#b9e7f3;
  --admin-task-hover:#2c4a59;
}

.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid var(--color-input-border);border-radius:var(--radius-button);background:var(--color-surface);color:var(--color-text);font:inherit;font-size:13px;font-weight:650;letter-spacing:normal;cursor:pointer;white-space:nowrap;flex-shrink:0}
.theme-toggle[hidden]{display:none}
.theme-toggle:hover{background:var(--color-secondary-bg)}
.theme-icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-sun{display:none}
:root[data-theme="dark"] .theme-moon{display:none}
:root[data-theme="dark"] .theme-sun{display:block}
.admin-theme-bar{display:flex;justify-content:flex-end;width:min(1200px,100%);margin:0 auto;padding:16px 28px 0}
.admin-mobile-head .theme-toggle{margin-left:auto}
.admin-auth-head{flex-wrap:wrap}
.admin-auth-head .theme-toggle{border-color:var(--admin-nav-border);background:var(--admin-sidebar-end);color:var(--color-on-dark)}
:root[data-theme="dark"] .admin-auth-head{background:var(--admin-sidebar-start)}
.admin-brand img,.admin-mobile-head img,.admin-auth-head img{background:var(--theme-media-surface);border-radius:var(--radius-nav);padding:3px}
:root[data-theme="dark"] .public-app .brand-logo{background:var(--theme-media-surface);border-radius:var(--radius-sm);padding:5px}
.qr{background:var(--theme-media-surface);border-color:var(--theme-media-surface)}
@media(max-width:800px){.admin-theme-bar{display:none}.admin-mobile-head{gap:8px}.admin-mobile-head strong{flex:1}.admin-mobile-head .theme-toggle{padding:8px;gap:5px}}
@media(max-width:360px){.admin-mobile-head img{display:none}}
@media print{.theme-toggle,.admin-theme-bar{display:none!important}}
