/* ==========================================================
   Inthiers · Design tokens
   Fuente de verdad de color, tipografía, espacios y movimiento.
   ========================================================== */

@font-face { font-family: "Roboto"; src: url("../assets/fonts/Roboto-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("../assets/fonts/Roboto-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("../assets/fonts/Roboto-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Quantify"; src: url("../assets/fonts/Quantify.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  /* Marca */
  --brand-red: #ED1F25;
  --brand-orange: #F57C1F;
  --brand-ember: #EA551F;
  --brand-navy: #1D3557;
  --brand-navy-900: #11223A;
  --brand-blue: #2EA3F2;
  --brand-blue-600: #1E6FE0;
  --brand-gradient: linear-gradient(135deg, #F57C1F 0%, #EA551F 45%, #ED1F25 100%);
  --brand-gradient-cool: linear-gradient(135deg, #2EA3F2 0%, #1E6FE0 100%);

  /* Producto (combustibles) */
  --fuel-magna: #089545;
  --fuel-premium: #ED1F25;
  --fuel-diesel: #3A4A63;

  /* Semánticos */
  --success: #08875A;
  --success-bg: #E5F6EE;
  --warning: #B7791F;
  --warning-bg: #FDF3E1;
  --danger: #D92D20;
  --danger-bg: #FDECEA;
  --info: #1E6FE0;
  --info-bg: #E8F1FD;

  /* Superficies – claro */
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-hover: #F1F4F8;
  --border: #E2E7EE;
  --border-strong: #CDD5E0;
  --text: #0F1B2D;
  --text-2: #3E4D63;
  --muted: #6A7A90;
  --primary: #EA551F;
  --primary-hover: #D9481A;
  --primary-soft: #FDEEE6;
  --ring: rgba(234, 85, 31, .35);

  --sidebar-bg: #14263F;
  --sidebar-bg-2: #1D3557;
  --sidebar-text: #B9C6D8;
  --sidebar-text-strong: #FFFFFF;
  --sidebar-active: rgba(245, 124, 31, .16);

  /* Tipografía */
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-brand: "Quantify", "Roboto", sans-serif;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-md: .9375rem; --fs-lg: 1.125rem; --fs-xl: 1.5rem; --fs-2xl: 2rem;

  /* Espacios y forma */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06), 0 1px 1px rgba(15, 27, 45, .04);
  --shadow-md: 0 6px 18px -6px rgba(15, 27, 45, .14), 0 2px 6px rgba(15, 27, 45, .05);
  --shadow-lg: 0 24px 48px -12px rgba(15, 27, 45, .28);

  /* Movimiento */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 140ms; --t-med: 260ms; --t-slow: 520ms;

  --sidebar-w: 268px;
  --sidebar-w-collapsed: 78px;
  --topbar-h: 68px;

  color-scheme: light;
}

/* Modo oscuro: sistema (si el usuario no eligió) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1220; --surface: #111C2D; --surface-2: #0E1828; --surface-hover: #172539;
    --border: #1E2C42; --border-strong: #2A3B55;
    --text: #E7EDF5; --text-2: #B7C3D4; --muted: #8496AE;
    --primary: #F57C1F; --primary-hover: #FF8E36; --primary-soft: rgba(245, 124, 31, .14);
    --success-bg: rgba(8, 135, 90, .18); --warning-bg: rgba(183, 121, 31, .2); --danger-bg: rgba(217, 45, 32, .18); --info-bg: rgba(30, 111, 224, .2);
    --success: #34C38F; --warning: #F0B95A; --danger: #FF6B5E; --info: #6AA8FF;
    --sidebar-bg: #08101C; --sidebar-bg-2: #0F1D31; --fuel-diesel: #8FA3C0;
    --shadow-md: 0 8px 22px -8px rgba(0, 0, 0, .55); --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
/* Modo oscuro: elección explícita */
:root[data-theme="dark"] {
  --bg: #0A1220; --surface: #111C2D; --surface-2: #0E1828; --surface-hover: #172539;
  --border: #1E2C42; --border-strong: #2A3B55;
  --text: #E7EDF5; --text-2: #B7C3D4; --muted: #8496AE;
  --primary: #F57C1F; --primary-hover: #FF8E36; --primary-soft: rgba(245, 124, 31, .14);
  --success-bg: rgba(8, 135, 90, .18); --warning-bg: rgba(183, 121, 31, .2); --danger-bg: rgba(217, 45, 32, .18); --info-bg: rgba(30, 111, 224, .2);
  --success: #34C38F; --warning: #F0B95A; --danger: #FF6B5E; --info: #6AA8FF;
  --sidebar-bg: #08101C; --sidebar-bg-2: #0F1D31; --fuel-diesel: #8FA3C0;
  --shadow-md: 0 8px 22px -8px rgba(0, 0, 0, .55); --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; --t-slow: 0ms; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
