/* ==========================================================
   Parsea — Design tokens
   Único lugar donde se definen colores, tipografía y forma.
   Los componentes usan estas variables, nunca valores sueltos.
   ========================================================== */

:root {
  /* ---- Marca ------------------------------------------- */
  --brand-50:  #effefb;
  --brand-100: #c6fff4;
  --brand-500: #1cedcd;  /* corporativo: fondos, botón principal */
  --brand-600: #14d4b6;  /* hover del botón principal */
  --brand-700: #0d7a6b;  /* brand como TEXTO/enlace sobre blanco (5,2:1) */

  /* ---- Neutros ----------------------------------------- */
  --neutral-0:   #ffffff;
  --neutral-50:  #fafafa;
  --neutral-100: #f4f4f5;
  --neutral-200: #e4e4e7;
  --neutral-300: #d4d4d8;
  --neutral-400: #a1a1aa;
  --neutral-500: #71717a;
  --neutral-600: #52525b;
  --neutral-700: #3f3f46;
  --neutral-800: #27272a;
  --neutral-900: #18181b;
  --neutral-950: #09090b;

  /* ---- Semánticos (los que usan los componentes) ------- */
  --bg-page:        var(--neutral-50);
  --bg-surface:     var(--neutral-0);
  --bg-subtle:      var(--neutral-100);
  --border:         var(--neutral-200);
  --border-strong:  var(--neutral-300);

  --text:           var(--neutral-950);
  --text-muted:     var(--neutral-600);   /* 7,7:1 sobre blanco */
  --text-faint:     var(--neutral-500);   /* 4,8:1: solo texto auxiliar */

  --action-bg:        var(--brand-500);
  --action-bg-hover:  var(--brand-600);
  --action-text:      var(--neutral-950); /* NUNCA blanco sobre brand */
  --link:             var(--brand-700);
  --focus-ring:       var(--brand-700);   /* visible sobre blanco y sobre brand */

  /* ---- Superficie invertida (franja oscura) ------------ */
  --bg-inverse:          var(--neutral-950);
  --text-inverse:        var(--neutral-0);
  --text-inverse-muted:  var(--neutral-400);  /* 7,8:1 sobre negro */
  --border-inverse:      var(--neutral-800);

  /* ---- Estados de fila (semáforo) ---------------------- */
  --ok-bg:    #f0fdf4;  --ok-text:    #15803d;  --ok-border:    #bbf7d0;  /* EXACTO */
  --warn-bg:  #fffbeb;  --warn-text:  #b45309;  --warn-border:  #fde68a;  /* PROBABLE */
  --amb-bg:   #fff7ed;  --amb-text:   #c2410c;  --amb-border:   #fed7aa;  /* AMBIGUO */
  --err-bg:   #fef2f2;  --err-text:   #b91c1c;  --err-border:   #fecaca;  /* SIN_MATCH */

  /* ---- Tipografía -------------------------------------- */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-xs:   0.75rem;   /* 12: solo metadatos */
  --text-sm:   0.875rem;  /* 14: tabla, ayudas */
  --text-base: 1rem;      /* 16: cuerpo */
  --text-lg:   1.125rem;  /* 18: subtítulos */
  --text-xl:   1.25rem;   /* 20 */
  --text-2xl:  1.5rem;    /* 24: títulos de sección */
  --text-4xl:  2.25rem;   /* 36: titular */
  --text-5xl:  3rem;      /* 48: titular hero (desktop) */

  --leading-tight:  1.15;  /* titulares */
  --leading-normal: 1.5;   /* cuerpo */

  /* ---- Forma y layout ---------------------------------- */
  --radius-sm:   0.375rem; /* 6: chips, inputs pequeños */
  --radius-md:   0.625rem; /* 10: botones, inputs */
  --radius-lg:   1rem;     /* 16: tarjetas, zona de arrastre */
  --shadow-sm:   0 1px 2px rgb(9 9 11 / 0.05);
  --shadow-md:   0 4px 16px rgb(9 9 11 / 0.06);

  --container:   72rem;    /* 1152: ancho máximo del contenido */
}

/* ---- Base global --------------------------------------- */
html { font-family: var(--font-sans); color: var(--text); background: var(--bg-page); }
body { font-size: var(--text-base); line-height: var(--leading-normal); -webkit-font-smoothing: antialiased; }

/* Foco visible y consistente en todo elemento interactivo */
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Números alineados en columnas (alturas, códigos, conteos) */
.tabular { font-variant-numeric: tabular-nums; }

/* Respeta a quien desactiva animaciones en su sistema */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
