/*
 * Roozi design tokens — the ONLY place colors are defined.
 * Templates use these variables (or classes in app.css), never raw hex values.
 * Theme is chosen by data-theme on <html>: "dark" | "light".
 * When the user setting is "system", base.html sets it from prefers-color-scheme.
 */

:root,
[data-theme="dark"] {
  --bg: #25293C;
  --surface: #2F3448;
  --surface-2: #3A3F55;
  --sidebar: #1F2232;
  --border: #4A4F66;

  --text: #F5F5F7;
  --text-2: #A9AEC2;
  --text-3: #6B7088;

  --primary: #FFB547;        /* amber — buttons, streak */
  --primary-hover: #FFC56E;
  --primary-text: #FFB547;   /* amber used as text/icons */
  --on-primary: #25293C;     /* text on amber buttons */

  --secondary: #2DD4BF;      /* teal — progress, success states */

  --success: #4ADE80;
  --error: #F87171;
  --warning: #FBBF24;

  /* German noun genders */
  --der: #60A5FA;
  --die: #F87171;
  --das: #4ADE80;

  /* Extra chart colors (admin panel): distinct from the der/die/das colors. */
  --chart-indigo: #818CF8;
  --chart-pink: #F472B6;

  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F1F2F6;
  --sidebar: #F1F2F6;
  --border: #E6E7EC;

  --text: #1E2235;
  --text-2: #5B6078;
  --text-3: #8A8FA3;

  --primary: #FFB547;
  --primary-hover: #FFC56E;
  --primary-text: #B7791F;   /* darker amber for readable text on white */
  --on-primary: #1E2235;

  --secondary: #0D9488;

  --success: #16A34A;
  --error: #DC2626;
  --warning: #B45309;

  --der: #2563EB;
  --die: #DC2626;
  --das: #16A34A;

  --chart-indigo: #4F46E5;
  --chart-pink: #DB2777;

  --shadow: 0 4px 16px rgba(30, 34, 53, 0.08);
  color-scheme: light;
}

:root {
  /* Darker gender colors for text on the amber hero card (same in both themes). */
  --der-strong: #1D4ED8;
  --die-strong: #B91C1C;
  --das-strong: #15803D;

  /* Brand colors of sign-in providers — only for their logos (brand guidelines), never for our UI. */
  --brand-google-blue: #4285F4;
  --brand-google-red: #EA4335;
  --brand-google-yellow: #FBBC05;
  --brand-google-green: #34A853;
  --brand-facebook: #1877F2;
  --brand-logo-bg: #FFFFFF;  /* white circle behind provider logos */
  --brand-google-btn: #1A73E8;   /* button bodies in each provider's own color */
  --brand-facebook-btn: #4267B2;
  --brand-apple-btn: #000000;
  --brand-apple-logo: #000000;
  --on-brand: #FFFFFF;

  /* Chart series, in order (admin panel). Gender colors are never used for non-gender data. */
  --chart-1: var(--primary);
  --chart-2: var(--secondary);
  --chart-3: var(--chart-indigo);
  --chart-4: var(--chart-pink);
  --chart-5: var(--text-3);

  --radius-card: 16px;
  --radius-btn: 12px;
  --radius-pill: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --font-fa: "Vazirmatn", system-ui, sans-serif;
  --font-de: "Inter", system-ui, sans-serif;
}
