/* Origon — shared theme palette and theme toggle (dark is the default; light is html[data-theme="light"]). */
:root {
  color-scheme: dark;
  --fill-1: rgba(255,255,255,0.04);
  --fill-2: rgba(255,255,255,0.07);
  --line:   rgba(255,255,255,0.06);
  --chart-grid: rgba(255,255,255,0.05);
  --donut-empty: rgba(255,255,255,0.06);
}

html[data-theme="light"] {
  color-scheme: light;
  --black:    #F3F6FB;
  --navy:     #FFFFFF;
  --surface:  #E8EEF7;
  --teal:     #00846F;
  --teal-2:   #006B5A;
  --violet:   #6A28E8;
  --violet-l: #5B2FD0;
  --gold:     #A06A00;
  --gold-dim: #8A5A00;
  --danger:   #D42B50;
  --text:     #0F1B2D;
  --muted:    #5A6B82;
  --border:   rgba(10,40,90,0.13);
  --border-2: rgba(10,40,90,0.08);
  --glow-t:   rgba(0,200,160,0.16);
  --glow-v:   rgba(123,47,255,0.12);
  --fill-1:   rgba(15,35,70,0.035);
  --fill-2:   rgba(15,35,70,0.07);
  --line:     rgba(15,35,70,0.09);
  --chart-grid: rgba(15,35,70,0.07);
  --donut-empty: rgba(15,35,70,0.07);
}

/* ── Theme toggle ── */
.theme-toggle {
  position: relative;
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  background: var(--fill-1);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }
.theme-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .ic-moon { display: none; }
html[data-theme="light"] .theme-toggle .ic-sun { display: none; }
html[data-theme="light"] .theme-toggle .ic-moon { display: block; }
.theme-toggle.floating { position: fixed; top: 16px; right: 16px; z-index: 1000; background: var(--navy); }
.auth-actions { display: inline-flex; align-items: center; gap: 10px; }

/* Smooth cross-fade only while the user flips the theme. */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, fill .25s ease, stroke .25s ease !important;
}
