:root {
  /* ==========================================================================
     1. TIPOGRAFÍA
     ========================================================================== */
  --font-heading: 'Libre Baskerville', serif;
  --font-body: 'Poppins', sans-serif;

  /* Peso Libre Baskerville */
  --fw-serif-regular: 400;
  --fw-serif-bold: 700;

  /* Peso Poppins */
  --fw-sans-thin: 100;
  --fw-sans-extralight: 200;
  --fw-sans-light: 300;
  --fw-sans-regular: 400;
  --fw-sans-medium: 500;
  --fw-sans-semibold: 600;
  --fw-sans-bold: 700;
  --fw-sans-extrabold: 800;
  --fw-sans-black: 900;

  /* ==========================================================================
     2. PALETA BASE (Valores HSL)
     ========================================================================== */
  /* Colores de Marca */
  --hsl-brand-900: hsl(233 96% 11%);  /* #010736 - Azul muy oscuro */
  --hsl-brand-800: hsl(222 67% 15%);  /* #0D1C42 - Azul noche */
  --hsl-brand-600: hsl(222 53% 28%);  /* #22396F - Azul medio */
  --hsl-brand-50:  hsl(38 100% 98%);  /* #fffcf7 - Blanco cálido / Hueso */

  /* Colores Semánticos (Base HSL) */
  --hsl-danger:  hsl(354 70% 54%); /* Rojo error */
  --hsl-warning:  hsl(38 92% 50%); /* Naranja alerta */
  --hsl-success: hsl(142 60% 40%); /* Verde éxito */
  --hsl-info:    hsl(200 85% 48%); /* Azul información */

  /* ==========================================================================
     3. TEMA CLARO (Default)
     ========================================================================== */
  /* Fondos con niveles de iluminación */
  --bg-app:        hsl(38 100% 98%);
  --bg-surface-1:  hsl(38 60% 95%);
  --bg-surface-2:  hsl(38 40% 90%);
  --bg-surface-3:  hsl(38 30% 84%);

  /* Textos */
  --text-primary:   hsl(var(--hsl-brand-900));
  --text-secondary: hsl(var(--hsl-brand-800) / 0.8);
  --text-muted:     hsl(var(--hsl-brand-600) / 0.7);
  --text-inverse:   hsl(var(--hsl-brand-50));

  /* Destacados y Bordes */
  --highlight:      hsl(var(--hsl-brand-600));
  --highlight-hover: hsl(var(--hsl-brand-800));
  --border-color:   hsl(var(--hsl-brand-900) / 0.12);

  /* Estados y Alertas (Modo Claro) */
  --color-danger:         hsl(var(--hsl-danger));
  --bg-danger-light:      hsl(var(--hsl-danger) / 0.1);
  
  --color-warning:        hsl(var(--hsl-warning));
  --bg-warning-light:     hsl(var(--hsl-warning) / 0.12);
  
  --color-success:        hsl(var(--hsl-success));
  --bg-success-light:     hsl(var(--hsl-success) / 0.1);
  
  --color-info:           hsl(var(--hsl-info));
  --bg-info-light:        hsl(var(--hsl-info) / 0.1);
}

/* ==========================================================================
   4. TEMA OSCURO
   ========================================================================== */
[data-theme="dark"],
.dark {
  /* Fondos con niveles de iluminación */
  --bg-app:        hsl(var(--hsl-brand-900));
  --bg-surface-1:  hsl(var(--hsl-brand-800));
  --bg-surface-2:  hsl(222 55% 20%);
  --bg-surface-3:  hsl(var(--hsl-brand-600));

  /* Textos */
  --text-primary:   hsl(var(--hsl-brand-50));
  --text-secondary: hsl(38 50% 90% / 0.85);
  --text-muted:     hsl(38 30% 75% / 0.65);
  --text-inverse:   hsl(var(--hsl-brand-900));

  /* Destacados y Bordes */
  --highlight:      hsl(215 80% 65%);
  --highlight-hover: hsl(215 90% 75%);
  --border-color:   hsl(var(--hsl-brand-50) / 0.15);

  /* Estados y Alertas (Ajustados para lectura en fondos oscuros) */
  --color-danger:         hsl(354 85% 65%);
  --bg-danger-light:      hsl(354 70% 54% / 0.2);

  --color-warning:        hsl(38 95% 60%);
  --bg-warning-light:     hsl(38 92% 50% / 0.2);

  --color-success:        hsl(142 65% 55%);
  --bg-success-light:     hsl(142 60% 40% / 0.2);

  --color-info:           hsl(200 90% 65%);
  --bg-info-light:        hsl(200 85% 48% / 0.2);
}