/* Fallback tokens also cover pages without the PrimeVue runtime. */
:root {
  color-scheme: light;
  --ivp-ground: var(--surface-ground, #f5f7fa);
  --ivp-surface: var(--surface-card, #ffffff);
  --ivp-text: var(--text-color, #334155);
  --ivp-muted: var(--text-color-secondary, #475569);
  --ivp-border: var(--surface-border, #e2e8f0);
  --ivp-soft: var(--surface-hover, #f1f5f9);
  --ivp-accent: var(--primary-color, #0369a1);
  --ivp-accent-contrast: var(--primary-contrast-color, #ffffff);
  --ivp-active: #e0f2fe;
  --ivp-field-border: #64748b;
  --ivp-danger: #b91c1c;
  --ivp-positive: #166534;
  --ivp-positive-bg: #f0fdf4;
}
:root.app-dark {
  color-scheme: dark;
  --ivp-ground: var(--surface-ground, #09090b);
  --ivp-surface: var(--surface-card, #18181b);
  --ivp-text: var(--text-color, #fafafa);
  --ivp-muted: var(--text-color-secondary, #a1a1aa);
  --ivp-border: var(--surface-border, #3f3f46);
  --ivp-soft: var(--surface-hover, #27272a);
  --ivp-accent: var(--primary-color, #7dd3fc);
  --ivp-accent-contrast: var(--primary-contrast-color, #18181b);
  --ivp-active: #123347;
  --ivp-field-border: #a1a1aa;
  --ivp-danger: #fca5a5;
  --ivp-positive: #86efac;
  --ivp-positive-bg: #143025;
}
html, body { background: var(--ivp-ground); color: var(--ivp-text); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--ivp-field-border); border-radius: .65rem;
  background: var(--ivp-surface); color: var(--ivp-text); cursor: pointer;
}
.theme-toggle:hover { background: var(--ivp-soft); }
.theme-toggle:focus-visible { outline: 2px solid var(--ivp-accent); outline-offset: 3px; }
.theme-toggle svg { width: 21px; height: 21px; }
.theme-toggle .theme-sun, .app-dark .theme-toggle .theme-moon { display: none; }
.app-dark .theme-toggle .theme-sun { display: block; }