:root {
  --rojo: #D32F2F; --rojo-osc: #B71C1C; --fondo: #F6F5F3; --tarjeta: #FFFFFF; --texto: #1C1B1A;
  --suave: #6B6762; --linea: #E4E1DC; --verde: #2E7D32; --verde-f: #E8F5E9; --rojo-f: #FDECEA;
  --amarillo-f: #FFF8E1; --gris-f: #EEEDEA; --radio: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fondo); color: var(--texto); font-size: 17px; line-height: 1.45; }
.barra { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; background: var(--rojo); color: #fff; }
.marca { font-size: 20px; letter-spacing: .2px; }
.quien { font-size: 14px; opacity: .9; }
.app { max-width: 980px; margin: 0 auto; padding: 18px 16px 60px; }
.cargando { color: var(--suave); }

h1 { font-size: 26px; margin: 4px 0 2px; }
h2 { font-size: 19px; margin: 28px 0 10px; }
.sub { color: var(--suave); margin: 0 0 16px; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px; margin-bottom: 14px; }
.grilla { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.dato { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.etiqueta { font-size: 14px; color: var(--suave); }

label { display: block; font-size: 15px; color: var(--suave); margin: 12px 0 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--linea);
  border-radius: 10px; background: #fff; min-height: 48px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #F4A9A8; outline-offset: 1px; border-color: var(--rojo); }
input.grande { font-size: 34px; letter-spacing: 3px; text-align: center; font-variant-numeric: tabular-nums; }

button, .boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 0 20px; border: 0; border-radius: 10px; background: var(--rojo); color: #fff; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; }
button:hover { background: var(--rojo-osc); }
button:disabled { opacity: .55; cursor: wait; }
button.ancho { width: 100%; margin-top: 16px; font-size: 19px; min-height: 56px; }
button.secundario { background: #fff; color: var(--texto); border: 1.5px solid var(--linea); }
button.secundario:hover { background: var(--gris-f); }
button.chico { min-height: 38px; padding: 0 12px; font-size: 14px; }

.foto { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.foto img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--linea); }
.oculto { display: none !important; }

.aviso { border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.aviso.ok { background: var(--verde-f); color: var(--verde); }
.aviso.mal { background: var(--rojo-f); color: var(--rojo-osc); }
.aviso.ojo { background: var(--amarillo-f); color: #7A5A00; }

.pestanas { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas button { background: #fff; color: var(--texto); border: 1.5px solid var(--linea); white-space: nowrap; min-height: 42px; }
.pestanas button[aria-selected="true"] { background: var(--texto); color: #fff; border-color: var(--texto); }

table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--linea); text-align: left; vertical-align: top; }
th { font-size: 13px; color: var(--suave); font-weight: 600; }
td.num, th.num { text-align: right; }
.tabla { overflow-x: auto; }

.chip { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.chip.verde { background: var(--verde-f); color: var(--verde); }
.chip.rojo { background: var(--rojo-f); color: var(--rojo-osc); }
.chip.gris { background: var(--gris-f); color: var(--suave); }
.chip.ojo { background: var(--amarillo-f); color: #7A5A00; }

.grafico svg { width: 100%; height: auto; display: block; }
.fila { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.fila > * { flex: 1 1 160px; }
.nota { font-size: 14px; color: var(--suave); }
