/* SealClock · estilos de la página de firma y de la app del centro.
   Aspecto: el de StaffClock (frontend/vll/estilos.css: tarjetas redondeadas con sombra suave,
   etiquetas en mayúsculas espaciadas, campos amplios, botones de píldora, avisos con filete).
   Colores: SOLO la paleta del CLAUDE.md (tokens ah- del Master). Rojo, solo para alertas. */
@font-face { font-family: 'Inria Sans'; font-weight: 400; src: url('/estatico/fuentes/InriaSans-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Inria Sans'; font-weight: 700; src: url('/estatico/fuentes/InriaSans-Bold.ttf') format('truetype'); font-display: swap; }

:root {
  --ah-blue: #005490; --ah-blue-hover: #003e6c; --ah-blue-soft: #E0ECF5; --ah-blue-tint: #F2F7FB;
  --ah-red: #d02e30; --ah-red-dark: #A52426; --ah-red-soft: #FBE4E5;
  --ah-green-ok: #0f7a4f; --ah-green-soft: #D6F5E9;
  --ah-amber-fg: #8A5A00; --ah-amber-soft: #FEF3CF;
  --ah-ink: #111827; --ah-ink2: #374151; --ah-ink3: #6B7280; --ah-ink4: #9AA3B2;
  --ah-border: #E5E7EB; --ah-border-soft: #EEF0F3; --ah-bg: #F5F6F8; --ah-surface: #FFFFFF;
  --radio: 14px; --radio-peq: 8px;
  --sombra: 0 2px 8px rgba(17, 24, 39, .05), 0 0 0 1px rgba(17, 24, 39, .04);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ah-bg); color: var(--ah-ink); font: 16px/1.5 'Inria Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--ah-blue); }
p { margin: 0 0 12px; }
h1, h2 { margin: 0; }
button { font-family: inherit; }
.oculto { display: none !important; }

/* ---- Marca: centrada, en cursiva y espaciada (como el «AIR-HOSTESS» de StaffClock), en azul ---- */
.marca-centro { text-align: center; margin: 32px 0 32px; }
.marca-centro .logo { display: inline-block; font-size: 26px; font-weight: 700; font-style: italic; letter-spacing: 4px; color: var(--ah-blue); text-decoration: none; text-transform: uppercase; }
.marca-centro .sub { font-size: 11px; letter-spacing: 3px; color: var(--ah-ink3); text-transform: uppercase; margin-top: 4px; }

/* ---- Barra de la app ---- */
.barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1040px; margin: 0 auto; padding: 18px 20px 6px; }
.barra .logo { font-size: 15px; font-weight: 700; font-style: italic; letter-spacing: 3px; color: var(--ah-blue); text-decoration: none; text-transform: uppercase; }
.pestanas { display: flex; gap: 4px; background: var(--ah-surface); padding: 4px; border-radius: 999px; box-shadow: var(--sombra); }
.pestanas a { padding: 7px 16px; border-radius: 999px; color: var(--ah-ink2); text-decoration: none; font-size: 14px; font-weight: 700; }
.pestanas a:hover { background: var(--ah-bg); }
.pestanas a.activo { background: var(--ah-blue); color: #FFFFFF; }
.usuario { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 6px; border: 1px solid var(--ah-border); border-radius: 999px; background: var(--ah-surface); font-size: 13px; color: var(--ah-ink2); }
.usuario .avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--ah-blue); color: #FFFFFF; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.usuario form { margin: 0; }
.usuario button { border: 0; background: var(--ah-bg); color: var(--ah-ink2); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.usuario button:hover { background: var(--ah-border); }
.banda-ensayo { background: var(--ah-amber-soft); color: var(--ah-amber-fg); text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 6px 16px; }

/* ---- Contenedores ---- */
main { max-width: 560px; margin: 0 auto; padding: 0 20px 40px; }
main.ancho { max-width: 1040px; padding-top: 18px; }
main.medio { max-width: 760px; padding-top: 18px; }
.tarjeta { background: var(--ah-surface); border-radius: var(--radio); padding: 26px 24px; margin: 0 0 16px; box-shadow: var(--sombra); }
.tarjeta.compacta { padding: 18px 20px; }
.titulo { font-size: 24px; font-weight: 700; line-height: 1.2; margin: 0 0 4px; }
.subtitulo { font-size: 14px; color: var(--ah-ink3); margin: 0 0 22px; }
.encabezado { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }
.encabezado .titulo { margin: 0; }
.seccion { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--ah-blue); margin: 0 0 10px; }
.separador { border-top: 1px solid var(--ah-border); margin: 22px 0 18px; }
.apoyo { color: var(--ah-ink3); font-size: 14px; }
.tenue { color: var(--ah-ink4); font-size: 12px; }
.pie { text-align: center; margin: 28px 0 0; font-size: 11px; letter-spacing: .5px; color: var(--ah-ink3); }
.huella { font-size: 11px; color: var(--ah-ink3); word-break: break-all; letter-spacing: .2px; }
ul.docs { margin: 0 0 12px; padding-left: 20px; }
ul.docs li { margin: 0 0 4px; }

