/* Agenda del equipo · sistema de diseño (ficha E-1028-2309). Sobria, legible al sol, rápida. */
/* Fuente alojada en la app (licencia en /fuentes/OFL.txt): ningún celular le avisa a Google. Un solo archivo con los pesos 400 a 800. */
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('/fuentes/atkinson-hyperlegible-next-400-800.woff2') format('woff2'); }
:root {
  --rojo: #C8102E; --rojo-osc: #9E0B23; --rojo-suave: #FDECEE;
  --tinta: #1F1D1B; --tinta-2: #3D3935; --gris: #6B6560; --gris-2: #736C66; --linea: #E6E1DA; --borde-campo: #958E86; --linea-2: #EFEBE5;
  --papel: #FAF8F5; --blanco: #FFFFFF; --fondo: #F3F0EB;
  --alta: #B42318; --alta-s: #FEE4E2; --media: #B54708; --media-s: #FEF0C7; --baja: #475467; --baja-s: #EAECF0;
  --proceso: #175CD3; --proceso-s: #E0EAFF; --hecho: #067647; --hecho-s: #DCFAE6; --festivo: #5925DC; --festivo-s: #EFEBFF;
  --sombra-1: 0 1px 2px rgba(31, 29, 27, .06), 0 1px 1px rgba(31, 29, 27, .04);
  --sombra-2: 0 10px 30px -12px rgba(31, 29, 27, .28);
  --sombra-3: 0 -16px 50px -12px rgba(31, 29, 27, .35);
  --r-s: 10px; --r-m: 16px; --r-l: 24px;
  --f: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --curva: cubic-bezier(.2, .9, .25, 1);
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
  --seguro-arriba: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { overflow-x: clip; }
body { font-family: var(--f); font-size: 17px; line-height: 1.4; color: var(--tinta); background: var(--papel); min-height: 100dvh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
.ic { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--proceso); outline-offset: 2px; border-radius: 8px; }

/* ───── Estructura ───── */
.app { display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; }
.riel { display: none; }
.principal { min-width: 0; padding-bottom: calc(150px + var(--seguro-abajo)); }
.lateral { display: none; }

.cabeza { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--blanco) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--linea); padding: calc(10px + var(--seguro-arriba)) 18px 0; }
.cabeza .fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cabeza .sup { font-size: 13px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .9px; }
.cabeza h1 { font-size: 30px; font-weight: 800; letter-spacing: -.6px; line-height: 1.1; }
.cabeza .raya { width: 46px; height: 3px; border-radius: 2px; background: var(--rojo); margin: 8px 0 10px; }
.yo { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 15px; box-shadow: 0 0 0 3px var(--blanco), 0 0 0 4px var(--linea); }

