/* ============================================
   NaPoso Design Tokens (Faza 2: Manje AI, više brenda)
   ============================================ */

/* --- Light Mode --- */
:root {
  color-scheme: light;
  
  /* Brand core — duboka tirkizna */
  --brand-primary: #0E3B36;       
  --brand-primary-light: #1C6F63;
  --brand-primary-dark: #082421;

  /* Accent #1 — glavni CTA, energija i pokret */
  --brand-accent: #FF3D68;        
  --brand-accent-hover: #E62457;
  --brand-accent-light: #FF7A96;

  /* Accent #2 — sekundarni, isključivo za gradijente/glow */
  --brand-accent-2: #00E0B8;      
  --brand-accent-2-dim: #00A88A;

  /* Duotone gradient token */
  --brand-duotone: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-2) 100%);

  /* Neutralni tonovi (Light) */
  --surface-bg: #f5f7fa;
  --surface-card: #ffffff;
  --surface-card-hover: #eef1f5;
  --surface-border: #d3d8e0;

  /* Tekst (Light) */
  --text-primary: #14181A;
  --text-secondary: #546a7b;
  --text-muted: #7A8285;
  --text-inverse: #F5F5F0;

  /* Mapiranje starih varijabli radi kompatibilnosti */
  --color-bg: var(--surface-bg);
  --color-surface: var(--surface-card);
  --color-surface-raised: var(--surface-card);
  --color-surface-hover: var(--surface-card-hover);
  --color-border: var(--surface-border);
  --color-border-strong: #9ea3b0;
  
  --color-text: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-muted);
  --color-text-inverse: var(--text-inverse);

  --color-accent: var(--brand-accent);
  --color-accent-hover: var(--brand-accent-hover);
  --color-accent-light: var(--brand-accent-light);
  --color-accent-subtle: color-mix(in srgb, var(--brand-accent) 20%, transparent);

  /* Status Colors */
  --status-success: #3FA66A;
  --status-warning: #E0B23F;
  --status-danger: #E5486B;
  --status-info: #3FA0E0;

  /* Paleta 1: Deep & Earthy (iz UI/UX guidelines) */
  --palette-warning: #f6ae2d;
  --palette-warning-dim: #d99523;
  --palette-success: #6fd08c;
  --palette-success-dim: #4ea668;
  --palette-mid-neutral: #546a7b;

  /* Paleta 2: Vibrant & Neon (iz UI/UX guidelines) */
  --palette-neon-fuchsia: #f72585;
  --palette-neon-purple: #b5179e;
  --palette-neon-indigo: #4361ee;
  --palette-neon-cyan: #4cc9f0;

  /* Jedinstveni gradienti (po pravilu: max 1 gradient sa istim setom po stranici) */
  --profile-avatar-gradient: linear-gradient(135deg, var(--palette-neon-indigo) 0%, var(--palette-neon-cyan) 100%);
  --profile-save-gradient: linear-gradient(135deg, var(--palette-neon-fuchsia) 0%, var(--palette-neon-purple) 100%);
  --profile-save-gradient-hover: linear-gradient(135deg, #e11e77 0%, #9e138c 100%);

  /* Aliasi za komponente (components.css, utilities.css) */
  --color-success: var(--status-success);
  --color-success-light: color-mix(in srgb, var(--status-success) 15%, transparent);
  --color-danger: var(--status-danger);
  --color-danger-hover: #c93a58;
  --color-danger-light: color-mix(in srgb, var(--status-danger) 15%, transparent);
  --color-warning: var(--status-warning);
  --color-warning-light: color-mix(in srgb, var(--status-warning) 15%, transparent);
  --color-info: var(--status-info);
  --color-coral: var(--brand-accent);

  /* Typography */
  --font-sans: 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Sora', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Veličine iz briefa */
  --fs-h1: 2.25rem;
  --fs-h2: 1.75rem;
  --fs-h3: 1.25rem;
  --fs-h4: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --text-caption: 0.75rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

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

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows (drastično smanjene, po briefu) */
  --shadow-xs: 0 1px 2px rgba(20, 24, 26, 0.05);
  --shadow-sm: 0 2px 4px rgba(20, 24, 26, 0.05);
  --shadow-md: 0 4px 6px rgba(20, 24, 26, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(20, 24, 26, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(20, 24, 26, 0.08);
  --shadow-focus: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 30%, transparent);
  --shadow-focus-danger: 0 0 0 3px color-mix(in srgb, var(--status-danger) 30%, transparent);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 300ms ease-out;

  /* Layout */
  --navbar-height: 72px;
  --max-width: 1200px;
  --sidebar-width: 260px;
  --color-bg-frosted: rgba(245, 247, 250, 0.85);
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  color-scheme: dark;
  
  /* Neutralni tonovi - Dark (iz briefa) */
  --surface-bg: #0F1416;
  --surface-card: #1A2023;
  --surface-card-hover: #232A2D;
  --surface-border: #2E373A;

  /* Tekst - Dark (iz briefa) */
  --text-primary: #F5F5F0;        
  --text-secondary: #B8BEC0;
  --text-muted: #7A8285;
  --text-inverse: #14181A;

  /* Mapiranje starih varijabli radi kompatibilnosti */
  --color-bg: var(--surface-bg);
  --color-surface: var(--surface-card);
  --color-surface-raised: var(--surface-card);
  --color-surface-hover: var(--surface-card-hover);
  --color-border: var(--surface-border);
  --color-border-strong: #7A8285;
  
  --color-text: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-muted);
  --color-text-inverse: var(--text-inverse);

  --color-bg-frosted: rgba(15, 20, 22, 0.85);

  /* Shadows for dark mode */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}
