/* Tipografías propias (OFL) */
[hidden] { display: none !important; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-SemiBold.277d45807d45.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-Bold.f599739e9476.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --verde: #0a9447;
  --verde-osc: #0b5d31;
  --verde-prof: #073d21;
  --verde-claro: #dff3e6;
  --amarillo: #ffe000;
  --amarillo-osc: #e6c800;
  --tinta: #15181a;
  --gris: #4b5563;
  --linea: #dfe3d8;
  --fondo: #f4f5f0;
  --blanco: #ffffff;
  --ok-bg: #dcfce7; --ok-tx: #14532d;
  --warn-bg: #fef3c7; --warn-tx: #78350f;
  --bad-bg: #fee2e2; --bad-tx: #7f1d1d;
  --info-bg: #dbeafe; --info-tx: #1e3a8a;
  --muted-bg: #e5e7eb; --muted-tx: #374151;
  --radio: 14px;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --texto: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--texto); color: var(--tinta); background: var(--fondo); line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: var(--verde-osc); }
a:hover { color: var(--verde-prof); }
h1, h2, h3, .display { font-family: var(--display); line-height: 1.05; margin: 0 0 .4em; }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }

.contenedor { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px;
  border-radius: 10px; border: 2px solid transparent; font: 700 17px/1.2 var(--texto); text-decoration: none; cursor: pointer; }
.btn-primario { background: var(--verde); color: #fff; }
.btn-primario:hover { background: var(--verde-osc); color: #fff; }
.btn-amarillo { background: var(--amarillo); color: var(--verde-prof); }
.btn-amarillo:hover { background: var(--amarillo-osc); color: var(--verde-prof); }
.btn-borde { background: #fff; color: var(--verde-osc); border-color: var(--verde); }
.btn-borde:hover { background: var(--verde-claro); }
.btn-fantasma { background: transparent; color: #fff; border-color: #fff; }
.btn-gris { background: #fff; color: var(--tinta); border-color: #b8c0ad; }
.btn-chico { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Etiquetas de estado */
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok-tx); }
.badge.warn { background: var(--warn-bg); color: var(--warn-tx); }
.badge.bad { background: var(--bad-bg); color: var(--bad-tx); }
.badge.info { background: var(--info-bg); color: var(--info-tx); }
.badge.muted { background: var(--muted-bg); color: var(--muted-tx); }

/* Formularios */
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.campo label { font-weight: 700; }
.campo .ayuda { font-size: 14px; color: var(--gris); }
.campo .error, .errorlist { color: var(--bad-tx); font-size: 15px; margin: 0; padding: 0; list-style: none; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url],
input[type=password], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: 12px 14px; font: 18px var(--texto); border: 2px solid #b8c0ad; border-radius: 10px; background: #fff; color: var(--tinta);
}
input:focus, select:focus, textarea:focus { border-color: var(--verde); outline: none; box-shadow: 0 0 0 3px rgba(10,148,71,.2); }
textarea { min-height: 110px; }
.fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--verde); vertical-align: middle; }

.mensajes { list-style: none; padding: 0; margin: 0 0 20px; }
.mensajes li { padding: 14px 18px; border-radius: 12px; font-weight: 700; margin-bottom: 8px; }
.mensajes .success { background: var(--ok-bg); color: var(--ok-tx); }
.mensajes .error { background: var(--bad-bg); color: var(--bad-tx); }
.mensajes .warning { background: var(--warn-bg); color: var(--warn-tx); }
.mensajes .info { background: var(--info-bg); color: var(--info-tx); }

/* Tablas */
.tabla-box { overflow-x: auto; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); }
table.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; background: #eef2e8; padding: 12px 14px; font-size: 15px; white-space: nowrap; }
.tabla td { padding: 12px 14px; border-top: 1px solid #eceee8; vertical-align: middle; }
.tabla .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla tr.destacada td { background: #fffbe0; font-weight: 700; }

.tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 22px; }
.grilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.muted { color: var(--gris); }
.chico { font-size: 15px; }

/* Foto carnet 4x4 */
.foto-carnet { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 3px solid #fff; background: #e5e7eb; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.foto-carnet.chica { width: 84px; height: 84px; }
.foto-carnet.grande { width: 200px; height: 200px; }
.foto-carnet.vacia { display: flex; align-items: center; justify-content: center; color: #6b7280; font-size: 13px; text-align: center; }
.foto-campo { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
