/* Only light mode overrides these tokens; fallbacks retain each original dark tone. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f7;
  --side: #ffffff;
  --panel: #ffffff;
  --panel-hover: #eef4f4;
  --line: #d8e0e1;
  --text: #202a2c;
  --muted: #5c6b6d;
  --text-body: #354245;
  --text-secondary: #5c6b6d;
  --text-placeholder: #667477;
  --accent-text: #196b73;
  --success-text: #27774f;
  --danger-text: #ac3c3c;
  --surface-subtle: #f5f7f7;
  --surface-feature: #edf7f8;
  --surface-icon: #e4edef;
  --surface-track: #d8e2e3;
  --surface-message: #f0f4f4;
  --surface-message-user: #e8f4f5;
  --border-control: #bfcdd0;
}

.theme-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.theme-control select {
  width: auto;
  min-height: 34px;
  padding: 5px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.auth-theme { display: flex; justify-content: flex-end; margin-bottom: 24px; }
@media (max-width: 767px) {
  .topbar-right .welcome-note { display: none; }
  .topbar-right { flex-shrink: 0; }
  .topbar .theme-control > span { display: none; }
}

/* New Nuva-derived screens use dark fallbacks; these shared light tokens also cover dialogs and inputs. */
html[data-theme="light"]{
 --theme-surface:#fff;--theme-surface-input:#f7f9fa;--theme-surface-muted:#f0f5f6;
 --theme-surface-hover:#e9f2f3;--theme-surface-active:#e4eff1;
 --theme-text-strong:#202a2c;--theme-text:#354245;--theme-text-muted:#5c6b6d;--theme-text-subtle:#68787b;
 --theme-border:#d6e0e2;--theme-border-strong:#b8c8cc;--theme-loading-mask:#fffffff7;
}
html[data-theme="dark"]{color-scheme:dark}
.nuva-layout .sidebar-bottom>.nuva-theme-control{padding:10px 8px;border-top:1px solid var(--line)}
.nuva-layout .sidebar-bottom>.nuva-theme-control .theme-control{display:flex;width:100%;justify-content:space-between;gap:12px}
.nuva-layout .sidebar-bottom>.nuva-theme-control select{flex:1;max-width:140px}