.estado-red { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--media-s); color: var(--media); white-space: nowrap; }
.estado-red.ok { background: var(--hecho-s); color: var(--hecho); }
.estado-red.off { background: var(--baja-s); color: var(--baja); }
.estado-red .ic { width: 15px; height: 15px; }
.punto-vivo { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: latido 2.4s infinite; }
@keyframes latido { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ───── Tira de días ───── */
.tira { display: flex; gap: 6px; overflow-x: auto; padding: 2px 18px 12px; margin: 0 -18px; scroll-snap-type: x proximity; scrollbar-width: none; }
.tira::-webkit-scrollbar { display: none; }
.dia { flex: none; width: 50px; padding: 7px 0 8px; border-radius: 14px; background: var(--blanco); border: 1px solid var(--linea); text-align: center; scroll-snap-align: start; position: relative; transition: transform .18s var(--curva), background .2s; }
.dia:active { transform: scale(.94); }
.dia .l { font-size: 11.5px; font-weight: 700; color: var(--gris); text-transform: uppercase; }
.dia .n { font-size: 19px; font-weight: 800; display: block; line-height: 1.15; }
.dia .puntos { display: flex; gap: 3px; justify-content: center; height: 6px; margin-top: 3px; }
.dia .puntos i { width: 5px; height: 5px; border-radius: 50%; background: var(--gris-2); }
.dia .puntos i.alta { background: var(--alta); }
.dia.fest { background: var(--festivo-s); border-color: #D9D0FF; }
.dia.fest .l, .dia.fest .n { color: var(--festivo); }
.dia.con-bloq::after { content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 2px; background: repeating-linear-gradient(45deg, var(--gris) 0 1.5px, transparent 1.5px 3px); }
.dia.hoy-d { border-color: var(--rojo); }
.dia.sel { background: var(--rojo); border-color: var(--rojo); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--rojo) 70%, transparent); }
.dia.sel .l, .dia.sel .n { color: #fff; }
.dia.sel .puntos i { background: rgba(255, 255, 255, .75); }

/* ───── Contenido ───── */
.cuerpo { padding: 6px 16px 0; max-width: 720px; margin: 0 auto; }
.seccion { margin-top: 18px; }
.seccion > h2 { font-size: 12.5px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; color: var(--gris); margin: 0 4px 9px; display: flex; align-items: center; gap: 8px; }
.seccion > h2 .cuenta { background: var(--linea-2); color: var(--tinta-2); border-radius: 999px; padding: 1px 8px; font-size: 12px; letter-spacing: 0; }
.seccion.roja > h2 { color: var(--alta); }
.seccion.roja > h2 .cuenta { background: var(--alta-s); color: var(--alta); }

.aviso-dia { display: flex; align-items: center; gap: 10px; border-radius: var(--r-m); padding: 11px 14px; font-weight: 700; font-size: 15px; margin-top: 14px; }
.aviso-dia.fest { background: var(--festivo-s); color: var(--festivo); }
.aviso-dia .ic { width: 22px; height: 22px; }

.bloqueos { display: flex; flex-direction: column; gap: 8px; }
.bloq { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); border: 1px dashed #CFC8BF; background: repeating-linear-gradient(-45deg, var(--blanco) 0 9px, #F6F3EE 9px 18px); font-size: 15px; width: 100%; text-align: left; }
.bloq .cara { margin: 0; box-shadow: none; }
.bloq .bt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bloq b { font-weight: 800; }
.bloq .mot { color: var(--gris); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bloq .cu { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--tinta-2); white-space: nowrap; text-align: right; }
.bloq.nuevo { animation: llega 1.2s var(--curva); }

/* Tarjeta de actividad */
.tarjeta { display: grid; grid-template-columns: 70px 1fr; gap: 0 12px; width: 100%; text-align: left; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 11px 13px 11px 11px; margin-bottom: 9px; box-shadow: var(--sombra-1); position: relative; transition: transform .18s var(--curva), box-shadow .2s; }
.tarjeta:active { transform: scale(.985); }
.tarjeta .hr { border-right: 2px solid var(--linea-2); padding-right: 10px; }
.tarjeta .hr b { display: block; font-size: 18px; font-weight: 800; line-height: 1.05; letter-spacing: -.3px; }
.tarjeta .hr span { font-size: 12px; color: var(--gris); font-weight: 700; white-space: nowrap; }
.tarjeta .hr b.dia-v { font-size: 16px; }
.tarjeta .hr .fin { display: block; margin-top: 4px; font-size: 12.5px; color: var(--gris-2); font-weight: 600; }
.tarjeta > div { min-width: 0; }
.tarjeta .tp { font-size: 12.5px; font-weight: 700; color: var(--gris); display: flex; align-items: center; gap: 6px; }
.tarjeta .tp .ic { width: 15px; height: 15px; }
.tarjeta .ti { font-size: 17px; font-weight: 800; line-height: 1.25; margin: 2px 0 7px; overflow-wrap: anywhere; }
.tarjeta.fin-ok .ti { color: var(--gris); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: var(--gris-2); }
.tarjeta .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tarjeta .tp .por { font-weight: 600; color: var(--gris-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tarjeta .tp span:first-of-type { white-space: nowrap; }
.tarjeta .alta-m { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--alta); color: #fff; font-size: 11px; margin-right: 7px; vertical-align: 2px; }
.fila-dato { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.fila-dato .chip { flex: none; }
.fila-dato .chip.c-lugar { flex: 0 1 auto; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.fila-dato .chip.c-lugar .ic { vertical-align: -2px; margin-right: 4px; }
.fila-dato .quienes { flex: none; }
.fila-dato .quienes { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.fila-dato .van { font-size: 12.5px; font-weight: 700; color: var(--gris); }
.fila-dato .cara { width: 24px; height: 24px; font-size: 10px; }
.fila-dato .cara i { width: 11px; height: 11px; font-size: 8px; right: -2px; bottom: -2px; }
.tarjeta .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--gris); }
.tarjeta.venc { border-color: #F5B8B1; background: #FFF9F8; box-shadow: inset 4px 0 0 var(--alta), var(--sombra-1); }
.tarjeta.ahora { border-color: color-mix(in srgb, var(--rojo) 45%, var(--linea)); box-shadow: inset 4px 0 0 var(--rojo), var(--sombra-2); }
.tarjeta .ahora-et { position: absolute; top: -9px; right: 14px; background: var(--rojo); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .8px; padding: 3px 9px; border-radius: 999px; display: flex; align-items: center; gap: 5px; }
.tarjeta.nuevo { animation: llega 1.4s var(--curva); }
.tarjeta .llego { position: absolute; top: -9px; left: 14px; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; animation: aparece .3s var(--curva); }
@keyframes llega { 0% { transform: translateY(-6px) scale(.98); box-shadow: 0 0 0 4px color-mix(in srgb, var(--proceso) 35%, transparent); } 60% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--proceso) 18%, transparent); } 100% { transform: none; } }
@keyframes aparece { from { opacity: 0; transform: translateY(4px); } }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.25; max-width: 100%; }
.chip.c-lugar { white-space: normal; overflow-wrap: anywhere; text-align: left; }
.chip .ic { width: 14px; height: 14px; }
.p-alta { background: var(--alta); color: #fff; } .p-media { background: var(--media-s); color: var(--media); } .p-baja { background: var(--baja-s); color: var(--baja); }
.e-pendiente { box-shadow: inset 0 0 0 1.5px #A49D96; color: var(--tinta-2); } .e-proceso { background: var(--proceso-s); color: var(--proceso); } .e-finalizado { background: var(--hecho-s); color: var(--hecho); }
.c-lugar { background: var(--papel); box-shadow: inset 0 0 0 1px var(--linea); color: var(--tinta-2); }
.c-fest { background: var(--festivo-s); color: var(--festivo); }
.c-priv { background: var(--tinta); color: #fff; }
.c-venc { background: var(--alta-s); color: var(--alta); }

.caras { display: flex; align-items: center; }
.cara { width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--blanco); margin-left: -3px; position: relative; flex: none; letter-spacing: -.3px; }
.cara:first-child { margin-left: 0; }
.cara i { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--blanco); font-style: normal; font-size: 9px; }
.cara i.voy { background: var(--hecho); } .cara i.no { background: var(--alta); } .cara i.talvez { background: var(--media); } .cara i.sin { background: #C9C2BA; }
.cara.sin-r { opacity: .55; }

.vacio { text-align: center; padding: 34px 20px 10px; color: var(--gris); }
.vacio .ic { width: 38px; height: 38px; color: var(--linea); stroke-width: 1.6; margin-bottom: 8px; }
.vacio b { display: block; color: var(--tinta-2); font-size: 17px; margin-bottom: 4px; }

/* Compromisos */
.comp { display: flex; gap: 12px; align-items: flex-start; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 12px 14px; margin-bottom: 8px; }
.comp.venc { border-color: #F5B8B1; box-shadow: inset 4px 0 0 var(--alta); }
.marca { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #8C857E; flex: none; display: grid; place-items: center; color: #fff; transition: background .2s, border-color .2s, transform .15s; position: relative; }
.marca::before { content: ''; position: absolute; inset: -9px; } /* área de toque de 46 px */
.marca:active { transform: scale(.88); }
.marca.ok { background: var(--hecho); border-color: var(--hecho); }
.marca.proc { border-color: var(--proceso); background: linear-gradient(90deg, var(--proceso) 50%, transparent 50%); }
.marca .ic { width: 15px; height: 15px; stroke-width: 3; }
.comp .tx { flex: 1; min-width: 0; }
.comp .tx b { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.comp.hecho .tx b { color: var(--gris); text-decoration: line-through; }
.comp .tx span { font-size: 13px; color: var(--gris); }
.comp .tx span.rojo { color: var(--alta); font-weight: 700; }

/* ───── Barra rápida y pestañas ───── */
.rapida { position: fixed; left: 12px; right: 12px; bottom: calc(76px + var(--seguro-abajo)); z-index: 30; display: flex; align-items: center; gap: 6px; background: var(--blanco); border: 1.5px solid var(--borde-campo); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--sombra-2); max-width: 700px; margin: 0 auto; transition: border-color .2s, box-shadow .2s; }
.rapida:focus-within { border-color: var(--tinta-2); box-shadow: 0 14px 34px -12px rgba(31, 29, 27, .38); }
.rapida input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 17px; padding: 8px 0; }
.rapida input::placeholder { color: var(--gris-2); }
.btn-redondo { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: transform .15s var(--curva), background .2s; }
.btn-redondo:active { transform: scale(.9); }
.btn-redondo.rojo { background: var(--rojo); color: #fff; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--rojo) 80%, transparent); }
.btn-redondo.oscuro { background: var(--tinta); color: #fff; }
.btn-redondo .ic { width: 22px; height: 22px; }

.principal::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: calc(150px + var(--seguro-abajo)); background: linear-gradient(to bottom, color-mix(in srgb, var(--papel) 0%, transparent), var(--papel) 42%); pointer-events: none; z-index: 22; }
.pestanas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--blanco) 98%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--linea); padding-bottom: var(--seguro-abajo); }
.pestanas button { height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--gris); position: relative; }
.pestanas button .ic { width: 23px; height: 23px; }
.pestanas button.on { color: var(--rojo); }
.pestanas button.on::before { content: ''; position: absolute; top: 0; width: 30px; height: 3px; border-radius: 0 0 3px 3px; background: var(--rojo); }
.pestanas .globo { position: absolute; top: 9px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--alta); color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 4px; }

