/* ZK Studio — design tokens (hex/rgb only for html2canvas compatibility) */

:root,
[data-theme="light"] {
  /* Brand — Madzoon navy + blue */
  --brand-50: #eef4f8;
  --brand-100: #d5e8f3;
  --brand-200: #a8d0e8;
  --brand-300: #6eb0d9;
  --brand-400: #3498db;
  --brand-500: #2980b9;
  --brand-600: #2471a3;
  --brand-700: #1f618d;
  --brand-800: #2c3e50;
  --brand-900: #1a252f;

  /* Neutrals */
  --neutral-0: #ffffff;
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;

  /* Semantic */
  --success-fg: #166534;
  --success-bg: #dcfce7;
  --success-border: #86efac;
  --warning-fg: #92400e;
  --warning-bg: #fef3c7;
  --warning-border: #fcd34d;
  --danger-fg: #991b1b;
  --danger-bg: #fee2e2;
  --danger-border: #fca5a5;
  --info-fg: #1e40af;
  --info-bg: #dbeafe;
  --info-border: #93c5fd;

  /* Surfaces */
  --bg: var(--neutral-50);
  --surface: var(--neutral-0);
  --surface-raised: var(--neutral-0);
  --surface-sunken: var(--neutral-100);
  --border: var(--neutral-200);
  --border-strong: var(--neutral-300);
  --text: var(--neutral-900);
  --text-muted: var(--neutral-500);
  --text-subtle: var(--neutral-400);

  /* Layout */
  --sidebar-w: 260px;
  --sidebar-w-collapsed: 68px;
  --topbar-h: 56px;
  --content-max: 1400px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.04);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 320ms;

  /* Legacy aliases (backward compat) */
  --madzoon-primary: var(--brand-800);
  --madzoon-secondary: var(--brand-400);
  --madzoon-accent: #e74c3c;
  --madzoon-light: var(--neutral-100);
  --madzoon-dark: var(--brand-800);
  --madzoon-success: #27ae60;
  --madzoon-warning: #f39c12;
  --madzoon-red: #e74c3c;
  --madzoon-blue: var(--brand-400);
  --madzoon-orange: #f39c12;
  --madzoon-green: #27ae60;

  /* Bootstrap 5.3 remap */
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-primary: var(--brand-400);
  --bs-primary-rgb: 52, 152, 219;
  --bs-secondary: var(--neutral-500);
  --bs-success: #27ae60;
  --bs-info: var(--brand-400);
  --bs-warning: #f39c12;
  --bs-danger: #e74c3c;
  --bs-light: var(--neutral-100);
  --bs-dark: var(--brand-800);
  --bs-border-radius: var(--r-md);
  --bs-border-radius-sm: var(--r-sm);
  --bs-border-radius-lg: var(--r-lg);
  --bs-font-sans-serif: var(--font-sans);
  --bs-body-font-size: var(--text-base);
  --bs-link-color: var(--brand-500);
  --bs-link-hover-color: var(--brand-700);
}

[data-theme="dark"] {
  --brand-50: #0f172a;
  --brand-100: #1e293b;
  --brand-200: #334155;

  --neutral-0: #0f172a;
  --neutral-50: #111827;
  --neutral-100: #1e293b;
  --neutral-200: #334155;
  --neutral-300: #475569;
  --neutral-400: #64748b;
  --neutral-500: #94a3b8;
  --neutral-600: #cbd5e1;
  --neutral-700: #e2e8f0;
  --neutral-800: #f1f5f9;
  --neutral-900: #f8fafc;

  --success-fg: #86efac;
  --success-bg: #14532d;
  --success-border: #166534;
  --warning-fg: #fcd34d;
  --warning-bg: #78350f;
  --warning-border: #92400e;
  --danger-fg: #fca5a5;
  --danger-bg: #7f1d1d;
  --danger-border: #991b1b;
  --info-fg: #93c5fd;
  --info-bg: #1e3a5f;
  --info-border: #1e40af;

  --bg: #0b1120;
  --surface: #111827;
  --surface-raised: #1e293b;
  --surface-sunken: #0f172a;
  --border: #334155;
  --border-strong: #475569;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --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 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-primary: #5dade2;
  --bs-primary-rgb: 93, 173, 226;
  --bs-secondary: var(--neutral-400);
  --bs-light: var(--neutral-100);
  --bs-dark: var(--neutral-800);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
  }
}