/* ---- Campos ---- */
.campo { margin: 0 0 16px; }
.campo > label, .etiqueta-campo { display: block; font-size: 11px; letter-spacing: 1px; color: var(--ah-ink3); text-transform: uppercase; margin: 0 0 6px; }
.campo input, .campo textarea, .campo select, input.normal {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--ah-border); border-radius: var(--radio-peq);
  font: inherit; font-size: 16px; background: var(--ah-surface); color: var(--ah-ink); transition: border-color .15s; }
.campo input:focus, .campo textarea:focus, .campo select:focus, input.normal:focus { outline: none; border-color: var(--ah-blue); }
.campo input.mal { border-color: var(--ah-red); }
.campo input.bien { border-color: var(--ah-green-ok); }
.campo textarea { min-height: 80px; resize: vertical; font-size: 15px; }
.campo .nota { font-size: 12px; color: var(--ah-ink3); margin-top: 6px; }
.campo .nota.mal { color: var(--ah-red-dark); }
input.dni { text-transform: uppercase; letter-spacing: 2px; font-size: 20px; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .dos { grid-template-columns: 1fr; } }

/* ---- Botones (píldora, como StaffClock) ---- */
.btn, .boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 999px;
  font: inherit; font-size: 16px; font-weight: 700; border: 0; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; }
