/* Inspire — sistema visual
   Identidad del pedido del dueño: negro, gris oscuro, blanco y amarillo #FCC600.
   Toma del Instagram de la barbería el logo INSPIRE en capitales con brillo azul y el poste de barbero,
   y de iOS la estructura: listas agrupadas, controles segmentados, barra de pestañas y hojas que suben. */
:root {
  --negro: #000;
  --celda: #1c1c1e;
  --celda-2: #2c2c2e;
  --celda-3: #3a3a3c;
  --relleno: rgba(118, 118, 128, .24);
  --separador: rgba(84, 84, 88, .65);
  --texto: #fff;
  --texto-2: rgba(235, 235, 245, .62);
  --texto-3: rgba(235, 235, 245, .32);
  --acento: #fcc600;                    /* amarillo de la marca */
  --acento-tinte: rgba(252, 198, 0, .16);
  --sobre-acento: #1a1400;
  --rojo: #ff453a;
  --rojo-tinte: rgba(255, 69, 58, .16);
  --verde: #30d158;
  --verde-tinte: rgba(48, 209, 88, .15);
  --gris: #8e8e93;
  --aro: linear-gradient(45deg, #feda75, #fa7e1e 30%, #d62976 55%, #962fbf 80%, #4f5bd5);
  --franjas: repeating-linear-gradient(-45deg, #ff453a 0 5px, #fff 5px 10px, #3d6fe0 10px 15px, #fff 15px 20px);
  --sistema: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --marca: "Cinzel", "Trajan Pro", Georgia, serif;
  --destacada: "Oswald", "Arial Narrow", sans-serif;
  --radio: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--negro); color: var(--texto);
  font-family: var(--sistema); font-size: 17px; line-height: 1.35;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; font-weight: 700; letter-spacing: .01em; line-height: 1.15; }
h2 { font-size: 22px; font-weight: 700; line-height: 1.2; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icono { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.negativo { color: var(--rojo); }
.positivo { color: var(--verde); }
.vacio { color: var(--texto-2); }
.ok { color: var(--verde); font-size: 15px; display: inline-flex; align-items: center; gap: 4px; }
.ok .icono { width: 18px; height: 18px; stroke-width: 2.4; }
.aviso-texto { color: var(--acento); font-size: 15px; }

/* ---------------------------------------------------------------- marca */
.poste {
  display: inline-block; flex: none; width: 9px; height: 24px; border-radius: 5px;
  background: var(--franjas); background-size: 100% 28px;
  box-shadow: 0 -3px 0 -1px #c7c7cc, 0 3px 0 -1px #c7c7cc;
}
.marca-texto {
  font-family: var(--marca); font-weight: 600; letter-spacing: .14em; color: #b4e0ff; text-transform: uppercase;
  text-shadow: 0 0 6px rgba(124, 196, 244, .8), 0 0 18px rgba(62, 127, 193, .65);
}

/* ---------------------------------------------------------------- barra superior */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(0, 0, 0, .72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separador);
}
.marca { display: flex; gap: 10px; align-items: center; }
.marca .marca-texto { font-size: 21px; }
.usuario { display: flex; gap: 14px; align-items: center; font-size: 15px; color: var(--texto-2); }
.usuario #quien { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }

main {
  max-width: 1080px; margin: 0 auto; display: grid; gap: 24px;
  padding: 12px 16px calc(100px + env(safe-area-inset-bottom));
}
.cargando { padding: 48px 0; text-align: center; color: var(--texto-2); }
.nota { color: var(--texto-2); font-size: 13px; padding: 0 16px; max-width: 75ch; }
.nota.sin-margen { padding: 0; }

/* Aviso con forma de notificación de iOS */
.aviso {
  position: fixed; z-index: 60; left: 50%; top: calc(8px + env(safe-area-inset-top));
  transform: translateX(-50%); width: min(460px, calc(100% - 16px));
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 20px;
  background: rgba(44, 44, 46, .9); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45); font-size: 15px; font-weight: 500;
  animation: bajar .35s cubic-bezier(.2, .9, .3, 1.1);
}
.aviso::before { content: ""; width: 36px; height: 36px; border-radius: 9px; background: url(icon.svg) center / cover; }
.aviso.error { color: #ff9f97; }
@keyframes bajar { from { transform: translate(-50%, -140%); } }

/* ---------------------------------------------------------------- piezas comunes */
.columna { display: grid; gap: 24px; }
.seccion { display: grid; gap: 10px; align-content: start; }
.seccion > h2 { padding: 0 4px; }
.fila { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filtros .segmentado { flex: 1; min-width: 200px; max-width: 460px; }

.grupo { background: var(--celda); border-radius: var(--radio); overflow: hidden; margin: 0; padding: 0; list-style: none; }
.grupo > * + *, .apilado > * + * {
  background-image: linear-gradient(var(--separador), var(--separador));
  background-size: calc(100% - 16px) 1px; background-position: 16px 0; background-repeat: no-repeat;
}
.grupo.control > * + *, .grupo.jornada > * + *, .grupo.tabla > * + * { background-image: none; }
.control { display: grid; gap: 14px; padding: 18px 16px; }
.frase { font-size: 19px; line-height: 1.35; max-width: 40ch; }

.renglon { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; min-height: 44px; margin: 0; }
.renglon dt { min-width: 0; }
.renglon dd { margin: 0; color: var(--texto-2); text-align: right; }
.renglon.resta dd { color: var(--rojo); }
.renglon.total dt, .renglon.total dd { color: var(--texto); font-weight: 700; }
.renglon.total.resta dd { color: var(--rojo); }
.renglon.aparte { font-size: 15px; color: var(--texto-2); }

/* Cifras tipo widget */
.cifras { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cifra { background: var(--celda); border-radius: var(--radio); padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.cifra span { color: var(--texto-2); font-size: 13px; }
.cifra strong { font-size: 22px; font-weight: 700; }
.cifra small { color: var(--texto-2); font-size: 12px; }
.cifra.alerta strong { color: var(--rojo); }
.cifra-principal { display: grid; gap: 2px; padding: 16px; }
.cifra-principal span { color: var(--texto-2); font-size: 15px; }
.cifra-principal strong { font-size: 34px; font-weight: 700; letter-spacing: .01em; }
.cifra-principal small { color: var(--texto-2); font-size: 13px; }

.barra-uso { height: 6px; border-radius: 3px; background: var(--celda-3); overflow: hidden; }
.barra-uso i { display: block; height: 100%; border-radius: 3px; background: var(--acento); }
.barra-uso.llena i { background: var(--verde); }
.mas-pedido { display: grid; gap: 6px; padding: 12px 16px; }
.mas-pedido > div:first-child { display: flex; justify-content: space-between; gap: 12px; }

/* Campos dentro de un grupo: etiqueta a la izquierda, valor a la derecha */
.campo { display: grid; grid-template-columns: 128px 1fr; align-items: center; gap: 8px; padding: 4px 16px; min-height: 46px; }
.campo > span { color: var(--texto); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-width: 0; border: 0; background: none; padding: 8px 0; min-height: 38px; color: var(--texto); font-size: 17px;
}
.campo select { appearance: auto; }
.campo select option { background: var(--celda-2); color: var(--texto); }
.campo textarea { resize: vertical; min-height: 72px; font-family: inherit; }
.campo.alto { align-items: start; padding-top: 8px; }
.campo.alto > span { padding-top: 8px; }
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: none; }
.campo:focus-within { background-color: var(--celda-2); }
.campo input:disabled { color: var(--texto-2); }
::placeholder { color: var(--texto-3); }
input[type="date"], input[type="month"], input[type="time"] { color-scheme: dark; }

.entrada {
  min-height: 36px; padding: 6px 12px; border: 0; border-radius: 10px;
  background: var(--relleno); color: var(--texto); font-size: 15px;
}
.entrada option { background: var(--celda-2); }

/* Botones */
.boton {
  min-height: 44px; padding: 10px 18px; border: 0; border-radius: var(--radio); cursor: pointer;
  background: var(--relleno); color: var(--acento); font-size: 17px; font-weight: 600;
}
.boton:active { opacity: .7; }
.boton.principal { width: 100%; min-height: 52px; background: var(--acento); color: var(--sobre-acento); border-radius: 14px; }
.boton.principal-chico { background: var(--acento); color: var(--sobre-acento); }
.boton.peligro { color: var(--rojo); }
.boton.alerta { background: var(--rojo); color: #fff; justify-self: start; }
.boton.chico { min-height: 32px; padding: 5px 14px; font-size: 15px; border-radius: 999px; }
.boton:disabled { opacity: .45; cursor: default; }
.enlace { background: none; border: 0; padding: 0; color: var(--acento); font-size: 17px; cursor: pointer; }
.enlace.fuerte { font-weight: 600; }
.enlace:disabled { opacity: .45; }
.peligro-texto { color: var(--rojo); padding: 10px 16px; text-align: left; }
.boton-icono {
  display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--relleno); color: var(--acento); cursor: pointer;
}
.boton-icono .icono { width: 20px; height: 20px; stroke-width: 2.2; }
.acciones-fila { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 16px; }
.acciones-caja { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.tarjetas { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Control segmentado */
.segmentado { border: 0; margin: 0; padding: 0; min-width: 0; }
.segmentado legend { padding: 0 16px; margin-bottom: 6px; font-size: 13px; color: var(--texto-2); }
.segmentado .opciones { display: flex; padding: 2px; border-radius: 9px; background: var(--relleno); }
.segmentado label { flex: 1; display: flex; min-width: 0; }
.segmentado input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmentado span {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 32px; padding: 4px 8px;
  border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.segmentado input:checked + span { background: #636366; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .04); }
.segmentado input:focus-visible + span { outline: 2px solid var(--acento); outline-offset: 1px; }
.segmentado.grande span { min-height: 38px; font-size: 15px; }

/* Filas de navegación (como los ajustes de iOS) */
.fila-nav {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 16px; min-height: 48px;
  border: 0; background-color: transparent; color: var(--texto); text-align: left; cursor: pointer;
}
.fila-nav:active { background-color: var(--celda-2); }
.fila-nav > div { flex: 1; display: grid; gap: 4px; min-width: 0; }
.fila-nav strong { font-weight: 500; }
.fila-nav small { color: var(--texto-2); font-size: 14px; }
.fila-nav .flecha { width: 16px; height: 16px; color: var(--texto-3); stroke-width: 2.4; }
.fila-icono { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--acento); color: var(--sobre-acento); flex: none; }
.fila-icono .icono { width: 18px; height: 18px; stroke-width: 2.2; }

/* Etiquetas de estado */
.estado { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.estado.coincide { background: var(--verde-tinte); color: var(--verde); }
.estado.sin_registro { background: var(--rojo-tinte); color: #ff8a80; }
.estado.justificado { background: var(--relleno); color: var(--texto-2); }
.estado.en_curso { background: var(--acento-tinte); color: var(--acento); }

/* Recibos: filas de operaciones, asistencias, movimientos */
.recibo { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: baseline; padding: 11px 16px; }
.recibo time { color: var(--texto-2); font-size: 14px; display: grid; }
.recibo time small { font-size: 12px; }
.recibo div { display: grid; min-width: 0; }
.recibo small { color: var(--texto-2); font-size: 13px; }
.recibo .importe { font-weight: 600; white-space: nowrap; }
.recibo.anulado strong, .recibo.anulado .importe { text-decoration: line-through; color: var(--texto-3); }
.boton-fila { width: 100%; border: 0; background-color: transparent; color: var(--texto); text-align: left; cursor: pointer; }
.boton-fila:active { background-color: var(--celda-2); }

/* ---------------------------------------------------------------- ingreso */
.ingreso { max-width: 400px; width: 100%; margin: 40px auto 0; display: grid; gap: 22px; }
.ingreso .logo { display: grid; justify-items: center; gap: 10px; padding: 24px 0 8px; text-align: center; }
.ingreso .logo .marca-texto { font-size: 46px; letter-spacing: .12em; }
.ingreso .logo p { color: var(--texto-2); font-size: 15px; }

/* ---------------------------------------------------------------- registro rápido */
.registrar { display: grid; gap: 14px; max-width: 640px; }
.turno { max-width: 560px; }
.turno-cabeza { display: flex; gap: 14px; align-items: center; }
.turno-cabeza div { display: grid; gap: 4px; }
.turno-cabeza small { color: var(--texto-2); font-size: 15px; }
.turno-cabeza .poste { height: 34px; width: 12px; background-size: 100% 36px; }
.turno-linea { display: flex; gap: 10px; align-items: center; color: var(--texto-2); font-size: 15px; }
.paso { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texto-2); margin: 6px 4px -4px; }
.paso b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--celda-3); color: #fff; font-size: 12px; }
.estado-cliente { font-size: 15px; }
.codigos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.codigo {
  display: grid; gap: 2px; align-content: start; min-height: 84px; padding: 10px; text-align: left; cursor: pointer;
  border: 0; border-radius: 14px; background: var(--celda); color: var(--texto);
}
.codigo strong { font-family: var(--destacada); font-weight: 600; font-size: 30px; line-height: 1; }
.codigo span { font-size: 13px; color: var(--texto-2); line-height: 1.2; }
.codigo small { font-size: 13px; }
.codigo:active { background: var(--celda-2); }
.codigo[aria-pressed="true"] { background: var(--acento); color: var(--sobre-acento); }
.codigo[aria-pressed="true"] span { color: var(--sobre-acento); }
.codigo-escrito { width: 100%; max-width: 240px; }
.confirmar { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-size: 18px; position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; }

/* ---------------------------------------------------------------- pestañas: abajo en el celular, cápsula en la computadora */
.cabecera-gestion { display: grid; gap: 12px; }
.titulo-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.accion { display: flex; gap: 8px; }
.volver { display: inline-flex; align-items: center; gap: 2px; justify-self: start; }
.pestanas {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: rgba(22, 22, 24, .86); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--separador);
}
.pestana {
  display: grid; justify-items: center; gap: 2px; padding: 4px 0; background: none; border: 0; cursor: pointer;
  color: var(--gris); font-size: 10px; font-weight: 600; min-width: 0;
}
.pestana span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pestana .icono { width: 26px; height: 26px; }
.pestana[aria-current="page"] { color: var(--acento); }
@media (min-width: 900px) {
  main { padding-bottom: 56px; }
  .pestanas {
    position: static; justify-self: start; display: flex; gap: 2px; padding: 4px; border-radius: 999px;
    background: var(--celda); border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .pestana { display: flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 999px; font-size: 15px; color: var(--texto-2); }
  .pestana .icono { width: 18px; height: 18px; }
  .pestana[aria-current="page"] { background: var(--celda-3); color: var(--texto); }
  .confirmar { bottom: 16px; }
}

/* Tablas dentro de un grupo */
.tabla { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; vertical-align: top; }
th { color: var(--texto-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
tbody td { border-top: 1px solid var(--separador); }
td.num, th.num { text-align: right; white-space: nowrap; }
td.hora { white-space: nowrap; }
td small { display: block; color: var(--texto-2); font-size: 13px; }
tr.anulado td { color: var(--texto-3); }
tr.anulado td:not(:last-child) { text-decoration: line-through; }
tr.resaltada td { background: var(--acento-tinte); }
.justificar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }

/* Gráfico de evolución */
.grafico { margin: 0; background: var(--celda); border-radius: var(--radio); padding: 14px 12px 10px; }
.grafico svg { width: 100%; height: auto; display: block; }
.grafico-grilla { stroke: var(--separador); stroke-width: 1; }
.grafico-cero { stroke: var(--texto-3); stroke-width: 1; }
.grafico-eje { fill: var(--texto-2); font-size: 11px; font-family: var(--sistema); }
.grafico-barra.serie-1, .muestra.serie-1 { fill: var(--acento); background: var(--acento); }
.grafico-barra.serie-2, .muestra.serie-2 { fill: #f2f2f7; background: #f2f2f7; }
.grafico .leyenda { display: flex; gap: 16px; justify-content: center; font-size: 13px; color: var(--texto-2); padding-top: 6px; }
.grafico .leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.muestra { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* Horario semanal */
.horario-fila { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 8px 16px; }
.horario-fila .dia { display: flex; gap: 10px; align-items: center; }
.horario-fila input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--acento); }
.horario-fila input[type="time"] { background: var(--relleno); border: 0; border-radius: 8px; padding: 6px 8px; color: var(--texto); }
.items .item { position: relative; }

/* Línea de tiempo de las cámaras (módulo en pausa) */
.jornada { display: grid; gap: 8px; padding: 14px 16px; }
.carril { display: grid; grid-template-columns: 120px 1fr; align-items: center; }
.pista {
  position: relative; height: 30px; border-radius: 8px; background-color: var(--celda-2);
  background-image: linear-gradient(to right, var(--separador) 1px, transparent 1px);
  background-size: calc(100% / var(--tramos, 6)) 100%;
}
.bloque { position: absolute; top: 4px; bottom: 4px; min-width: 5px; padding: 0; border: 0; border-radius: 5px; cursor: pointer; }
.bloque.coincide { background: var(--verde); }
.bloque.sin_registro { background: var(--rojo); }
.bloque.justificado { background: #636366; }
.bloque.en_curso { background: var(--franjas); background-size: 28px 100%; animation: poste 1.4s linear infinite; }
@keyframes poste { to { background-position: 28px 0; } }

/* ---------------------------------------------------------------- clientes */
.buscador {
  display: flex; align-items: center; gap: 6px; padding: 0 10px; min-height: 38px;
  border-radius: 10px; background: var(--relleno); color: var(--texto-2);
}
.buscador .icono { width: 18px; height: 18px; }
.buscador input { flex: 1; min-width: 0; border: 0; background: none; padding: 7px 0; font-size: 17px; color: var(--texto); }
.buscador input:focus { outline: none; }
.buscador:focus-within { outline: 2px solid var(--acento); outline-offset: 1px; }

.avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; }
.avatar > span {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(160deg, #5a5a5e, #2c2c2e); font-weight: 600; font-size: 16px;
}
.avatar.reciente { padding: 2px; background: var(--aro); }
.avatar.reciente > span { border: 2px solid var(--celda); }
.avatar.grande { width: 92px; height: 92px; }
.avatar.grande > span { font-size: 34px; }
.avatar.grande.reciente { padding: 3px; }
.avatar.grande.reciente > span { border-width: 3px; border-color: var(--celda); }

.cliente-fila {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 9px 12px 9px 16px; border: 0; background-color: transparent; color: var(--texto); text-align: left; cursor: pointer;
}
.grupo > .cliente-fila + .cliente-fila { background-position: 72px 0; background-size: calc(100% - 72px) 1px; }
.cliente-fila:active { background-color: var(--celda-2); }
.cliente-fila div { display: grid; min-width: 0; }
.cliente-fila strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cliente-fila small { color: var(--texto-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cliente-fila .icono { width: 16px; height: 16px; color: var(--texto-3); stroke-width: 2.4; }
.cliente-fila .fecha { color: var(--texto-2); font-size: 15px; white-space: nowrap; }

/* ---------------------------------------------------------------- hoja (sheet) */
.hoja-modal {
  border: 0; padding: 0; color: var(--texto); background: var(--celda);
  width: 100%; max-width: 100%; max-height: 94vh; margin: auto 0 0; border-radius: 14px 14px 0 0;
}
.hoja-modal[open] { display: flex; flex-direction: column; animation: subir .34s cubic-bezier(.2, .9, .3, 1); }
.hoja-modal::backdrop { background: rgba(0, 0, 0, .55); }
@keyframes subir { from { transform: translateY(100%); } }
@media (min-width: 700px) {
  .hoja-modal { width: min(620px, 92vw); max-height: 88vh; margin: auto; border-radius: 16px; }
  @keyframes subir { from { transform: translateY(24px); opacity: 0; } }
}
.agarre { width: 36px; height: 5px; border-radius: 3px; background: var(--texto-3); margin: 6px auto 0; flex: none; }
.hoja-barra { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 16px; flex: none; }
.hoja-barra strong { font-size: 17px; font-weight: 600; text-align: center; }
.hoja-barra > :last-child { justify-self: end; }
.hoja-barra > :first-child { justify-self: start; }
.hoja-cuerpo {
  min-height: 0; overflow-y: auto; padding: 8px 16px calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 20px;
}
.hoja-cuerpo > *, .hoja-cuerpo form > * { flex: none; }
.hoja-modal .grupo, .hoja-modal .cifra { background: var(--celda-2); }
.hoja-modal .campo:focus-within { background-color: var(--celda-3); }
.hoja-modal .segmentado .opciones { background: var(--celda-3); }

.ficha-cabeza { display: grid; justify-items: center; gap: 6px; text-align: center; padding-top: 4px; }
.ficha-cabeza h2 { font-size: 26px; }
.ficha-cabeza small { color: var(--texto-2); font-size: 15px; }
.acciones-contacto { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.accion { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: var(--radio); background: var(--celda-2); color: var(--acento); font-size: 12px; font-weight: 600; text-decoration: none; }

@media (max-width: 600px) {
  main { padding-left: 12px; padding-right: 12px; gap: 20px; }
  h1 { font-size: 30px; }
  .frase { font-size: 18px; }
  .campo { grid-template-columns: 108px 1fr; }
  .filtros .segmentado { min-width: 0; flex-basis: 100%; max-width: none; }
  .cifra strong { font-size: 19px; }
  .cifra-principal strong { font-size: 30px; }
  .carril { grid-template-columns: 76px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .bloque.en_curso { animation: none; }
  .aviso, .hoja-modal[open] { animation: none; }
}
