/* ═══════════════════════════════════════════════════════════════════
 * DentiFlow Pro — Design Tokens
 * ───────────────────────────────────────────────────────────────────
 * Culoarea primary si toata paleta sunt centralizate aici.
 * Pentru rebranding: modifica cele 4 variabile --brand-* din :root.
 * ═══════════════════════════════════════════════════════════════════ */

:root, [data-theme="light"] {
  /* ─── BRAND (schimba aici pentru rebranding complet) ─── */
  --brand: #059669;               /* Emerald 600 — culoare primary */
  --brand-dark: #047857;          /* Emerald 700 — hover/active */
  --brand-light: #10B981;         /* Emerald 500 — gradient/accent */
  --brand-subtle: rgba(16,185,129,0.12);  /* Background subtle (cards, hover) */

  /* ─── SURFACE ─── */
  --bg-body: #eef2f7;
  --bg-content: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-header: #1a2332;           /* Topbar dark */
  --bg-elevated: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-hover: #f1f5f9;

  /* ─── BORDER ─── */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-strong: #cbd5e1;

  /* ─── TEXT ─── */
  --text: #1e293b;
  --text-muted: #64748b;
  --text-header: #0f172a;
  --text-on-brand: #ffffff;
  --text-inverse: #ffffff;

  /* ─── SEMANTIC ─── */
  --info: #0284c7;
  --info-subtle: rgba(2,132,199,0.1);
  --warning: #d97706;
  --warning-subtle: rgba(217,119,6,0.1);
  --danger: #dc2626;
  --danger-subtle: rgba(220,38,38,0.1);
  --success: var(--brand);
  --success-subtle: var(--brand-subtle);

  /* ─── TYPOGRAPHY ─── */
  --font-sans: 'Source Sans Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Consolas', monospace;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;

  /* ─── 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;

  /* ─── RADIUS ─── */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* ─── SHADOW ─── */
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.05);
  --shadow: 0 4px 16px rgba(15,23,42,0.08);
  --shadow-md: 0 8px 24px rgba(15,23,42,0.1);
  --shadow-lg: 0 20px 48px rgba(15,23,42,0.14);
  --shadow-brand: 0 8px 24px rgba(16,185,129,0.25);

  /* ─── Z-INDEX ─── */
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-modal: 1000;
  --z-toast: 2000;

  /* ─── TRANSITIONS ─── */
  --transition-fast: 120ms ease;
  --transition: 200ms ease;
  --transition-slow: 320ms ease;

  /* ─── LAYOUT ─── */
  --header-height: 56px;
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;

  /* ─── CHART PALETTES ─── */
  --chart-1: var(--brand);
  --chart-2: #0284c7;
  --chart-3: #8b5cf6;
  --chart-4: #f59e0b;
  --chart-5: #ef4444;
  --chart-6: #06b6d4;

  /* ─── Legacy (iStoma components) ─── */
  --istoma-green: var(--brand);
  --istoma-green-dark: var(--brand-dark);
  --istoma-green-light: var(--brand-light);
  --istoma-green-subtle: var(--brand-subtle);
  --navbar-dark: var(--bg-header);
  --purple: #8b5cf6;
  --aqua: #06b6d4;
}

[data-theme="dark"] {
  --brand: #10B981;
  --brand-dark: #059669;
  --brand-light: #34D399;
  --brand-subtle: rgba(52,211,153,0.18);

  --bg-body: #0f1824;
  --bg-content: #1a2332;
  --bg-sidebar: #1a2332;
  --bg-header: #0a0f1a;
  --bg-elevated: #212b3b;
  --bg-subtle: #1e2839;
  --bg-hover: #242f42;

  --border: #2a3544;
  --border-light: #232f40;
  --border-strong: #384557;

  --text: #e0e7f0;
  --text-muted: #8aa4af;
  --text-header: #f0f5fa;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.6);
  --shadow-brand: 0 8px 24px rgba(52,211,153,0.3);
}

/* Anti-FOUC + smooth theme transitions */
html { transition: background-color var(--transition); }
body, .card, .main-header, .main-sidebar, .info-box, .box {
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

/* Focus ring (accesibil) */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection { background: var(--brand-subtle); color: var(--text-header); }

/* Scrollbar */
.scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.scrollbar::-webkit-scrollbar-track { background: transparent; }
.scrollbar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
.scrollbar::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