.btn:active, .boton:active { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primario, .boton { background: var(--ah-blue); color: #FFFFFF; }
.btn-primario:hover:not(:disabled), .boton:hover { background: var(--ah-blue-hover); }
.btn-secundario, .boton.secundario { background: var(--ah-surface); color: var(--ah-blue); border: 1.5px solid var(--ah-border); }
.btn-secundario:hover, .boton.secundario:hover { border-color: var(--ah-blue); background: var(--ah-surface); }
.btn-bloque { width: 100%; }
.btn-peq { padding: 8px 16px; font-size: 14px; }
.btn-texto { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--ah-blue); cursor: pointer; text-decoration: underline; }
.fila { margin-top: 16px; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
form.en-linea { display: inline-block; margin: 0; }

/* ---- Avisos (con filete a la izquierda, como StaffClock) ---- */
.aviso { padding: 12px 16px; border-radius: var(--radio-peq); margin: 0 0 18px; font-size: 14px; border-left: 3px solid; }
.aviso.error { background: var(--ah-red-soft); color: var(--ah-red-dark); border-color: var(--ah-red); }
.aviso.ok { background: var(--ah-green-soft); color: var(--ah-green-ok); border-color: var(--ah-green-ok); }
.aviso.espera { background: var(--ah-amber-soft); color: var(--ah-amber-fg); border-color: var(--ah-amber-fg); }
.aviso.info { background: var(--ah-blue-tint); color: var(--ah-ink2); border-color: var(--ah-blue); }
.aviso strong { display: block; margin-bottom: 2px; }

/* ---- Etiquetas y estados ---- */
.etiqueta { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 2px 9px; border-radius: 999px;
  background: var(--ah-blue-soft); color: var(--ah-blue); vertical-align: middle; }
.etiqueta.vol { background: var(--ah-bg); color: var(--ah-ink2); box-shadow: inset 0 0 0 1px var(--ah-border); }
.estado { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.estado.firmado { background: var(--ah-green-soft); color: var(--ah-green-ok); }
.estado.pendiente { background: var(--ah-amber-soft); color: var(--ah-amber-fg); }
.estado.rechazado { background: var(--ah-red-soft); color: var(--ah-red-dark); }
.estado.apagado { background: var(--ah-bg); color: var(--ah-ink3); box-shadow: inset 0 0 0 1px var(--ah-border); }

/* ---- Casillas grandes (aceptar, voluntario) ---- */
.eleccion { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0; padding: 13px 14px; border: 1.5px solid var(--ah-border); border-radius: var(--radio-peq); cursor: pointer; background: var(--ah-surface); }
.eleccion:hover { border-color: var(--ah-ink4); }
.eleccion:has(input:checked) { border-color: var(--ah-blue); background: var(--ah-blue-tint); }
.eleccion input { margin-top: 3px; width: 20px; height: 20px; flex: none; accent-color: var(--ah-blue); }
.frase { box-shadow: var(--sombra), inset 3px 0 0 var(--ah-blue); }
details > summary { cursor: pointer; color: var(--ah-ink2); font-weight: 700; font-size: 14px; }

/* ---- Visor de PDF ---- */
.visor { background: var(--ah-border-soft); border-radius: var(--radio-peq); padding: 10px; max-height: 75vh; overflow-y: auto; margin: 12px 0; }
.visor canvas { display: block; width: 100%; height: auto; background: #FFFFFF; margin: 0 0 8px; box-shadow: 0 1px 3px rgba(17, 24, 39, .12); }
.visor .pag { text-align: center; color: var(--ah-ink3); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; margin: -2px 0 12px; }
.visor .cargando { color: var(--ah-ink3); padding: 24px; text-align: center; font-size: 14px; }

/* ---- Mis sobres ---- */
.lista { display: flex; flex-direction: column; gap: 10px; }
.sobre { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 14px; align-items: center; background: var(--ah-surface); border-radius: var(--radio);
  padding: 14px 18px; color: var(--ah-ink); text-decoration: none; box-shadow: var(--sombra); transition: box-shadow .15s; }
.sobre:hover { box-shadow: var(--sombra), 0 0 0 1.5px var(--ah-blue); }
.sobre .icono { grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 50%; background: var(--ah-blue-tint); color: var(--ah-blue);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; letter-spacing: .5px; }
.s-asunto { font-weight: 700; }
.s-meta { grid-column: 2; color: var(--ah-ink3); font-size: 13px; }
.s-estado { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
.s-estado .apoyo { display: block; font-size: 12px; margin-top: 2px; }
.vacio { text-align: center; padding: 40px 20px; }
@media (max-width: 560px) { .sobre { grid-template-columns: auto 1fr; } .s-estado { grid-column: 2; grid-row: auto; text-align: left; } }

/* ---- Detalle ---- */
.datos { display: grid; grid-template-columns: 1fr; gap: 10px; }
.persona { display: flex; gap: 12px; align-items: center; }
.persona .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ah-blue-soft); color: var(--ah-blue); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.persona .quien { flex: 1; min-width: 0; }
.persona .quien strong { display: block; }
.persona .quien span { display: block; font-size: 13px; color: var(--ah-ink3); overflow-wrap: anywhere; }
.registro { list-style: none; margin: 0; padding: 0; font-size: 14px; border-left: 2px solid var(--ah-border); }
.registro li { padding: 0 0 10px 16px; position: relative; }
.registro li::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ah-surface); box-shadow: inset 0 0 0 2px var(--ah-ink4); }
.registro li.clave::before { box-shadow: inset 0 0 0 2px var(--ah-blue); background: var(--ah-blue-tint); }
.registro .cuando { display: block; font-size: 12px; color: var(--ah-ink3); }
.docfila { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--ah-border-soft); }
.docfila:first-of-type { border-top: 0; }
.docfila .quien { flex: 1; min-width: 0; }

/* ---- Nuevo sobre ---- */
.soltar { display: block; border: 1.5px dashed var(--ah-ink4); border-radius: var(--radio); background: var(--ah-surface); text-align: center; padding: 26px 16px; cursor: pointer; transition: all .15s; }
.soltar:hover, .soltar.encima { border-color: var(--ah-blue); background: var(--ah-blue-tint); }
.soltar strong { display: block; color: var(--ah-ink); font-size: 16px; }
.soltar span { font-size: 13px; color: var(--ah-ink3); }
.soltar input { display: none; }
.doc { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--ah-border-soft); }
.doc .mini { width: 54px; height: 70px; border-radius: 4px; background: var(--ah-border-soft); box-shadow: 0 0 0 1px var(--ah-border); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--ah-ink4); }
.doc .mini canvas { width: 100%; height: auto; display: block; }
.doc .d-titulo { padding: 9px 12px; font-size: 15px; }
.doc .d-centro { min-width: 0; }
.doc .d-titulo { width: 100%; }
.doc .d-pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.doc .d-info { font-size: 12px; color: var(--ah-ink3); }
.quitar { border: 0; background: none; color: var(--ah-ink4); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.quitar:hover { color: var(--ah-red-dark); background: var(--ah-red-soft); }
/* Interruptor */
.interruptor { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ah-ink2); cursor: pointer; user-select: none; white-space: nowrap; }
.interruptor input { position: absolute; opacity: 0; width: 0; height: 0; }
.interruptor .pista { width: 34px; height: 20px; border-radius: 999px; background: var(--ah-border); position: relative; transition: background .15s; flex: none; }
.interruptor .pista::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(17, 24, 39, .2); transition: left .15s; }
.interruptor input:checked + .pista { background: var(--ah-blue); }
.interruptor input:checked + .pista::after { left: 16px; }
.interruptor input:focus-visible + .pista { outline: 2px solid var(--ah-blue); outline-offset: 2px; }
/* Segmentos (León / Valladolid) */
.segmentos { display: flex; gap: 6px; }
.segmentos label { flex: 1; text-align: center; padding: 11px 0; border: 1.5px solid var(--ah-border); border-radius: var(--radio-peq); color: var(--ah-ink3); font-weight: 700; font-size: 14px; cursor: pointer; transition: all .15s; }
.segmentos input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmentos label:has(input:checked) { background: var(--ah-blue); border-color: var(--ah-blue); color: #FFFFFF; }
/* Buscador de alumnos */
.buscador { position: relative; }
.sugerencias { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--ah-surface); border-radius: var(--radio-peq); box-shadow: 0 8px 24px rgba(17, 24, 39, .12), 0 0 0 1px var(--ah-border); z-index: 5; max-height: 320px; overflow-y: auto; }
.sugerencias button { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; cursor: pointer; border-top: 1px solid var(--ah-border-soft); font: inherit; }
.sugerencias button:first-child { border-top: 0; }
.sugerencias button:hover, .sugerencias button.activa { background: var(--ah-blue-tint); }
.sugerencias .vacio { padding: 12px 14px; text-align: left; font-size: 14px; color: var(--ah-ink3); }
.recientes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.recientes button { border: 1px solid var(--ah-border); background: var(--ah-surface); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; color: var(--ah-ink2); cursor: pointer; }
.recientes button:hover { border-color: var(--ah-blue); color: var(--ah-blue); }
.firmante { border-radius: var(--radio-peq); background: var(--ah-bg); padding: 14px 16px; margin: 0 0 12px; }
.firmante .persona { margin-bottom: 0; }
.firmante .tutor { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ah-border); }
.firmante .campo input, .firmante .campo select { background: var(--ah-surface); }
.resumen .linea { font-size: 14px; color: var(--ah-ink2); margin: 0 0 12px; }
/* Utilidades (sin estilos en línea: la CSP no los deja) */
.centrado { text-align: center; }
.sin-margen { margin: 0; }
.volver { margin: 0 0 6px; }
.acciones.enlaces { margin-top: 4px; font-size: 14px; gap: 6px; }
.ancho-total { flex: 1; }
.titulo-doc { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.tarjeta > .titulo:first-child { margin-top: 0; }
@media (max-width: 640px) {
  .barra { padding: 14px 16px 4px; }
  .barra .logo { order: 1; }
  .usuario { order: 2; }
  .pestanas { order: 3; width: 100%; justify-content: space-between; }
  .pestanas a { flex: 1; text-align: center; padding: 7px 8px; }
  .usuario .cuenta { display: none; }
}
