/* Pensado para tablet en el meson del evento: una sola columna angosta,
   sin scroll, con los campos y el boton grandes de verdad. */
:root {
  --tinta:   #0b1220;
  --suave:   #64748b;
  --linea:   #cbd5e1;
  --fondo:   #f1f5f9;
  --papel:   #ffffff;
  --acento:  #0369a1;
  --acento2: #075985;
  --ok:      #15803d;
  --alerta:  #b91c1c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--fondo);
  color: var(--tinta);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.hoja {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
}

h1 {
  margin: 8px 0 22px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

form { display: flex; flex-direction: column; gap: 12px; }

.campo {
  width: 100%;
  padding: 18px 20px;
  font-size: 21px;
  font-family: inherit;
  color: var(--tinta);
  background: var(--papel);
  border: 2px solid var(--linea);
  border-radius: 16px;
  outline: none;
  text-align: center;
}
.campo::placeholder { color: var(--suave); }
.campo:focus { border-color: var(--acento); box-shadow: 0 0 0 4px rgba(3, 105, 161, .16); }

.principal {
  margin-top: 10px;
  width: 100%;
  padding: 22px 24px;
  font-family: inherit;
  font-size: 21px;
  font-weight: 900;
  color: #fff;
  background: var(--acento);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(3, 105, 161, .28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.principal:active { background: var(--acento2); transform: translateY(1px); }
.principal[disabled] { opacity: .6; cursor: default; }

.contador {
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--suave);
  min-height: 20px;
}

.pie {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  color: var(--suave);
  text-decoration: none;
  border-bottom: 1px solid var(--linea);
}

/* Confirmacion a pantalla completa */
.listo {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--ok);
  color: #fff;
  z-index: 40;
  animation: aparecer .12s ease-out;
}
.listo svg {
  width: 96px; height: 96px;
  fill: none; stroke: #fff; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.listo p { margin: 0; font-size: 30px; font-weight: 900; }
@keyframes aparecer { from { opacity: 0 } to { opacity: 1 } }

/* Modal del proyecto (nunca alert() del navegador) */
.fondo-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 18, 32, .55);
  z-index: 50;
}
.modal {
  width: 100%;
  max-width: 420px;
  padding: 26px 24px;
  background: var(--papel);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(11, 18, 32, .35);
}
.modal h2 { margin: 0 0 10px; font-size: 22px; }
.modal p  { margin: 0 0 20px; font-size: 17px; color: var(--suave); line-height: 1.45; }

/* ---- pantalla de registros ---- */
.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.barra h1 { margin: 0; font-size: 22px; }
.grupo { display: inline-flex; border-radius: 999px; overflow: hidden; box-shadow: 0 2px 8px rgba(11,18,32,.14); }
.grupo a, .grupo button {
  padding: 11px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--tinta);
  background: #e2e8f0;
  border: 0;
  border-right: 1px solid #cbd5e1;
  text-decoration: none;
  cursor: pointer;
}
.grupo :last-child { border-right: 0; }
.grupo a:active, .grupo button:active { background: #cbd5e1; }

.tabla-caja { overflow-x: auto; background: var(--papel); border-radius: 16px; box-shadow: 0 2px 10px rgba(11,18,32,.08); }
table { width: 100%; border-collapse: collapse; font-size: 15px; text-align: left; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); }
tr:last-child td { border-bottom: 0; }
td.vacio { color: #cbd5e1; }

.ancho { max-width: 1040px; text-align: left; }
.aviso { color: var(--alerta); font-size: 15px; min-height: 20px; margin: 12px 0 0; }

/* `display:flex`/`display:block` de las reglas de arriba le ganan al atributo
   `hidden`, asi que los overlays saldrian siempre en pantalla. Esto lo corta. */
[hidden] { display: none !important; }
