/* ============================================================
   TALONARIA — DESIGN TOKENS
   Importar ANTES que cualquier otro CSS, incluyendo Bootstrap.
   ============================================================ */

/* --- Tipografías --- */
@import url('https://fonts.googleapis.com/css2?family=Montagu+Slab:opsz,wght@16..144,100..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kode+Mono:wght@400..700&display=swap');

:root {
  /* ---- Colores de marca ---- */
  --color-brand: #ccff00;
  /* lima — acción, CTAs, highlights */
  --color-brand-dark: #002b2a;
  /* verde oscuro — texto sobre lima, fondos oscuros */
  --color-brand-mid: #1a4a48;
  /* hover / superficies oscuras secundarias */
  --color-brand-rgb: 204, 255, 0;

  /* ---- Semánticos ---- */
  --color-success: #1D9E75;
  --color-success-bg: #e1f5ee;
  --color-warning: #F59E0B;
  --color-warning-bg: #fef3c7;
  --color-danger: #E24B4A;
  --color-danger-bg: #fee2e2;
  --color-info: #378ADD;
  --color-info-bg: #e6f1fb;

  /* ---- Superficie ---- */
  --color-bg: #f4f9f4;
  /* fondo general */
  --color-surface: #ffffff;
  /* tarjetas, modales */
  --color-surface-alt: #eef5ee;
  /* superficies secundarias */

  /* ---- Texto ---- */
  --color-text-primary: #0d1f1e;
  --color-text-secondary: #4a6b5a;
  --color-text-muted: #8aaa96;

  /* ---- Bordes ---- */
  --color-border: rgba(0, 43, 42, 0.10);
  --color-border-mid: rgba(0, 43, 42, 0.20);

  /* ---- Tipografía ---- */
  --font-body: 'Kode Mono', monospace;
  --font-display: 'Montagu Slab', Georgia, serif;
  --font-mono: 'Kode Mono', monospace;

  /* ---- Espaciado (escala 8px) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* ---- Radio de borde ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* ---- Sombras ---- */
  --shadow-sm: 0 1px 3px rgba(0, 43, 42, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 43, 42, 0.10);

  /* ---- Puentes Bootstrap ---- */
  /* NOTA: --bs-primary-rgb y otros se definen en app.css (después de Bootstrap)
     para evitar que Bootstrap los pise. Aquí solo variables propias. */
  --footer-bg-color: var(--color-brand-dark);

  /* Alias legacy para home.php (--primary, --dark, etc.) */
  --primary: var(--color-brand);
  --primary-dark: var(--color-brand-dark);
  --secondary: #e94a65;
  --dark: var(--color-brand-dark);
  --dark-light: var(--color-brand-dark);
  --text: var(--color-text-primary);
  --text-light: var(--color-text-secondary);
  --bg: var(--color-bg);
  --white: #ffffff;

  /* ---- Tamaños tipográficos ---- */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.5rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.3rem;
  --text-4xl: 2.6rem;
  --text-5xl: 3.8rem;
  --text-6xl: 4.2rem;
}

/* ============================================================
   TIPOGRAFÍA GLOBAL
   Aplicamos los tokens de fuente aquí para que sean lo primero
   en cargarse. Cualquier regla posterior en app.css que defina
   font-family en body quedará como override explícito, no accidental.
   ============================================================ */



*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  line-height: 1.6;
  /* Compensa el header fixed (~84px = padding 16px×2 + logo 52px) */
  padding-top: 78px;
}

/* El dashboard usa body.fixed y tiene su propio header no-fixed */
body.fixed {
  padding-top: 0 !important;
}

@media (max-width: 767px) {
  body {
    padding-top: 58px;
  }

  body.fixed {
    padding-top: 0 !important;
  }
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--font-display);
  color: var(--color-brand-dark);
  line-height: 1 !important;
  letter-spacing: -0.035em;
  font-weight: 700 !important;
}

/* font-caveat es el alias para Fraunces en la plantilla */
.font-caveat {
  font-family: var(--font-display) !important;
}

/* Elementos que usan Kode Mono explícitamente */
code,
pre,
kbd,
samp,
.font-mono {
  font-family: var(--font-mono);
}