/* ============================================
   Nextcom V6 — Design Tokens (Premium Redesign)
   ============================================ */

:root {
  /* ---------- Brand colors ---------- */
  --color-primary: #6366f1;
  --color-primary-hover: #4f46e5;
  --color-primary-light: #eef2ff;
  --color-primary-dark: #4338ca;
  --color-primary-glow: rgba(99, 102, 241, 0.35);

  --color-secondary: #64748b;
  --color-secondary-hover: #475569;

  --color-success: #10b981;
  --color-success-light: #ecfdf5;
  --color-warning: #f59e0b;
  --color-warning-light: #fffbeb;
  --color-danger: #ef4444;
  --color-danger-light: #fef2f2;
  --color-info: #06b6d4;
  --color-info-light: #ecfeff;

  /* ---------- Spacing ---------- */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.25rem;
  --space-xl: 1.75rem;
  --space-2xl: 2.5rem;

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

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;

  /* ---------- Border radius ---------- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-full: 9999px;

  /* ---------- Shadows ---------- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.06);
  --shadow-primary: 0 4px 14px -2px rgba(99, 102, 241, 0.35);
  --shadow-success: 0 4px 14px -2px rgba(16, 185, 129, 0.3);
  --shadow-danger: 0 4px 14px -2px rgba(239, 68, 68, 0.3);

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

  /* ---------- Z-index ---------- */
  --z-sidebar: 100;
  --z-header: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* ---------- Layout ---------- */
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 68px;
  --header-height: 56px;
  --content-max-width: 1600px;
}

/* ============================================
   Light theme (default)
   ============================================ */
:root,
[data-theme="light"] {
  --bg-body: #f8f9fc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8f9fc;
  --bg-surface-active: #f1f3f9;
  --bg-muted: #f1f3f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --border-color: #e9ecf2;
  --border-color-strong: #d1d5e0;

  --input-bg: #ffffff;
  --input-border: #d1d5e0;
  --input-focus-ring: rgba(99, 102, 241, 0.2);

  /* Sidebar */
  --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #0a0f1f 100%);
  --sidebar-bg-flat: #0f172a;
  --sidebar-text: #8b95a8;
  --sidebar-text-active: #f1f5f9;
  --sidebar-item-hover: rgba(255, 255, 255, 0.06);
  --sidebar-item-active: rgba(99, 102, 241, 0.12);
  --sidebar-accent: var(--color-primary);
  --sidebar-divider: rgba(255, 255, 255, 0.06);

  /* Header */
  --header-bg: rgba(255, 255, 255, 0.82);
  --header-border: #e9ecf2;
}

/* ============================================
   Dark theme
   ============================================ */
[data-theme="dark"] {
  --bg-body: #0b0f1a;
  --bg-surface: #141925;
  --bg-surface-hover: #1a2033;
  --bg-surface-active: #222940;
  --bg-muted: #171d2e;

  --text-primary: #e8ecf4;
  --text-secondary: #8b95a8;
  --text-muted: #545f73;
  --text-inverse: #0b0f1a;

  --border-color: #1e2536;
  --border-color-strong: #2a3349;

  --input-bg: #141925;
  --input-border: #2a3349;
  --input-focus-ring: rgba(99, 102, 241, 0.25);

  /* Sidebar */
  --sidebar-bg: linear-gradient(180deg, #080c16 0%, #050810 100%);
  --sidebar-bg-flat: #080c16;
  --sidebar-text: #545f73;
  --sidebar-text-active: #e8ecf4;
  --sidebar-item-hover: rgba(255, 255, 255, 0.04);
  --sidebar-item-active: rgba(99, 102, 241, 0.15);
  --sidebar-accent: #818cf8;
  --sidebar-divider: rgba(255, 255, 255, 0.04);

  /* Header */
  --header-bg: rgba(20, 25, 37, 0.82);
  --header-border: #1e2536;

  /* Shadows - darker */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.35), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.4), 0 4px 8px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.5), 0 8px 16px -4px rgba(0, 0, 0, 0.3);
  --shadow-primary: 0 4px 14px -2px rgba(99, 102, 241, 0.25);

  /* Status colors for dark */
  --color-success-light: rgba(16, 185, 129, 0.12);
  --color-warning-light: rgba(245, 158, 11, 0.12);
  --color-danger-light: rgba(239, 68, 68, 0.12);
  --color-info-light: rgba(6, 182, 212, 0.12);
  --color-primary-light: rgba(99, 102, 241, 0.12);

  /* Glass morphism for cards */
  --glass-bg: rgba(20, 25, 37, 0.6);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: 12px;
}
