/* ============================================================
   VPN Reseller Platform — Design Tokens
   Version: 1.0
   ============================================================ */

/* ---- Dark Mode (default) ---------------------------------- */
:root, [data-theme="dark"] {
  /* Backgrounds */
  --bg-page:         #0d1117;
  --bg-surface:      #161b22;
  --bg-elevated:     #1c2128;
  --bg-overlay:      rgba(0,0,0,0.6);

  /* Borders */
  --border:          #30363d;
  --border-subtle:   #21262d;

  /* Text */
  --text-primary:    #e6edf3;
  --text-secondary:  #7d8590;
  --text-tertiary:   #484f58;
  --text-inverse:    #0d1117;

  /* Brand */
  --brand:           #2f81f7;
  --brand-hover:     #388bfd;
  --brand-subtle:    rgba(47,129,247,0.12);

  /* Semantic */
  --success:         #3fb950;
  --success-subtle:  rgba(63,185,80,0.12);
  --warning:         #d29922;
  --warning-subtle:  rgba(210,153,34,0.12);
  --danger:          #f85149;
  --danger-subtle:   rgba(248,81,73,0.12);
  --purple:          #a371f7;
  --purple-subtle:   rgba(163,113,247,0.12);

  /* Shadows */
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:       0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:       0 8px 24px rgba(0,0,0,0.5);

  /* Scrollbar */
  --scrollbar-thumb: #30363d;
  --scrollbar-track: #161b22;
}

/* ---- Light Mode ------------------------------------------- */
[data-theme="light"] {
  --bg-page:         #ffffff;
  --bg-surface:      #f6f8fa;
  --bg-elevated:     #ffffff;
  --bg-overlay:      rgba(0,0,0,0.4);

  --border:          #d0d7de;
  --border-subtle:   #d8dee4;

  --text-primary:    #1f2328;
  --text-secondary:  #656d76;
  --text-tertiary:   #8c959f;
  --text-inverse:    #ffffff;

  --brand:           #0969da;
  --brand-hover:     #0860ca;
  --brand-subtle:    rgba(9,105,218,0.08);

  --success:         #1a7f37;
  --success-subtle:  rgba(26,127,55,0.08);
  --warning:         #9a6700;
  --warning-subtle:  rgba(154,103,0,0.08);
  --danger:          #cf222e;
  --danger-subtle:   rgba(207,34,46,0.08);
  --purple:          #8250df;
  --purple-subtle:   rgba(130,80,223,0.08);

  --shadow-sm:       0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:       0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg:       0 8px 24px rgba(0,0,0,0.15);

  --scrollbar-thumb: #d0d7de;
  --scrollbar-track: #f6f8fa;
}

/* ---- Spacing ---------------------------------------------- */
:root {
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
}

/* ---- Radii ------------------------------------------------- */
:root {
  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   8px;
  --r-xl:   12px;
  --r-pill: 999px;
}

/* ---- Typography -------------------------------------------- */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-11: 11px;
  --text-12: 12px;
  --text-13: 13px;
  --text-14: 14px;
  --text-15: 15px;
  --text-16: 16px;
  --text-18: 18px;
  --text-20: 20px;
  --text-24: 24px;
  --text-32: 32px;
}

/* ---- Transitions ------------------------------------------- */
:root {
  --transition: 150ms ease;
  --transition-slow: 250ms ease;
}

/* ---- Base Reset -------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-14);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; }

/* ---- Scrollbar -------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--r-pill); }

/* ---- RTL support ------------------------------------------ */
[dir="rtl"] {
  font-family: 'Vazirmatn', var(--font-sans);
}