/* ───── Hojas (paneles que suben) ───── */
.velo { position: fixed; inset: 0; z-index: 50; background: rgba(31, 29, 27, .42); opacity: 0; transition: opacity .28s; }
.velo.abierto { opacity: 1; }
.hoja { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--blanco); border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: var(--sombra-3); max-height: calc(100dvh - 28px - var(--seguro-arriba)); display: flex; flex-direction: column; transform: translateY(105%); transition: transform .38s var(--curva); will-change: transform; }
.hoja.abierta { transform: none; }
.hoja .agarre { width: 40px; height: 5px; border-radius: 3px; background: var(--linea); margin: 9px auto 0; flex: none; }
.hoja .h-cab { padding: 10px 18px 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex: none; }
.hoja .h-cab .et { font-size: 12.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--gris); }
.hoja .h-cab h3 { font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.3px; margin-top: 2px; overflow-wrap: anywhere; }
.hoja .h-cab > div { min-width: 0; }
.hoja .h-cab h3:focus, .hoja .h-cab [tabindex="-1"]:focus { outline: none; }
.hoja .cerrar { width: 44px; height: 44px; border-radius: 50%; background: var(--linea-2); display: grid; place-items: center; flex: none; }
.hoja .h-cuerpo { overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 12px; flex: 1; }
.hoja .h-pie { display: flex; gap: 10px; padding: 12px 18px calc(14px + var(--seguro-abajo)); border-top: 1px solid var(--linea-2); flex: none; background: var(--blanco); }

