/* ==========================================================================
   BASE · lo que comparten el sitio público y el panel

   Sistema Merk2 nuevo: azul y naranja vivos, sans-serif geométrica,
   esquinas en píldora para botones e insignias, bien redondeadas para
   tarjetas. Reemplaza al sistema cálido/desaturado anterior por decisión
   explícita del cliente -- los valores exactos vienen del propio diseño
   fuente (colores, radios y tipografía extraídos directo del HTML/CSS
   real, no adivinados).
   ========================================================================== */

:root {
  --brand:    #0F3FD6;
  --brand-d:  #0B2A9C;
  --brand-l:  #DBE4FF;
  --brand-xl: #EEF1FB;

  /* Azul claro y naranja: el contraste que sostiene la marca */
  --arena:    #EEF1FB;
  --arena-d:  #DBE4FF;
  --terra:    #FF9D2E;
  --salvia:   #3A6BF0;

  --ink:   #101A3D;
  --ink-2: #3A4568;
  --ink-3: #5A6A94;
  --ink-4: #7B8AB5;

  --bg:     #F7F9FF;
  --surf:   #FFFFFF;
  --line:   #DBE4FF;
  --line-2: #C3D0F5;

  /* Los únicos colores saturados fuera de la marca son los de estado */
  --ok:   #1A8250;  --ok-bg:   #E4F0EA;
  --warn: #A9741B;  --warn-bg: #FBF1DD;
  --bad:  #A6382C;  --bad-bg:  #F9E7E4;

  --r-s: 12px;  --r-m: 16px;  --r-l: 20px;  --r-xl: 28px;
  /* Sin tipografía propia cargada -- el diseño real usa la fuente del
     sistema operativo directo, fiel a como está construido el original */
  --serif: 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans:  'Segoe UI Variable', 'Segoe UI', -apple-system, system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  /* Lo que además necesita el panel: superficies intermedias, y un tiempo
     de transición único. */
  --surf-2: #EEF1FB; --surf-3: #DBE4FF;
  --pill: 999px;
  --t: 190ms cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* El atributo "hidden" nativo del navegador pierde contra cualquier regla
   de CSS que le ponga "display" a ese mismo elemento (como ".btn", que
   necesita "inline-flex" para acomodar su ícono) — es un problema conocido
   de CSS, no un descuido puntual, y la solución real es esta: una regla
   que siempre gana, sin importar qué más le haya puesto display a ese
   elemento en cualquier otro lado del sistema. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
h1 { font-family: var(--serif); font-size: 34px; }
h2 { font-family: var(--serif); font-size: 26px; }
h3 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
p  { margin: 0 0 1em; }
a  { color: var(--brand-d); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.02em; }

/* --- botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border: 1px solid transparent; border-radius: var(--pill);
  background: var(--brand); color: #fff; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--brand-d); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.gh { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.gh:hover { background: var(--arena); }
.btn.claro { background: #fff; color: var(--brand-d); }
.btn.claro:hover { background: var(--arena); }
.btn.mal { background: var(--bad); }
.btn.chico { padding: 7px 13px; font-size: 13px; }
.btn.bloque { width: 100%; }
/* El naranja es el acento reservado para la única acción de más peso por
   pantalla -- no el botón de todos los días. */
.btn.acento { background: var(--terra); }
.btn.acento:hover { background: #E8730C; }

/* --- formularios --- */
.campo { display: grid; gap: 6px; margin-bottom: 16px; }
.campo > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.campo .ayuda { font-size: 12px; color: var(--ink-3); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=tel], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2);
  border-radius: var(--r-m); background: var(--surf); font: inherit;
  font-size: 15px; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l);
}
textarea { resize: vertical; min-height: 96px; }
label.check { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; cursor: pointer; }
label.check input { margin-top: 3px; }

/* --- avisos --- */
.aviso {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--surf);
  font-size: 14px; margin-bottom: 16px;
}
.aviso.ok   { background: var(--ok-bg);   border-color: #BFDDCC; color: #14523A; }
.aviso.warn { background: var(--warn-bg); border-color: #E9D2A2; color: #7A5312; }
.aviso.mal  { background: var(--bad-bg);  border-color: #E9C3BD; color: #7E2A21; }

/* --- etiquetas de estado --- */
.tag {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  background: var(--arena-d); color: var(--ink-2);
}
.tag.ok   { background: var(--ok-bg);   color: #14523A; }
.tag.warn { background: var(--warn-bg); color: #7A5312; }
.tag.mal  { background: var(--bad-bg);  color: #7E2A21; }

.oculto { display: none !important; }
