/*
 * El lenguaje visual es el del carnet impreso (azul #1a3a7a, amarillo #f5c842):
 * quien escanea tiene que reconocer que esta página y el carnet son lo mismo.
 * Lo que cambia es el sello del encabezado, que dice el resultado en vivo.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  color: #222;
}

.card { background: #fff; border-radius: 16px; max-width: 480px; width: 100%; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.10); }

.header { background: #1a3a7a; padding: 28px 28px 22px; }
.header--rechazo { background: #7a1a1a; }
.logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.logo-circle { width: 52px; height: 52px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 6px; }
.logo-circle img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { color: #fff; font-size: 15px; font-weight: 600; }
.logo-sub { color: #f5c842; font-size: 11px; }
.name { color: #fff; font-size: 22px; font-weight: 700; line-height: 1.2; }
.role { color: #f5c842; font-size: 14px; font-weight: 500; margin-top: 4px; }

/* El sello: lo primero que se lee, y lo único que importa si no hay tiempo. */
.sello { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 20px; letter-spacing: 0.4px; margin-bottom: 12px; }
.sello--cargando { background: rgba(255,255,255,0.18); color: #fff; }
.sello--ok { background: #2ecc71; color: #fff; }
.sello--no { background: #fff; color: #b91c1c; }
.sello--desconocido { background: #fff8e1; color: #7a5c00; }

.body { padding: 24px 28px; }
.section { margin-bottom: 20px; }
.section:last-child { margin-bottom: 0; }
.section-title { font-size: 11px; font-weight: 700; color: #1a3a7a; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; border-bottom: 2px solid #f5c842; padding-bottom: 4px; display: inline-block; }
.info-row { display: flex; gap: 8px; margin-bottom: 7px; font-size: 13px; }
.info-label { color: #888; min-width: 70px; flex-shrink: 0; }
.info-value { color: #222; font-weight: 500; overflow-wrap: anywhere; }
.info-value a { color: #1a3a7a; }
.vigencia { display: inline-block; background: #1a3a7a; color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 20px; }

.auth-box { background: #eaf3ff; border-left: 4px solid #1a3a7a; border-radius: 0 8px 8px 0; padding: 14px 16px; font-size: 13px; color: #1a3a7a; line-height: 1.6; }
.warning-box { background: #fff8e1; border-left: 4px solid #f5c842; border-radius: 0 8px 8px 0; padding: 14px 16px; font-size: 13px; color: #7a5c00; line-height: 1.6; }
.warning-title { font-weight: 700; margin-bottom: 4px; color: #b8860b; }
.alerta { background: #fef2f2; border-left: 4px solid #b91c1c; border-radius: 0 8px 8px 0; padding: 14px 16px; font-size: 13px; color: #7f1d1d; line-height: 1.6; }
.alerta strong { display: block; margin-bottom: 4px; }

.cargando { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #666; }
.girador { width: 16px; height: 16px; border: 2px solid #1a3a7a; border-right-color: transparent; border-radius: 50%; animation: girar 0.7s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.footer { background: #f7f9fc; border-top: 1px solid #e8edf3; padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer-text { font-size: 11px; color: #888; }
.footer-link { font-size: 11px; color: #1a3a7a; text-decoration: none; font-weight: 600; white-space: nowrap; }

@media (max-width: 380px) {
  .header, .body { padding-left: 20px; padding-right: 20px; }
  .footer { padding: 14px 20px; }
}

/* Portada: sin código en la URL. Logo grande y centrado; nada de sellos. */
.header--inicio { text-align: center; padding: 32px 28px 26px; }
.logo-marco { width: 96px; height: 96px; margin: 0 auto 14px; background: #fff; border-radius: 50%; padding: 12px; display: flex; align-items: center; justify-content: center; }
.logo-grande { width: 100%; height: 100%; object-fit: contain; }
.inicio-titulo { margin-top: 16px; }
.pasos { margin: 14px 0 0 18px; font-size: 13px; color: #333; line-height: 1.6; }
.pasos li { margin-bottom: 6px; padding-left: 4px; }
