/**
 * Nexus POS — Design System Tokens (Stage 01)
 * Source of truth for colors, type, space, radius, motion, z-index.
 * Consumed by base.css, layout.css, components.css, and pages/*.css
 */

:root {
  /* Brand */
  --brand-name: "Nexus POS";
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-soft: rgba(37, 99, 235, 0.08);
  --color-primary-border: rgba(37, 99, 235, 0.2);

  --color-secondary: #64748b;
  --color-success: #059669;
  --color-success-soft: rgba(5, 150, 105, 0.1);
  --color-warning: #d97706;
  --color-warning-soft: rgba(217, 119, 6, 0.1);
  --color-danger: #dc2626;
  --color-danger-soft: rgba(220, 38, 38, 0.1);
  --color-info: #0891b2;
  --color-info-soft: rgba(8, 145, 178, 0.1);

  /* Surfaces */
  --color-bg: #f6f8fe;
  --color-bg-elevated: #ffffff;
  --color-surface: #ffffff;
  --color-surface-muted: #f8fafc;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --color-divider: #eef1f8;

  /* Sidebar (dark) */
  --sidebar-bg: #0b1220;
  --sidebar-bg-elevated: #111827;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(37, 99, 235, 0.2);
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;

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

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-tight: 1.25;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  /* Spacing scale */
  --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;
  --space-12: 3rem;

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

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.25);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(12px);

  /* Layout */
  --topbar-height: 64px;
  --content-max: 1440px;
  --z-sidebar: 1040;
  --z-topbar: 1030;
  --z-dropdown: 1050;
  --z-modal: 1060;
  --z-toast: 1080;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration: 220ms;
  --duration-slow: 320ms;

  /* Forms */
  --input-height: 42px;
  --input-bg: #ffffff;
  --input-border: var(--color-border);
  --input-focus: var(--color-primary);
}

[data-theme="dark"] {
  --color-bg: #0b1220;
  --color-bg-elevated: #111827;
  --color-surface: #1e293b;
  --color-surface-muted: #0f172a;
  --color-border: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --glass-bg: rgba(30, 41, 59, 0.75);
  --input-bg: #1e293b;
}