.boton { height: 52px; border-radius: 14px; font-size: 16.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; transition: transform .15s var(--curva), background .2s, opacity .2s; }
.boton:active { transform: scale(.97); }
.boton.prim { background: var(--rojo); color: #fff; flex: 1.4; }
.boton.prim:disabled { opacity: .45; }
.boton.sec { background: var(--blanco); box-shadow: inset 0 0 0 1.5px var(--linea); flex: 1; }
.boton.peligro { color: var(--alta); box-shadow: inset 0 0 0 1.5px #F5B8B1; background: var(--blanco); }
.boton.chico { height: 44px; font-size: 14.5px; border-radius: 12px; padding: 0 14px; }

.escuche { background: var(--papel); border-radius: 14px; padding: 12px 14px; font-size: 16px; line-height: 1.5; margin-bottom: 6px; border: 1px solid var(--linea-2); }
.escuche mark { background: #FFE9A8; color: var(--tinta); border-radius: 4px; padding: 0 3px; font-weight: 800; box-shadow: inset 0 -2px 0 #E8B931; }

.campo { padding: 12px 0; border-bottom: 1px solid var(--linea-2); }
.campo > label, .campo > .et { display: block; font-size: 13px; font-weight: 800; color: var(--gris); margin-bottom: 7px; letter-spacing: .2px; }
.campo input[type=text], .campo input[type=date], .campo input[type=time], .campo textarea, .campo select { width: 100%; border: 1.5px solid var(--borde-campo); background: var(--blanco); border-radius: 12px; padding: 11px 12px; font-size: 17px; outline: none; transition: border-color .2s; min-height: 48px; }
.campo input:focus, .campo textarea:focus, .campo select:focus { border-color: var(--tinta-2); }
.campo textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.campo .titulo-in { font-size: 20px; font-weight: 800; }
.fila-2 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.fila-2.cuando { grid-template-columns: 1fr 1fr; }
.fila-2.cuando > :first-child { grid-column: 1 / -1; }
.fila-2 input { min-width: 0; }
.fila-2.dos { grid-template-columns: 1fr 1fr; }
.falta { box-shadow: 0 0 0 3px color-mix(in srgb, var(--media) 30%, transparent); border-color: var(--media) !important; }

.segmentos { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 15px; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--linea); background: var(--blanco); display: inline-flex; align-items: center; gap: 7px; transition: background .15s, box-shadow .15s, color .15s; }
.seg .ic { width: 17px; height: 17px; }
.seg:not(.on).p-alta, .seg:not(.on).p-media, .seg:not(.on).p-baja, .seg:not(.on).e-proceso, .seg:not(.on).e-finalizado { background: var(--blanco); color: var(--tinta); }
.seg:not(.on).e-pendiente { box-shadow: inset 0 0 0 1.5px var(--linea); }
.seg.on { background: var(--tinta); color: #fff; box-shadow: none; }
.seg.on.p-alta { background: var(--alta); } .seg.on.p-media { background: var(--media); } .seg.on.p-baja { background: var(--baja); }
.seg.on.e-proceso { background: var(--proceso); } .seg.on.e-finalizado { background: var(--hecho); }
.desliza { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 2px; }
.desliza::-webkit-scrollbar { display: none; }
.desliza .seg { flex: none; }

.personas-sel { display: flex; gap: 10px; flex-wrap: wrap; }
.psel { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--gris); width: 56px; }
.psel .cara { width: 46px; height: 46px; font-size: 16px; margin: 0; box-shadow: 0 0 0 2px var(--blanco), 0 0 0 3.5px var(--linea); opacity: .45; transition: opacity .15s, box-shadow .15s, transform .15s; }
.psel.on { color: var(--tinta); }
.psel.on .cara { opacity: 1; box-shadow: 0 0 0 2px var(--blanco), 0 0 0 4px var(--tinta); }
.psel:active .cara { transform: scale(.92); }

.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea-2); font-weight: 700; }
.interruptor small { display: block; font-weight: 400; color: var(--gris); font-size: 13.5px; }
.sw { width: 52px; height: 32px; border-radius: 16px; background: #D7D1C9; position: relative; flex: none; transition: background .2s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .22s var(--curva); }
.sw.on { background: var(--hecho); } .sw.on::after { transform: translateX(20px); }

.alertas { margin: 10px 0 2px; display: flex; flex-direction: column; gap: 6px; }
.alerta { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.alerta .ic { width: 18px; height: 18px; margin-top: 1px; }
.alerta.roja { background: var(--alta-s); color: var(--alta); }
.alerta.ambar { background: var(--media-s); color: var(--media); }
.alerta.azul { background: var(--proceso-s); color: var(--proceso); }

/* Detalle */
.det-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.det-meta { font-size: 14px; color: var(--gris); margin-bottom: 4px; }
.det-meta b { color: var(--tinta-2); }
.sub { font-size: 12.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--gris); margin: 18px 0 8px; }
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvp button { height: 50px; border-radius: 13px; font-weight: 800; font-size: 16px; box-shadow: inset 0 0 0 1.5px var(--linea); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.rsvp button.on.voy { background: var(--hecho-s); color: var(--hecho); box-shadow: inset 0 0 0 2px var(--hecho); }
.rsvp button.on.no { background: var(--alta-s); color: var(--alta); box-shadow: inset 0 0 0 2px var(--alta); }
.rsvp button.on.talvez { background: var(--media-s); color: var(--media); box-shadow: inset 0 0 0 2px var(--media); }
.asis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 10px; }
.asis div { display: flex; align-items: center; gap: 8px; font-size: 14.5px; padding: 6px 8px; border-radius: 10px; background: var(--papel); }
.asis .cara { width: 28px; height: 28px; margin: 0; box-shadow: none; font-size: 11px; flex: none; }
.asis .st { color: var(--gris); font-size: 13px; margin-left: auto; white-space: nowrap; font-style: normal; }
.asis .st.voy { color: var(--hecho); font-weight: 700; } .asis .st.no { color: var(--alta); font-weight: 700; } .asis .st.talvez { color: var(--media); font-weight: 700; }
.obs { background: var(--papel); border-radius: 12px; padding: 12px 14px; font-size: 15.5px; line-height: 1.5; white-space: pre-wrap; border: 1px solid var(--linea-2); overflow-wrap: anywhere; }
.hist { font-size: 13.5px; color: var(--gris); line-height: 1.55; }
.hist li { list-style: none; padding: 6px 0; border-bottom: 1px dashed var(--linea); display: flex; gap: 8px; }
.hist li b { color: var(--tinta-2); }
.hist li time { margin-left: auto; white-space: nowrap; font-size: 12.5px; }
.add-comp { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 6px; }
.add-comp .fila-2 { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr) auto; }
.add-comp input[type=date] { font-size: 15px; padding: 9px 8px; }
.add-comp input, .add-comp select { width: 100%; min-width: 0; border: 1.5px solid var(--borde-campo); background: var(--blanco); border-radius: 12px; padding: 9px 12px; font-size: 16px; outline: none; min-height: 46px; }
.add-comp input:focus, .add-comp select:focus { border-color: var(--tinta-2); }
.add-comp .boton.chico { height: 46px; }

