/* Protocolos · diseño móvil primero */
:root {
  --fondo: #F4F1EA;
  --papel: #FFFFFF;
  --tinta: #1B2A2F;
  --tenue: #5B6B70;
  --linea: #E6E1D6;
  --marca: #0E6E66;
  --marca-osc: #0A524C;
  --marca-tint: #DDEFEC;
  --rojo: #C8372D;
  --rojo-tint: #FBE4E1;
  --rojo-txt: #A12A20;
  --ambar: #FCEBC9;
  --ambar-txt: #6E4700;
  --verde: #23875A;
  --verde-tint: #DCEFE4;
  --verde-txt: #1A5E3E;
  --r: 20px;
  --barra: 86px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 16px/1.4 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
body.con-barra { padding-bottom: calc(var(--barra) + env(safe-area-inset-bottom)); }
a { color: var(--marca); }
h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; margin: 0; }
h2 { font-size: 17px; font-weight: 800; margin: 0; }
p { margin: 0 0 8px; }
.ico { flex: none; display: block; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pantalla { max-width: 560px; margin: 0 auto; padding: 20px 16px 120px; display: flex; flex-direction: column; gap: 14px; }
.tenue { color: var(--tenue); font-weight: 500; }
.peq { font-size: 13px; }
.centro { text-align: center; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.rojo-txt { color: var(--rojo-txt) !important; font-weight: 700; }
.ambar-txt { color: #8A5A00 !important; font-weight: 600; }
.si { color: var(--verde); font-weight: 800; }
.no { color: var(--rojo); font-weight: 800; }
.error { background: var(--rojo-tint); color: var(--rojo-txt); border-radius: 14px; padding: 12px 14px; font-weight: 600; }
code { background: #EEEAE1; border-radius: 6px; padding: 1px 5px; font-size: 13px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--marca); color: #fff; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:active { transform: scale(0.98); }
.btn.grande { min-height: 58px; font-size: 17px; font-weight: 800; border-radius: 18px; }
.btn.ancho { width: 100%; }
.btn.sec { background: var(--papel); color: var(--marca); box-shadow: inset 0 0 0 2px var(--marca); }
.btn.mini { min-height: 40px; padding: 0 12px; font-size: 13.5px; border-radius: 12px; }
.btn.peligro { background: var(--papel); color: var(--rojo); box-shadow: inset 0 0 0 2px var(--rojo); }
.btn:disabled { opacity: .6; }
.btn-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--papel); color: var(--tinta); border: 0; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; flex: none; }
.btn-ico.claro { background: rgba(255,255,255,0.18); color: #fff; }
.btn-ico.suave { background: transparent; color: var(--tenue); width: 40px; height: 40px; }
.link { font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }

/* Cabeceras */
.cab-simple { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.cab-simple h1 { flex: 1; }
.cab-simple .btn-ico + h1 { text-align: left; }
.fecha { font-size: 13px; color: var(--tenue); font-weight: 600; }
.saludo { display: flex; align-items: center; gap: 12px; }
.saludo h1 { font-size: 21px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--marca); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; text-decoration: none; flex: none; }
.aviso-nombre { display: flex; align-items: center; gap: 10px; background: var(--ambar); color: var(--ambar-txt); border-radius: 16px; padding: 12px 14px; text-decoration: none; font-weight: 600; font-size: 14px; }
.aviso-nombre span { flex: 1; }

/* Contadores */
.contadores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cont { border-radius: var(--r); padding: 14px 12px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; min-height: 92px; }
.cont b { font-size: 34px; font-weight: 800; line-height: 1; }
.cont span { font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.cont.rojo { background: var(--rojo); color: #fff; }
.cont.ambar { background: var(--ambar); color: var(--ambar-txt); }
.cont.verde { background: var(--verde-tint); color: var(--verde-txt); }
.seccion { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.seccion a { font-weight: 700; font-size: 14px; text-decoration: none; }

/* Tarjetas de tarea */
.lista { display: flex; flex-direction: column; gap: 10px; }
.tarea, .doc { background: var(--papel); border-radius: var(--r); box-shadow: 0 1px 0 rgba(27,42,47,0.06); overflow: hidden; }
.tarea.est-tarde { box-shadow: inset 0 0 0 2px var(--rojo); }
.tarea-cab, .doc-cab { display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none; color: var(--tinta); }
.baldosa { border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.baldosa.neutra { width: 46px; height: 46px; background: #EEEAE1; color: var(--tenue); }
.tarea-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tarea-nom { font-size: 16px; font-weight: 700; }
.tarea-sub { font-size: 13px; color: var(--tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarea-cuando { font-size: 12.5px; color: var(--tenue); font-weight: 600; }
.est-tarde .tarea-cuando { color: var(--rojo-txt); }
.est-hoy .tarea-cuando { color: #8A5A00; }
.badge { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 4px 9px; white-space: nowrap; text-decoration: none; flex: none; }
.badge.rojo { background: var(--rojo); color: #fff; }
.badge.ambar { background: var(--ambar); color: var(--ambar-txt); }
.badge.gris { background: #EEEAE1; color: var(--tenue); }
.badge.verde { background: var(--verde-tint); color: var(--verde-txt); }
.tarea-pasos, .doc-acc { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.paso-form { flex: 1 1 120px; margin: 0; display: flex; }
.paso-btn { flex: 1; min-height: 46px; border-radius: 13px; border: 2px dashed var(--marca); background: var(--papel); color: var(--marca); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.paso-btn:active { background: var(--marca-tint); }
.paso-hecho { flex: 1 1 110px; min-height: 46px; border-radius: 13px; background: var(--verde-tint); color: var(--verde-txt); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.doc-acc { align-items: center; }
.doc-acc .paso-btn { flex: 0 1 auto; padding: 0 16px; }
.doc.archivado { opacity: .6; }
.vacio { background: var(--papel); border-radius: var(--r); padding: 24px; text-align: center; color: var(--tenue); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vacio .ico { color: var(--verde); }
.vacio-grande { text-align: center; padding: 60px 10px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* Barra inferior */
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--barra) + env(safe-area-inset-bottom)); padding: 10px 6px env(safe-area-inset-bottom); background: var(--papel); border-top: 1px solid var(--linea); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--tenue); font-size: 11.5px; font-weight: 600; padding-top: 2px; }
.tab.on { color: var(--marca); font-weight: 800; }
.fab { justify-self: center; margin-top: -30px; width: 62px; height: 62px; border-radius: 50%; background: var(--marca); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(14,110,102,0.35); border: 4px solid var(--fondo); }
@media (min-width: 700px) { .barra { left: 50%; transform: translateX(-50%); max-width: 560px; border: 1px solid var(--linea); border-bottom: 0; border-radius: 22px 22px 0 0; } }

/* Toast */
.toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 40; background: var(--tinta); color: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 20px rgba(0,0,0,0.2); transition: opacity .3s, transform .3s; }
.toast .ico { color: #5FD3A0; }
.toast.fuera { opacity: 0; transform: translate(-50%, -20px); pointer-events: none; }

/* Registrar */
.paso-titulo { font-size: 13px; font-weight: 800; color: var(--tenue); letter-spacing: 0.4px; text-transform: uppercase; margin: 6px 0 -4px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; height: 98px; border-radius: 18px; background: var(--papel); color: var(--c); text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 1px 0 rgba(27,42,47,0.06); }
.tile span { font-size: 14px; font-weight: 700; color: var(--tinta); }
.tile.on { background: var(--t); box-shadow: inset 0 0 0 3px var(--c); }
.tile.on span { color: var(--c); }
.tile-ok { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; display: flex; align-items: center; justify-content: center; }
.tiles-mini { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tiles-mini .tile { height: 64px; border-radius: 14px; gap: 3px; }
.tiles-mini .tile span { font-size: 10.5px; }
.tiles-mini .tile-ok { width: 20px; height: 20px; top: -6px; right: -6px; }
.form-registro { display: flex; flex-direction: column; gap: 14px; }
.buscador { display: flex; align-items: center; gap: 10px; background: var(--papel); border-radius: 16px; padding: 0 14px; min-height: 52px; color: var(--tenue); box-shadow: inset 0 0 0 1.5px var(--linea); }
.buscador:focus-within { box-shadow: inset 0 0 0 2px var(--marca); }
.buscador input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 600; color: var(--tinta); flex: 1; min-width: 0; height: 50px; }
.buscador.grande { min-height: 58px; box-shadow: inset 0 0 0 2px var(--marca); }
.buscador.grande input { font-size: 18px; }
.campo { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.etq { font-size: 13.5px; font-weight: 700; color: var(--tenue); padding: 0; }
.req { color: var(--rojo); }
.campo input, .campo select, .campo textarea, .caja textarea, .caja input:not([type=radio]):not([type=checkbox]) { width: 100%; font: inherit; font-size: 16px; font-weight: 500; color: var(--tinta); background: var(--papel); border: 0; border-radius: 14px; padding: 13px 14px; box-shadow: inset 0 0 0 1.5px var(--linea); outline: 0; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .caja textarea:focus { box-shadow: inset 0 0 0 2px var(--marca); }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .chip-check { position: relative; }
.chip input, .chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip span, .chip-check span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--papel); box-shadow: inset 0 0 0 1.5px var(--linea); font-weight: 600; font-size: 15px; cursor: pointer; user-select: none; }
.chip-check span .ico { opacity: 0; width: 0; transition: width .15s; }
.chip input:checked + span { background: var(--marca); color: #fff; box-shadow: none; }
.chip-check input:checked + span { background: var(--verde-tint); color: var(--verde-txt); box-shadow: inset 0 0 0 2px var(--verde); }
.chip-check input:checked + span .ico { opacity: 1; width: 16px; }
.chip.suave input:checked + span { background: #EEEAE1; color: var(--tenue); }
.chip input:focus-visible + span, .chip-check input:focus-visible + span { outline: 3px solid var(--marca); outline-offset: 2px; }
.chips.grandes .chip span { min-height: 54px; font-size: 17px; padding: 0 20px; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--fondo); text-decoration: none; font-weight: 700; font-size: 14px; }
details.mas { background: var(--papel); border-radius: 16px; padding: 4px 14px; }
details.mas[open] { padding-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
details.mas summary { min-height: 46px; display: flex; align-items: center; font-weight: 700; color: var(--marca); cursor: pointer; }
details.mas .campo input, details.mas .campo textarea { background: var(--fondo); }
.pie-fijo { position: sticky; bottom: 0; margin: 4px -16px 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(244,241,234,0), var(--fondo) 30%); z-index: 10; }
body.con-barra .pie-fijo { bottom: calc(var(--barra) + env(safe-area-inset-bottom)); }

/* Tarea */
.cab-color { background: var(--c); color: #fff; margin: -20px -16px 0; padding: 18px 20px 24px; border-radius: 0 0 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.fila-sb { display: flex; align-items: center; justify-content: space-between; }
.pildora { font-size: 13px; font-weight: 700; background: rgba(255,255,255,0.18); border-radius: 999px; padding: 7px 12px; display: inline-flex; gap: 6px; align-items: center; }
.cab-nombre { font-size: 30px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.1; }
.cab-sub { font-size: 14.5px; opacity: 0.92; }
.progreso { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.barra-p { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.25); overflow: hidden; }
.barra-p i { display: block; height: 100%; background: #fff; border-radius: 999px; }
.pasos { display: flex; flex-direction: column; gap: 10px; }
.pasos form { margin: 0; }
.paso { width: 100%; background: var(--papel); border: 0; border-radius: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 14px; font: inherit; text-align: left; color: var(--tinta); }
.paso.boton { box-shadow: inset 0 0 0 2px var(--marca); cursor: pointer; }
.paso.boton:active { background: var(--marca-tint); }
.paso-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.paso-txt b { font-size: 15.5px; }
.paso-txt small { font-size: 12.5px; color: var(--tenue); }
.circulo { width: 40px; height: 40px; border-radius: 50%; border: 3px dashed var(--marca); flex: none; display: flex; align-items: center; justify-content: center; }
.circulo.lleno { border: 0; background: var(--verde); color: #fff; }
.tocar { font-size: 13px; font-weight: 800; color: var(--marca); }
.paso-opciones { display: flex; gap: 8px; padding-left: 54px; margin-top: -4px; }
.paso-opciones form { flex: 1; }
.paso-opciones .btn { width: 100%; }
.tarjeta-link { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; text-decoration: none; color: var(--tinta); background: var(--papel); }
.tarjeta-link.amarilla { background: #FFF8E8; }
.tarjeta-link span:not(.mini-baldosa) { flex: 1; display: flex; flex-direction: column; }
.tarjeta-link small { color: var(--tenue); font-size: 12.5px; }
.mini-baldosa { width: 40px; height: 40px; border-radius: 12px; background: var(--ambar); color: #8A5A00; display: flex; align-items: center; justify-content: center; flex: none; }
.caja { background: var(--papel); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.caja h2 { font-size: 16px; }
.caja summary { font-weight: 700; cursor: pointer; }
.datos { gap: 0; padding: 4px 14px; }
.dato { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EEEAE1; font-size: 14.5px; }
.dato:last-child { border-bottom: 0; }
.dato span { color: var(--tenue); }
.dato b { text-align: right; }
.nota { margin: 0; font-size: 15px; white-space: pre-line; }

/* Buscar */
.filtros-scroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.filtros-scroll::-webkit-scrollbar { display: none; }
.filtro { flex: none; min-height: 38px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--papel); color: var(--tinta); text-decoration: none; font-weight: 600; font-size: 14px; }
.filtro.on { background: var(--tinta); color: #fff; }

/* Protocolos */
.doc-titulo { display: flex; align-items: center; gap: 14px; }
.doc-titulo h1 { font-size: 25px; }
.doc-titulo p { margin: 2px 0 0; font-size: 14px; }
.hechos { display: flex; gap: 8px; flex-wrap: wrap; }
.hecho-chip { flex: 1 1 120px; background: var(--papel); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.hecho-chip small { font-size: 11.5px; font-weight: 700; color: var(--tenue); text-transform: uppercase; letter-spacing: .3px; }
.hecho-chip b { font-size: 15px; }
.doc-cuerpo { display: flex; flex-direction: column; gap: 8px; }
.doc-cuerpo h2, .doc-cuerpo h3 { font-size: 13px; font-weight: 800; color: var(--tenue); letter-spacing: 0.4px; text-transform: uppercase; margin: 10px 0 0; }
.doc-cuerpo h4 { font-size: 15px; margin: 8px 0 0; }
.doc-cuerpo p { background: var(--papel); border-radius: 16px; padding: 12px 14px; margin: 0; font-size: 15px; }
.doc-cuerpo ol { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doc-cuerpo ol li { counter-increment: paso; background: var(--papel); border-radius: 18px; padding: 14px 14px 14px 62px; position: relative; font-size: 15.5px; font-weight: 600; min-height: 62px; display: flex; align-items: center; }
.doc-cuerpo ol li::before { content: counter(paso); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: var(--tinta); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.doc-cuerpo ul { margin: 0; padding: 12px 14px 12px 34px; background: var(--papel); border-radius: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.callout { background: #FFF8E8; color: #5A3D00; border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.callout .ico { color: #8A5A00; margin-top: 1px; }

/* Control */
.periodos { display: flex; align-items: center; gap: 8px; }
.periodos span { flex: 1; text-align: center; font-weight: 700; font-size: 14.5px; }
.resumen-oscuro { background: var(--tinta); color: #fff; border-radius: 22px; padding: 16px; display: flex; align-items: center; gap: 16px; }
.resumen-oscuro > div:last-child { display: flex; flex-direction: column; gap: 4px; }
.resumen-oscuro b { font-size: 16px; }
.resumen-oscuro small { font-size: 13px; opacity: .8; }
.anillo { --p: 0; width: 84px; height: 84px; border-radius: 50%; flex: none; background: conic-gradient(#5FD3A0 calc(var(--p) * 1%), rgba(255,255,255,0.15) 0); display: flex; align-items: center; justify-content: center; }
.anillo span { width: 64px; height: 64px; border-radius: 50%; background: var(--tinta); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; }
.lista-control { display: flex; flex-direction: column; gap: 8px; }
.fila-control { background: var(--papel); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.fila-control.con-exc { box-shadow: inset 0 0 0 2px var(--rojo); }
.fc-cab { display: flex; align-items: center; gap: 12px; }
.fc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fc-txt b { font-size: 15px; }
.fc-txt small { font-size: 12.5px; color: var(--tenue); }
.toggle { display: flex; gap: 4px; flex: none; }
.toggle label { position: relative; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { width: 46px; height: 42px; border-radius: 12px; background: var(--fondo); color: #8C969A; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.toggle input:checked + .si { background: var(--verde); color: #fff; }
.toggle input:checked + .no { background: var(--rojo); color: #fff; }
.toggle input:focus-visible + span { outline: 3px solid var(--marca); outline-offset: 2px; }
.excepciones { display: flex; flex-direction: column; gap: 6px; }
.exc { background: #FBEDEA; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--tinta); text-decoration: none; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--papel); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.kpi b { font-size: 22px; font-weight: 800; }
.kpi small { font-size: 12.5px; color: var(--tenue); font-weight: 600; }
.tabla-scroll { overflow-x: auto; padding: 4px; }
.tabla { border-collapse: collapse; width: 100%; font-size: 14px; }
.tabla th, .tabla td { padding: 8px 6px; border-bottom: 1px solid #EEEAE1; text-align: center; white-space: nowrap; }
.tabla th:first-child, .tabla td:first-child { text-align: left; }
.tabla th .ico { margin: 0 auto; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla a { text-decoration: none; font-weight: 600; }
.lista-peq { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* PIN */
body.fondo-marca { background: var(--marca); }
.pin { max-width: 340px; margin: 0 auto; padding-top: 2vh; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; }
.pin-logo { width: 60px; height: 60px; border-radius: 22px; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
.pin h1 { font-size: 26px; }
.pin-sub { opacity: .85; margin: 0; }
.pin-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pin-puntos { display: flex; gap: 14px; min-height: 24px; margin: 8px 0 2px; }
.pin-puntos i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.7); }
.pin-puntos i.on { background: #fff; border-color: #fff; }
.pin-error { min-height: 22px; font-weight: 700; color: #FFD6CF; text-align: center; margin: 0; }
.teclado { display: grid; grid-template-columns: repeat(3, min(74px, 21vw)); gap: min(14px, 2vh) 18px; margin-top: 4px; }
.teclado button { width: min(74px, 21vw); height: min(74px, 21vw); border-radius: 50%; border: 0; background: rgba(255,255,255,0.14); color: #fff; font: inherit; font-size: 28px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.teclado button:active { background: rgba(255,255,255,0.3); }
.teclado .ok { background: #fff; color: var(--marca); }

/* ---------- Wakyma ---------- */
.autocompletar { position: relative; }
.sugerencias { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--papel); border-radius: 16px; box-shadow: 0 12px 32px rgba(27, 42, 47, .18), 0 0 0 1px var(--linea); max-height: 56vh; overflow-y: auto; }
.sugerencias li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; padding: 11px 12px; border-radius: 11px; cursor: pointer; min-height: 48px; align-items: center; }
.sugerencias li b { font-size: 16px; }
.sugerencias li small { grid-column: 1; color: var(--tenue); font-size: 13px; font-weight: 600; }
.sugerencias li .wk-tag { grid-column: 2; grid-row: 1 / span 2; }
.sugerencias li.on, .sugerencias li:hover { background: var(--marca-tint); }
.wk-tag { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--marca); background: var(--marca-tint); border-radius: 999px; padding: 3px 7px; }
.wk-nota { display: flex; align-items: center; gap: 6px; background: var(--marca-tint); color: var(--marca-osc); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; }
.badge.wk-badge { background: var(--marca-tint); color: var(--marca-osc); }
.tarea.wk { box-shadow: inset 4px 0 0 var(--marca); }
.paso-btn.fuerte { border-style: solid; background: var(--marca); color: #fff; }
.paso-btn.fuerte:active { background: var(--marca-osc); }
.paso-btn.suave { border: 2px solid var(--linea); color: var(--tenue); flex: 0 1 auto; }
.paso-form .paso-btn.suave { width: 100%; }
.seccion .cuenta { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; margin-left: 4px; border-radius: 999px; background: var(--marca); color: #fff; font-size: 13px; vertical-align: 2px; }
.ayuda { margin: -2px 0 8px; }
.sin-reg { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--ambar); color: var(--ambar-txt); font-size: 13.5px; font-weight: 700; text-decoration: none; }
.estado-wk { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.estado-wk.bien { color: var(--verde-txt); }
.estado-wk.mal { color: var(--rojo-txt); }
.datos-wk { margin: 4px 0 12px; padding-left: 18px; font-size: 14px; color: var(--tenue); }
.datos-wk li { margin: 3px 0; }
.filtros { margin-bottom: 10px; flex-wrap: wrap; }
.chip-link.on { background: var(--marca); color: #fff; }
.sel { flex: 1 1 200px; min-height: 46px; border-radius: 13px; border: 2px solid var(--linea); background: var(--papel); font: inherit; font-size: 15px; font-weight: 600; color: var(--tinta); padding: 0 10px; min-width: 0; }
.clave-caja { position: relative; width: 100%; max-width: 340px; margin: 8px auto 0; }
.clave-input { width: 100%; height: 58px; border-radius: 16px; border: 0; padding: 0 52px 0 18px; font: inherit; font-size: 18px; font-weight: 700; color: var(--tinta); background: #fff; }
.ver-clave { position: absolute; right: 6px; top: 6px; width: 46px; height: 46px; border: 0; background: transparent; color: var(--tenue); display: grid; place-items: center; cursor: pointer; }
.clave-ok { max-width: 340px; margin: 8px auto 0; background: #fff; color: var(--marca); }
.regla { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
details.caja summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tarea-alerta { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--rojo); margin-top: 2px; }
.aviso-chip { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: #FDECEC; color: #8A1F1F; font-size: 14px; }
.aviso-chip span { flex: 1 1 200px; }
.aviso-chip.gris { background: #EEEAE1; color: var(--tenue); }
.version { text-align: center; font-size: 12px; color: var(--tenue); opacity: .75; margin: 18px 0 0; }
.pin .version { color: inherit; }

/* ---------- Ordenador ---------- */
.marca-lateral, .fab span, .barra.solo-pc { display: none; }
@media (min-width: 1000px) {
  :root { --lateral: 248px; }
  body.con-barra, body.barra-solo-pc { padding-bottom: 0; padding-left: var(--lateral); }
  .barra.solo-pc { display: flex; }
  .barra { left: 0; top: 0; bottom: 0; right: auto; transform: none; width: var(--lateral); max-width: none; height: auto; border: 0; border-right: 1px solid var(--linea); border-radius: 0; padding: 22px 14px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
  .marca-lateral { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--tinta); text-decoration: none; font-size: 19px; font-weight: 800; letter-spacing: -0.2px; }
  .marca-lateral .ico { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--marca); color: #fff; }
  .fab { order: -1; margin: 0 0 14px; width: auto; height: 52px; border-radius: 16px; border: 0; gap: 8px; font-weight: 800; font-size: 16px; text-decoration: none; box-shadow: 0 4px 12px rgba(14,110,102,0.25); }
  .fab .ico { width: 22px; height: 22px; }
  .fab span { display: inline; }
  .fab:hover { background: var(--marca-osc); }
  .marca-lateral { order: -2; }
  .tab { flex-direction: row; gap: 12px; padding: 0 14px; height: 48px; border-radius: 14px; font-size: 15px; }
  .tab:hover { background: var(--fondo); color: var(--tinta); }
  .tab.on { background: var(--marca-tint); color: var(--marca); }

  .pantalla { max-width: 760px; padding: 36px 40px 60px; gap: 16px; }
  body.ancha .pantalla { max-width: 1180px; }
  h1 { font-size: 28px; }
  .saludo h1 { font-size: 26px; }
  .avatar { width: 54px; height: 54px; font-size: 18px; }

  /* Hoy: contadores y tarjetas en rejilla */
  .contadores { gap: 16px; }
  .cont { min-height: 112px; padding: 18px 20px; }
  .cont b { font-size: 42px; }
  .cont span { font-size: 15px; }
  .cont:hover { filter: brightness(0.97); }
  body.ancha .lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; align-items: start; }
  .seccion { margin-top: 12px; }
  .seccion h2 { font-size: 19px; }
  .tarea-cab:hover, .doc-cab:hover { background: #FBFAF6; }
  .paso-btn:hover { background: var(--marca-tint); }
  .btn:hover { filter: brightness(0.95); }

  /* Registrar: todas las pruebas en una fila */
  .tiles, .tiles-mini { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .tile { height: 110px; }
  .tile:hover { box-shadow: inset 0 0 0 2px var(--c); }
  .tiles-mini .tile { height: 64px; }

  .pie-fijo, body.con-barra .pie-fijo { margin: 4px 0 0; padding: 14px 0 18px; bottom: 0; }
  .toast { top: 20px; left: calc(50% + var(--lateral) / 2); }
  .cab-color { margin: 0; border-radius: 24px; padding: 22px 24px 26px; }
}

/* Comprobar registros */
.cab-acc { display: flex; align-items: center; gap: 8px; }
.ok-caja { background: var(--verde-tint); color: var(--verde-txt); border-radius: 14px; padding: 12px 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; margin: 0; }
.comp .tarea-cab { cursor: default; }
.comp-cuerpo { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.comp-grupo { background: #FAF8F3; border-radius: 14px; padding: 10px 12px; }
.comp-grupo summary { cursor: pointer; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; list-style: none; }
.comp-grupo summary::-webkit-details-marker { display: none; }
.comp-grupo summary::after { content: '▾'; margin-left: auto; color: var(--tenue); }
.comp-grupo:not([open]) summary::after { content: '▸'; }
.comp-lista { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.comp-lista li { font-size: 13.5px; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--linea); padding-top: 6px; }
.comp-lista a { color: var(--tinta); text-decoration: none; }
.comp-lista a:hover { color: var(--marca); text-decoration: underline; }
.comp-lista form { margin: 0; flex: none; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--marca); cursor: pointer; }
.comp .tarea-sub { white-space: normal; }

/* Registrar: tarjetas grandes con ilustración */
.ilus { display: block; flex: none; }
.reg-sub { margin: 4px 0 0; color: var(--tenue); font-weight: 600; font-size: 14.5px; }
.tiles-grandes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tiles-grandes .tile { height: auto; min-height: 168px; padding: 16px 12px; gap: 6px; text-align: center; border-radius: 22px; transition: transform .12s, box-shadow .12s; }
.tiles-grandes .ilus { width: 76px; height: 76px; }
.tiles-grandes .tile-nom { font-size: 17px; font-weight: 800; color: var(--tinta); }
.tiles-grandes .tile-sub { font-size: 12px; line-height: 1.3; color: var(--tenue); font-weight: 500; }
.tile-pend { font-size: 11.5px; font-weight: 800; color: var(--c); background: var(--t); border-radius: 999px; padding: 3px 10px; margin-top: 2px; }
.tiles-grandes .tile:active { transform: scale(0.98); }
@media (min-width: 1000px) {
  .pag-registrar h1 { font-size: 34px; }
  .pag-registrar .reg-sub { font-size: 17px; }
  .tiles-grandes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .tiles-grandes .tile { min-height: max(250px, calc((100vh - 230px) / 2)); padding: 24px; gap: 10px; border-radius: 28px; }
  .tiles-grandes .ilus { width: 130px; height: 130px; }
  .tiles-grandes .tile-nom { font-size: 28px; letter-spacing: -0.3px; }
  .tiles-grandes .tile-sub { font-size: 15px; max-width: 280px; }
  .tile-pend { font-size: 13px; padding: 4px 12px; }
  .tiles-grandes .tile:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(27,42,47,0.10), inset 0 0 0 3px var(--c); }
}
@media (max-width: 999px) {
  .tiles-grandes .tile { min-height: 138px; padding: 12px 10px; }
  .tiles-grandes .tile-sub { display: none; }
  .tiles-grandes .ilus { width: 72px; height: 72px; }
}
@media (min-width: 1000px) {
  .doc-cab .ilus { width: 84px; height: 84px; }
  .doc-cab .tarea-nom { font-size: 19px; }
  .doc-cab .tarea-sub { white-space: normal; font-size: 14px; }
  .doc-titulo .ilus { width: 120px; height: 120px; }
}

/* ---------- Estilo visual: opciones como tarjetas con icono ---------- */
.ilus-b { background: none !important; border-radius: 50%; }
.ilus-b .ilus { width: 100%; height: 100%; }
.cab-ilus { display: flex; align-items: center; gap: 14px; }
.cab-ilus .ilus { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18)); }
.circulo { color: var(--marca); }
.paso-btn .ico, .paso-opciones .ico { flex: none; }
/* Opciones de los formularios: tarjetas en rejilla en lugar de pastillas */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.chip span, .chip-check span { width: 100%; min-height: 74px; padding: 10px 8px; border-radius: 18px; flex-direction: column; justify-content: center; text-align: center; gap: 6px; box-shadow: inset 0 0 0 2px var(--linea); font-size: 14.5px; line-height: 1.2; transition: transform .1s, box-shadow .1s, background .1s; }
.chip span b, .chip-check span b { font-weight: 700; }
.chip span .ico, .chip-check span .ico { color: var(--marca); }
.chip input:checked + span { background: var(--marca); color: #fff; box-shadow: 0 4px 12px rgba(14,110,102,0.25); }
.chip input:checked + span .ico { color: #fff; }
.chip.suave span .ico { color: var(--tenue); }
.chip.suave input:checked + span { background: #EEEAE1; color: var(--tinta); box-shadow: inset 0 0 0 2px #D9D3C6; }
.chip.suave input:checked + span .ico { color: var(--tenue); }
.chip-check span { position: relative; }
.chip-check span > .ico:first-child { position: absolute; top: 8px; right: 8px; width: 0; }
.chip-check input:checked + span > .ico:first-child { width: 18px; color: var(--verde); }
.chip-check input:checked + span .ico { color: var(--verde); }
.chip span:active, .chip-check span:active { transform: scale(0.97); }
.chips.grandes .chip span { min-height: 74px; font-size: 16px; }
.inicial { font-style: normal; width: 30px; height: 30px; border-radius: 50%; background: var(--marca-tint); color: var(--marca); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.chip input:checked + span .inicial { background: rgba(255,255,255,0.22); color: #fff; }
/* Opciones largas (p. ej. «Cambio de propietario o comunidad», pasos hechos) más anchas */
fieldset.campo:has(.chip-check) .chips, .chips:has(.chip-check) { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.form-registro fieldset.campo, .form-registro > .chips { background: var(--papel); border-radius: 20px; padding: 14px; }
.form-registro fieldset.campo .chip span, .form-registro fieldset.campo .chip-check span { background: var(--fondo); box-shadow: none; }
.form-registro fieldset.campo .chip input:checked + span { background: var(--marca); }
.form-registro fieldset.campo .chip-check input:checked + span { background: var(--verde-tint); box-shadow: inset 0 0 0 2px var(--verde); }
.form-registro fieldset.campo legend.etq { float: left; width: 100%; margin-bottom: 10px; font-size: 15px; color: var(--tinta); }
@media (min-width: 1000px) {
  .chips { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .chip span, .chip-check span { min-height: 92px; font-size: 16px; border-radius: 20px; }
  .chip span .ico, .chip-check span .ico { width: 28px; height: 28px; }
  .chip span:hover, .chip-check span:hover { box-shadow: inset 0 0 0 2px var(--marca); }
  .cab-ilus .ilus { width: 96px; height: 96px; }
}

.chip-check span .ico { opacity: 1; width: auto; }
.chip-check span > .ico:first-child { opacity: 0; width: 0 !important; }
.chip-check input:checked + span > .ico:first-child { opacity: 1; width: 18px !important; }
.form-registro fieldset.campo .chip.suave input:checked + span, .chip.suave input:checked + span { background: #EEEAE1; color: var(--tenue); box-shadow: inset 0 0 0 2px #D9D3C6; }
.tiles-mini .tile { height: 76px; } @media (min-width: 1000px) { .tiles-mini .tile { height: 92px; } .tiles-mini .ilus { width: 48px; height: 48px; } .tiles-mini .tile span { font-size: 13px; } }

/* RIP: citas futuras que quedan en Wakyma */
.citas-rip { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
.citas-rip li { display: flex; align-items: center; gap: 8px; background: var(--rojo-suave, #FDECEE); border-radius: 10px; padding: 8px 10px; font-weight: 600; font-size: 14px; }
.caja.datos form { margin-top: 10px; }

/* Fotos del equipo en los botones de vete y de quién registra */
.inicial.foto { position: relative; overflow: hidden; }
.inicial.foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.chips .chip .inicial { width: 44px; height: 44px; font-size: 17px; }
.chip input:checked + span .inicial.foto { box-shadow: 0 0 0 3px #fff; }

/* Salir: en Hoy (móvil) y al pie del menú lateral (ordenador) */
.salir-hoy { margin-left: auto; }
.salir-hoy .btn-ico { width: auto; padding: 0 12px; gap: 6px; font-weight: 700; font-size: 14px; color: var(--tenue); display: inline-flex; align-items: center; }
.salir-lateral { display: none; }
@media (min-width: 1000px) {
  .salir-hoy { display: none; }
  .salir-lateral { display: block; margin-top: auto; }
  .salir-lateral .tab { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; color: var(--tenue); }
}

/* Logo */
.pin-logo { width: auto; height: auto; background: none; }
.pin-logo img { display: block; border-radius: 24px; box-shadow: 0 0 0 4px rgba(255,255,255,0.28), 0 10px 30px rgba(0,0,0,0.18); }
.pin-clinica { display: block; font-size: 14px; font-weight: 600; opacity: 0.8; margin-top: 4px; letter-spacing: 0; }
@media (min-width: 1000px) {
  .marca-lateral img { border-radius: 12px; flex: none; }
  .marca-lateral span { display: flex; flex-direction: column; line-height: 1.15; }
  .marca-lateral small { font-size: 12.5px; font-weight: 600; color: var(--tenue); }
}
.pin h1 { text-align: center; }
/* Entrada: ¿quién eres? con foto */
.quien { border: 0; padding: 0; margin: 6px 0 4px; width: 100%; }
.quien legend { font-weight: 800; font-size: 16px; text-align: center; width: 100%; margin-bottom: 10px; }
.quien-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.quien-op input { position: absolute; opacity: 0; pointer-events: none; }
.quien-op span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 16px; background: rgba(255,255,255,0.12); cursor: pointer; font-size: 14px; border: 2px solid transparent; }
.quien-op .inicial { width: 56px; height: 56px; font-size: 20px; background: rgba(255,255,255,0.9); }
.quien-op input:checked + span { background: #fff; color: var(--marca); border-color: #fff; }
.quien-op input:focus-visible + span { outline: 3px solid var(--ambar); }
.avatar .inicial { width: 46px; height: 46px; background: var(--marca); color: #fff; }
.inicial.foto img { color: transparent; font-size: 0; }
.quien-lista.dos { grid-template-columns: 1fr 1fr; }
.quien-lista.dos .quien-op span { padding: 16px 8px; }
.quien-lista.dos .inicial { width: 76px; height: 76px; }
.inicial.equipo { color: var(--marca); }
.quien-op small { font-size: 12px; opacity: .8; margin-top: -4px; }
.inicial.equipo { background: var(--marca-tint); }
