/* =============================================================================
   DESIGN TOKENS — Transparentnost
   Light & Dark theme CSS custom properties
   ============================================================================= */

:root {
  /* ── Colours: Light Theme ────────────────────────────────────────────────── */
  --bg-root: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-solid: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-input: #ffffff;
  --bg-input-focus: #ffffff;
  --bg-overlay: rgba(15, 23, 42, 0.04);
  --bg-hover: rgba(217, 119, 6, 0.08);
  --bg-active: rgba(217, 119, 6, 0.12);
  --bg-skeleton: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  --text-accent: #9c8321;
  --text-on-accent: #1c1c24;

  --accent-primary: #c4b471;
  --accent-primary-h: #d8c886;
  --accent-secondary: #8b7a35;
  --accent-success: #059669;
  --accent-warning: #c4b471;
  --accent-danger: #dc2626;
  --accent-info: #eadd9c;

  --accent-gradient: linear-gradient(135deg, #d8c886 0%, #c4b471 100%);
  --accent-gradient-h: linear-gradient(135deg, #eadd9c 0%, #d8c886 100%);

  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-accent: rgba(196, 180, 113, 0.4);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-accent: 0 4px 14px 0 rgba(217, 119, 6, 0.39);

  --backdrop-blur: blur(12px);
  --backdrop-blur-sm: blur(16px);

  /* ── Background gradient ─────────────────────────────────────────────────── */
  --bg-gradient: linear-gradient(135deg,
      #ffffff 0%,
      #fcfcf9 25%,
      #ffffff 50%,
      #fdf3cd 75%,
      #ffffff 100%);

  /* ── Sizing & Spacing ────────────────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* ── Typography ──────────────────────────────────────────────────────────── */
  --font-sans: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;

  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-lg: 1.125rem;
  /* 18px */
  --text-xl: 1.25rem;
  /* 20px */
  --text-2xl: 1.5rem;
  /* 24px */
  --text-3xl: 1.875rem;
  /* 30px */
  --text-4xl: 2.25rem;
  /* 36px */

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semi: 600;
  --fw-bold: 700;

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.75;

  /* ── Transitions ─────────────────────────────────────────────────────────── */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Z-index ─────────────────────────────────────────────────────────────── */
  --z-base: 1;
  --z-sticky: 90;
  --z-tooltip: 100;
  --z-modal: 200;
  --z-toast: 300;

  /* ── Layout ──────────────────────────────────────────────────────────────── */
  --max-width: 1400px;
  --header-height: 72px;
  --sidebar-width: 280px;
  --container-px: var(--space-4);
}

/* ── Dark Theme ────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-root: #1c1c24;
  --bg-primary: #1c1c24;
  --bg-secondary: #232220;
  --bg-card: rgba(32, 32, 42, 0.85);
  --bg-card-solid: #20202a;
  --bg-glass: rgba(32, 32, 42, 0.6);
  --bg-input: rgba(28, 28, 36, 0.6);
  --bg-input-focus: rgba(36, 36, 46, 1);
  --bg-overlay: rgba(255, 255, 255, 0.05);
  --bg-hover: rgba(196, 180, 113, 0.1);
  --bg-active: rgba(196, 180, 113, 0.2);
  --bg-skeleton: linear-gradient(90deg, #20202a 25%, #2a2a36 50%, #20202a 75%);

  --text-primary: #f0f0f5;
  --text-secondary: #a0a0ab;
  --text-muted: #70707b;
  --text-inverse: #1c1c24;
  --text-accent: #c4b471;
  --text-on-accent: #1c1c24;

  --accent-primary: #c4b471;
  --accent-primary-h: #d8c886;
  --accent-secondary: #eadd9c;
  --accent-success: #10b981;
  --accent-warning: #c4b471;
  --accent-danger: #f87171;
  --accent-info: #8b7a35;

  --accent-gradient: linear-gradient(135deg, #eadd9c 0%, #c4b471 100%);
  --accent-gradient-h: linear-gradient(135deg, #fdf2c2 0%, #d8c886 100%);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(196, 180, 113, 0.3);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 4px 14px 0 rgba(196, 180, 113, 0.2);

  --bg-gradient: linear-gradient(135deg,
      #1c1c24 0%,
      #232220 50%,
      #1c1c24 100%);
}

/* ── Reduced motion ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}