/* ───── Calendario ───── */
.cal-cab { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 8px; }
.cal-cab h2 { font-size: 20px; font-weight: 800; text-transform: capitalize; }
.cal-cab .nav { display: flex; gap: 6px; }
.cal-cab .nav button { width: 44px; height: 44px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--linea); display: grid; place-items: center; background: var(--blanco); }
.filtros { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.filtros::-webkit-scrollbar { display: none; }
.filtros .seg { flex: none; min-height: 44px; font-size: 14px; }
.filtros .seg .cara { width: 20px; height: 20px; font-size: 10px; margin: 0 0 0 -4px; box-shadow: none; }
.mes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.mes .cab-d { font-size: 12px; font-weight: 800; color: var(--gris); text-align: center; padding: 4px 0; }
.celda { aspect-ratio: 1 / 1.05; border-radius: 12px; background: var(--blanco); border: 1px solid var(--linea-2); display: flex; flex-direction: column; align-items: center; padding-top: 6px; position: relative; font-weight: 800; font-size: 15px; transition: transform .15s; }
.celda:active { transform: scale(.93); }
.celda.fuera { opacity: .35; }
.celda.fest { background: var(--festivo-s); color: var(--festivo); border-color: #DCD3FF; }
.celda.hoy-d { box-shadow: inset 0 0 0 2px var(--rojo); }
.celda.sel { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.celda .pts { display: flex; gap: 2px; margin-top: auto; margin-bottom: 7px; flex-wrap: wrap; justify-content: center; max-width: 80%; }
.celda .pts i { width: 5px; height: 5px; border-radius: 50%; background: var(--gris-2); }
.celda .pts i.alta { background: var(--alta); }
.celda.sel .pts i { background: rgba(255, 255, 255, .8); }
.celda .bl { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 2px; background: repeating-linear-gradient(45deg, var(--gris) 0 1.5px, transparent 1.5px 3px); }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--gris); margin-top: 10px; }
.leyenda span { display: inline-flex; align-items: center; gap: 5px; }
.leyenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ───── Avisos (toasts) ───── */
.avisos { position: fixed; bottom: calc(142px + var(--seguro-abajo)); left: 10px; right: 10px; z-index: 80; display: flex; flex-direction: column; gap: 8px; pointer-events: none; align-items: center; }
.toast .tx { flex: 1; min-width: 0; }
.toast .mas-n { background: rgba(255, 255, 255, .18); border-radius: 999px; font-size: 12px; font-weight: 800; padding: 2px 8px; flex: none; }
.toast.cambio { animation: none; }
.avisos.arriba { bottom: auto; top: calc(10px + var(--seguro-arriba)); }
.avisos.oculto { display: none; }
.toast { pointer-events: auto; width: 100%; max-width: 460px; display: flex; gap: 11px; align-items: center; background: var(--tinta); color: #fff; padding: 11px 14px 11px 11px; border-radius: 16px; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .55); font-size: 15px; font-weight: 600; line-height: 1.35; animation: baja .45s var(--curva); }
.toast .cara { width: 34px; height: 34px; margin: 0; font-size: 14px; box-shadow: none; flex: none; }
.toast .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); flex: none; }
.toast.sale { animation: sube .3s ease forwards; }
.toast.error { background: var(--alta); }
@keyframes baja { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes sube { to { opacity: 0; transform: translateY(12px); } }

/* Editor compacto */
.et-fila { display: flex !important; align-items: center; justify-content: space-between; }
.chico-seg { min-height: 32px; padding: 0 12px; font-size: 13.5px; border-radius: 999px; }
details.mas { margin-top: 0; }
details.mas summary { list-style: none; cursor: pointer; padding: 14px 0 14px 18px; font-weight: 800; font-size: 15.5px; display: block; position: relative; }
details.mas summary::-webkit-details-marker { display: none; }
details.mas summary::before { content: '›'; position: absolute; left: 2px; top: 13px; transition: transform .2s; font-size: 20px; line-height: 1; color: var(--gris); }
details.mas[open] summary::before { transform: rotate(90deg); }
details.mas summary span { display: block; font-weight: 600; font-size: 13px; color: var(--gris); }
.hoja .campo { padding: 10px 0; }
.personas-sel .psel .cara { width: 44px; height: 44px; }

/* Aviso de privacidad y notas de datos */
.aviso-priv { position: fixed; inset: 0; z-index: 90; background: rgba(31, 29, 27, .5); display: grid; place-items: end center; padding: 0; }
.aviso-caja { background: var(--blanco); width: 100%; max-width: 520px; border-radius: var(--r-l) var(--r-l) 0 0; padding: 22px 20px calc(20px + var(--seguro-abajo)); text-align: left; max-height: 92dvh; overflow-y: auto; animation: baja .4s var(--curva); }
.aviso-caja h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; outline: none; }
.aviso-caja p { font-size: 15.5px; color: var(--tinta-2); margin-bottom: 10px; line-height: 1.5; }
.nota-borrador { font-size: 13px !important; color: var(--media) !important; font-weight: 700; }
.casilla { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; font-size: 15.5px; padding: 12px; border-radius: 12px; background: var(--papel); margin-top: 6px; }
.casilla input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--rojo); }
.nota-dato { font-size: 13px; color: var(--gris); margin-top: 6px; }
@media (min-width: 700px) { .aviso-priv { place-items: center; padding: 20px; } .aviso-caja { border-radius: var(--r-l); } }

