/* ============================================================
   TERRA PREP — SHARED THEME SYSTEM
   Include this on EVERY page, before the page's own CSS.
   ============================================================ */

:root {
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-shadow: 0 12px 40px rgba(0, 20, 40, 0.10);
  --deep-blue: #0B2A3C;
  --deep-blue-soft: #1A3B4F;
  --ink: #1A2E3B;
  --ink-soft: #3A4F5E;
  --muted: #748A98;
  --muted-light: #B4C8D4;
  --gold: #D4A853;
  --gold-bright: #EAC072;
  --gold-glow: rgba(212, 168, 83, 0.15);
  --white-glass: rgba(255, 255, 255, 0.55);
  --card-bg: rgba(255, 255, 255, 0.55);
  --border-light: rgba(11, 42, 60, 0.08);
  --body-bg: linear-gradient(135deg, #D6E4FF 0%, #E8D5FF 40%, #D5F5E3 100%);
  --danger: #F2545F;
  --danger-dim: rgba(242, 84, 95, 0.12);
  --mint: #3ED598;
  --blue: #5B7FFF;
  --violet: #8B7CF6;
  --amber: #F0B03C;
  --blue-soft: rgba(91, 127, 255, 0.12);
  --violet-soft: rgba(139, 124, 246, 0.12);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --input-bg: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --glass-bg: rgba(16, 28, 38, 0.55);
  --glass-border: rgba(237, 230, 211, 0.10);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --deep-blue: #F1EADA;
  --deep-blue-soft: #D9CFB8;
  --ink: #E7E1D2;
  --ink-soft: #B9C2C8;
  --muted: #8494A0;
  --muted-light: #45535C;
  --gold: #E3B368;
  --gold-bright: #F7C177;
  --gold-glow: rgba(227, 179, 104, 0.16);
  --white-glass: rgba(255, 255, 255, 0.045);
  --card-bg: rgba(255, 255, 255, 0.045);
  --border-light: rgba(237, 230, 211, 0.10);
  --body-bg: #05060C;
  --panel-strong: rgba(30, 50, 65, 0.8);
  --input-bg: rgba(255, 255, 255, 0.06);
  --blue-soft: rgba(91, 127, 255, 0.15);
  --violet-soft: rgba(139, 124, 246, 0.15);
}

html, body {
  background: var(--body-bg);
  color: var(--ink);
  transition: background .35s ease, color .35s ease;
}

/* Shared theme toggle button — paste the matching HTML on any page */
.theme-toggle {
  background: var(--white-glass);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--deep-blue);
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover { background: var(--gold-glow); border-color: var(--gold); }
.theme-icon {
  position: absolute; top: 50%; left: 50%;
  margin: -8.5px 0 0 -8.5px;
  width: 17px; height: 17px;
  stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity .25s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.theme-icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
