/* ==========================================================================
   POLDEN DESIGN SYSTEM v3.2 — CANONICAL TOKENS & BASE STYLES
   SSOT: POLDEN_INFRA/design-system/css/polden-tokens.css
   Direction: Minimalist Technical UI (Stripe / Cloudflare Docs aesthetic)
   Rules:
   - Self-hosted Inter + JetBrains Mono (.woff2), zero external CDN requests
   - No brand wallpapers/backgrounds, no display brand fonts (Gilroy banned)
   - Delicate monochrome logo mark (24px–28px in navbar, 44px on login card)
   - Full Light & Dark theme parity + RU/EN i18n
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/Inter-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/Inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/Inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/Inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/JetBrainsMono-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/JetBrainsMono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/JetBrainsMono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/JetBrainsMono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   1. Light Theme Tokens (Default)
   -------------------------------------------------------------------------- */
:root,
html[data-polden-theme="light"] {
  --polden-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --polden-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --polden-bg: #F8FAFC;
  --polden-bg-canvas: #FFFFFF;
  --polden-bg-elevated: #FFFFFF;
  --polden-bg-subtle: #F1F5F9;
  --polden-bg-hover: #F1F5F9;
  --polden-bg-input: #FFFFFF;
  --polden-header-bg: rgba(255, 255, 255, 0.94);

  --polden-border: #E2E8F0;
  --polden-border-strong: #CBD5E1;

  --polden-text: #0F172A;
  --polden-text-secondary: #475569;
  --polden-text-muted: #64748B;

  --polden-accent: #2563EB;
  --polden-accent-hover: #1D4ED8;
  --polden-accent-text: #2563EB;
  --polden-accent-soft: rgba(37, 99, 235, 0.08);
  --polden-accent-border: rgba(37, 99, 235, 0.28);
  --polden-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.16);

  --polden-success: #059669;
  --polden-success-soft: #ECFDF5;
  --polden-success-border: #A7F3D0;

  --polden-warning: #D97706;
  --polden-warning-soft: #FFFBEB;
  --polden-warning-border: #FDE68A;

  --polden-danger: #DC2626;
  --polden-danger-soft: #FEF2F2;
  --polden-danger-border: #FECACA;

  --polden-radius-sm: 6px;
  --polden-radius-md: 8px;
  --polden-radius-lg: 12px;
  --polden-radius-xl: 14px;

  --polden-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --polden-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --polden-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
}

/* --------------------------------------------------------------------------
   2. Dark Theme Tokens
   -------------------------------------------------------------------------- */
html[data-polden-theme="dark"],
html.dark,
body.dark {
  --polden-bg: #080A0F;
  --polden-bg-canvas: #0B0D13;
  --polden-bg-elevated: #0E1118;
  --polden-bg-subtle: #131722;
  --polden-bg-hover: #191F2E;
  --polden-bg-input: #131722;
  --polden-header-bg: rgba(14, 17, 24, 0.92);

  --polden-border: #1E2638;
  --polden-border-strong: #263044;

  --polden-text: #F8FAFC;
  --polden-text-secondary: #94A3B8;
  --polden-text-muted: #64748B;

  --polden-accent: #2563EB;
  --polden-accent-hover: #3B82F6;
  --polden-accent-text: #60A5FA;
  --polden-accent-soft: rgba(59, 130, 246, 0.14);
  --polden-accent-border: rgba(59, 130, 246, 0.32);
  --polden-focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.24);

  --polden-success: #34D399;
  --polden-success-soft: rgba(16, 185, 129, 0.14);
  --polden-success-border: rgba(16, 185, 129, 0.30);

  --polden-warning: #FBBF24;
  --polden-warning-soft: rgba(245, 158, 11, 0.14);
  --polden-warning-border: rgba(245, 158, 11, 0.30);

  --polden-danger: #F87171;
  --polden-danger-soft: rgba(239, 68, 68, 0.14);
  --polden-danger-border: rgba(239, 68, 68, 0.30);

  --polden-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --polden-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.38);
  --polden-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}