.pegar-link { width: 100%; max-width: 360px; margin-top: 26px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.pegar-link label { font-weight: 700; font-size: 15px; color: var(--tinta-2); }
.pegar-link .boton { flex: none; width: 100%; }
.pegar-link input { border: 1.5px solid var(--borde-campo); border-radius: 12px; padding: 12px; font-size: 16px; min-height: 48px; background: var(--blanco); }
.enlace-act { display: inline-block; padding: 8px 0; margin: -6px 0; min-height: 32px; }

/* ───── Entrada con PIN ───── */
.entrada { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px; background: var(--papel); text-align: center; }
.entrada .marca-app { width: 76px; height: 76px; border-radius: 22px; background: var(--rojo); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; line-height: 1.05; letter-spacing: .3px; box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--rojo) 80%, transparent); margin-bottom: 20px; }
.entrada h1 { font-size: 26px; font-weight: 800; }
.entrada p { color: var(--gris); margin-top: 6px; max-width: 320px; }
.pin-cajas { display: flex; gap: 8px; margin: 26px 0 8px; } /* 6 cajas: caben hasta en un celular de 320 px */
.pin-cajas i { width: clamp(34px, 11.5vw, 48px); height: 58px; border-radius: 12px; background: var(--blanco); box-shadow: inset 0 0 0 1.5px var(--linea); display: grid; place-items: center; font-style: normal; font-size: 28px; font-weight: 800; transition: box-shadow .15s; }
.pin-cajas i.lleno { box-shadow: inset 0 0 0 2px var(--tinta); }
.pin-cajas i.lleno::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--tinta); }
.pin-cajas.mal { animation: tiembla .4s; }
.pin-cajas.mal i { box-shadow: inset 0 0 0 2px var(--alta); }
@keyframes tiembla { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-msg { min-height: 22px; font-size: 15px; font-weight: 700; color: var(--alta); }
.teclado { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; margin-top: 12px; }
.teclado button { height: 64px; border-radius: 18px; background: var(--blanco); box-shadow: var(--sombra-1), inset 0 0 0 1px var(--linea); font-size: 26px; font-weight: 700; transition: transform .1s, background .1s; }
.teclado button:active { transform: scale(.93); background: var(--linea-2); }
.teclado button.vacio-t { visibility: hidden; }

/* Menú de la persona */
.menu-lista button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--linea-2); font-size: 16.5px; font-weight: 700; text-align: left; }
.menu-lista button small { display: block; font-weight: 400; font-size: 13.5px; color: var(--gris); }
.menu-lista .ic { width: 22px; height: 22px; color: var(--gris); }
.sesion { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linea-2); font-size: 14.5px; }
.sesion .cara { width: 30px; height: 30px; margin: 0; box-shadow: none; }
.sesion small { display: block; color: var(--gris); font-size: 12.5px; }
.sesion .boton { margin-left: auto; white-space: nowrap; flex: none; }
.sesion > span { min-width: 0; overflow-wrap: anywhere; }
.sub .cara { display: inline-grid; vertical-align: middle; margin: 0 6px 0 0; box-shadow: none; }
.vivo { color: var(--hecho); font-weight: 700; }

