/* ==========================================================================
   Tokens de diseño de NainOrder.
   Un único lugar donde vive color, tipografía, espacio, elevación y motion.
   Los componentes solo consumen variables: cambiar el tema no toca su CSS.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* --- Escala de espaciado: base 4px, progresión predecible --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* --- Radios --- */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* --- Tipografía --- */
  --font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace,
    "Roboto Mono", Consolas, monospace;

  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.375rem;
  --text-xl: 1.875rem;
  --text-2xl: 2.5rem;
  --text-3xl: 3.25rem;

  --leading-tight: 1.15;
  --leading-normal: 1.55;

  /* --- Marca --- */
  --brand-1: #6366f1;
  --brand-2: #8b5cf6;
  --brand-3: #22d3ee;
  --brand-gradient: linear-gradient(115deg, var(--brand-1), var(--brand-2) 45%, var(--brand-3));

  /* --- Motion: una sola curva para todo el producto --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 140ms;
  --duration-base: 240ms;
  --duration-slow: 460ms;

  --sidebar-width: 254px;
  --topbar-height: 68px;
  --content-max: 1440px;
}

/* --------------------------------------------------------------------------
   Tema oscuro (por defecto)
   -------------------------------------------------------------------------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  --bg-base: #08090d;
  --bg-elevated: #0d0f15;
  --bg-canvas-glow-1: rgba(99, 102, 241, 0.18);
  --bg-canvas-glow-2: rgba(34, 211, 238, 0.12);

  --surface-1: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-3: rgba(255, 255, 255, 0.08);
  --surface-solid: #12141c;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-default: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text-primary: #f2f4f9;
  --text-secondary: #a2a8bd;
  --text-muted: #7c8399;
  --text-inverse: #0a0b10;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 12px 28px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 32px 64px -24px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.35), 0 16px 48px -16px rgba(99, 102, 241, 0.5);

  --grid-line: rgba(255, 255, 255, 0.055);

  /* Estados del pedido: mismo tono en fondo/borde/texto para que lean como familia */
  --status-pending: #f5b13d;
  --status-paid: #34d399;
  --status-processing: #38bdf8;
  --status-shipped: #a78bfa;
  --status-cancelled: #fb7185;

  --success: #34d399;
  --warning: #f5b13d;
  --danger: #fb7185;
  --info: #38bdf8;
}

/* --------------------------------------------------------------------------
   Tema claro
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  color-scheme: light;

  --bg-base: #f6f7fb;
  --bg-elevated: #ffffff;
  --bg-canvas-glow-1: rgba(99, 102, 241, 0.14);
  --bg-canvas-glow-2: rgba(34, 211, 238, 0.1);

  --surface-1: rgba(255, 255, 255, 0.86);
  --surface-2: rgba(255, 255, 255, 0.96);
  --surface-3: rgba(15, 23, 42, 0.045);
  --surface-solid: #ffffff;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-default: rgba(15, 23, 42, 0.13);
  --border-strong: rgba(15, 23, 42, 0.22);

  --text-primary: #10131c;
  --text-secondary: #4b5266;
  --text-muted: #636a7d;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 12px 28px -14px rgba(15, 23, 42, 0.22);
  --shadow-lg: 0 32px 64px -28px rgba(15, 23, 42, 0.3);
  --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.28), 0 16px 40px -18px rgba(99, 102, 241, 0.4);

  --grid-line: rgba(15, 23, 42, 0.05);

  --status-pending: #8a5606;
  --status-paid: #077f5a;
  --status-processing: #0369a1;
  --status-shipped: #6d28d9;
  --status-cancelled: #be123c;

  --success: #077f5a;
  --warning: #b47212;
  --danger: #be123c;
  --info: #0369a1;
}