/* Celular acostado o pantallas bajas: la cabecera se va con el scroll y las pestañas se compactan. */
@media (max-height: 520px) and (max-width: 1023px) {
  .cabeza { position: static; padding-top: calc(6px + var(--seguro-arriba)); }
  .cabeza h1 { font-size: 24px; } .cabeza .raya { margin: 5px 0 8px; }
  .dia { padding: 4px 0 5px; } .dia .n { font-size: 17px; }
  .pestanas button { height: 50px; flex-direction: row; gap: 7px; font-size: 13px; }
  .pestanas button.on::before { display: none; }
  .rapida { bottom: calc(58px + var(--seguro-abajo)); padding: 4px 4px 4px 16px; left: auto; width: min(380px, 46vw); }
  .avisos { bottom: calc(112px + var(--seguro-abajo)); left: 10px; right: auto; width: min(420px, 48vw); }
  .tira { padding-bottom: 8px; }
  .rapida .btn-redondo { width: 42px; height: 42px; }
  .principal { padding-bottom: calc(130px + var(--seguro-abajo)); }
  .hoja { max-height: calc(100dvh - 8px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ───── Escritorio ───── */
@media (min-width: 1024px) {
  .principal::after { display: none; }
  body { background: var(--fondo); }
  .app { grid-template-columns: 232px minmax(0, 1fr) 360px; grid-template-rows: 1fr; max-width: 1480px; margin: 0 auto; }
  .riel { display: flex; flex-direction: column; gap: 4px; padding: 26px 16px; position: sticky; top: 0; height: 100dvh; }
  .riel .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; margin: 0 6px 22px; }
  .riel .logo i { width: 38px; height: 38px; border-radius: 11px; background: var(--rojo); color: #fff; display: grid; place-items: center; font-style: normal; }
  .riel .logo i .ic { width: 22px; height: 22px; }
  .riel .logo small { display: block; font-weight: 600; font-size: 12px; color: var(--gris); }
  .riel button.nav { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 700; font-size: 15.5px; color: var(--tinta-2); text-align: left; }
  .riel button.nav:hover { background: var(--linea-2); }
  .riel button.nav.on { background: var(--blanco); color: var(--rojo); box-shadow: var(--sombra-1); }
  .riel .boton { flex: none; width: 100%; }
  .riel .nuevo-btn { margin-top: 14px; }
  .riel .pie-riel { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 6px; font-size: 14px; font-weight: 700; }
  .principal { background: var(--papel); border-left: 1px solid var(--linea); border-right: 1px solid var(--linea); min-height: 100dvh; padding-bottom: 120px; }
  .cabeza { padding: 22px 28px 0; }
  .cabeza h1 { font-size: 34px; }
  .cabeza .yo { display: none; }
  .tira { padding: 2px 28px 14px; margin: 0 -28px; }
  .dia { width: 56px; }
  .cuerpo { padding: 6px 28px 0; }
  .lateral { display: block; padding: 26px 22px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
  .lateral .caja { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 16px; margin-bottom: 14px; box-shadow: var(--sombra-1); }
  .lateral h3 { font-size: 12.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--gris); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
  .lateral .mes { gap: 3px; margin-top: 4px; }
  .lateral .celda { aspect-ratio: 1; font-size: 13px; border-radius: 9px; padding-top: 4px; }
  .lateral .celda .pts { margin-bottom: 4px; }
  .lateral .comp { padding: 10px 12px; }
  .lateral .comp .tx b { font-size: 14.5px; }
  .equipo-vivo { display: flex; flex-direction: column; gap: 8px; }
  .equipo-vivo div { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; }
  .equipo-vivo .cara { width: 30px; height: 30px; margin: 0; box-shadow: none; }
  .equipo-vivo span { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--gris); }
  .rapida { position: sticky; bottom: 22px; left: auto; right: auto; margin: 0 28px; max-width: none; }
  .pestanas { display: none; }
  .hoja { left: auto; right: 24px; bottom: 24px; top: 24px; width: 480px; border-radius: var(--r-l); max-height: none; transform: translateX(calc(100% + 40px)); }
  .hoja.abierta { transform: none; }
  .hoja .agarre { display: none; }
  .hoja .h-pie { border-radius: 0 0 var(--r-l) var(--r-l); }
  .avisos { left: 232px; right: 360px; bottom: 104px; align-items: center; }
}
@media (min-width: 1024px) and (max-width: 1240px) { .app { grid-template-columns: 210px minmax(0, 1fr) 300px; } }
/* Privada que esta persona no ve: solo «Ocupado» (decisión 4 de Javi) */
.bloq.ocupado { border-style: solid; border-color: #D8D2CA; background: #F4F1EC; cursor: default; }
.bloq.ocupado .caras { display: flex; }
.bloq.ocupado .caras .cara + .cara { margin-left: -8px; }
/* Botón dentro de un aviso («Deshacer») */
.toast .accion { margin-left: auto; flex: none; background: transparent; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 10px 6px; min-height: 44px; border: 0; cursor: pointer; }
/* La agenda se tapa mientras se pide el PIN al volver */
body.bloqueada .app, body.bloqueada #avisos { visibility: hidden; }
.elim { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linea, #EAE5DE); }
.elim .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.elim .tx small { color: var(--gris); }
