/* Moviliza Gestión Gym · panel del gimnasio.
   Estilo "escalera de acento": el naranja de Tabata (#FF9000) entero sólo en marcas chicas (el botón principal,
   la serie de datos, el ícono activo); sus tintes pálidos hacen el trabajo de área. Marco en T con reglas de 1 px.
   Grilla: menú 224 px + lienzo fluido con 28 px de margen; un solo hueco de 16 px entre tarjetas. */
@font-face { font-family: Figtree; src: url(/fuentes/figtree.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Big Shoulders'; src: url(/fuentes/BigShoulders-Bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --ground: #fbf8f4; --surface: #ffffff; --raised: #f8f4ef; --active: #ffeed6; --hover: #f5efe7;
  --border: #ebe4db; --rule: #f2ece5; --control: #d5cdc3;
  --text: #15120f; --muted: #5d5751; --faint: #6b655e;
  --accent: #ff9000; --accent-ink: #8a4300; --acc-50: #fff7ec; --acc-100: #ffeed6; --acc-200: #ffd9a3; --acc-300: #ffbf66;
  --primary: #ff9000; --primary-ink: #15120f; --primary-hover: #f08400;
  --ink-btn: #15120f;
  --positive: #247b50; --pill-pos-bg: #dcfae5; --pill-pos: #04250e;
  --negative: #c4242a; --pill-neg-bg: #ffedea; --pill-neg: #831c1e; --pill-rec-bg: #fbd3cd; --pill-rec: #6a1013;
  --pill-war-bg: #fbf1c4; --pill-war: #5e4700;
  --pill-neu-bg: #efebe6; --pill-neu: #3f3a35;
  --grid: #ece6df; --axis-ink: #6b655e; --ink: #15120f;
  --chart-1: #ff9000; --chart-2: #15120f; --chart-muted: #d9d2c9; --chart-mark: #15120f; --chart-span: .06; --chart-track: #e9e3db;
  --radius-card: 10px; --radius-control: 8px; --radius-chip: 999px;
  --gap: 16px; --pad: 28px; --card-pad: 20px;
  --font: Figtree, system-ui, sans-serif; --display: 'Big Shoulders', 'Arial Narrow', sans-serif;
  --foco: #c56a00;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 20px; color: var(--text); background: var(--ground); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.gris { color: var(--muted); }
.chico { font-size: 12px; line-height: 16px; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }
::selection { background: var(--acc-200); }
.ico { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------ marco en T */
.app { height: 100dvh; display: grid; grid-template-columns: 224px minmax(0, 1fr); grid-template-rows: 60px minmax(0, 1fr); }
.lado { grid-row: 1 / 3; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.marca { height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); flex: none; }
.marca .sello { width: 34px; height: 34px; flex: none; }
.marca .sello img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.marca b { display: block; font-family: var(--display); font-size: 22px; line-height: 22px; letter-spacing: .01em; text-transform: uppercase; }
.marca small { display: block; font-size: 12px; line-height: 14px; color: var(--muted); }
.nav { flex: 1; overflow: auto; padding: 8px 10px 12px; }
.nav-grupo { font-size: 12px; color: var(--faint); padding: 18px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; margin: 2px 0; padding: 0 10px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.nav a .ico { width: 17px; height: 17px; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a[aria-current=page] { background: var(--acc-100); color: var(--accent-ink); font-weight: 600; }
.nav a[aria-current=page] .ico { color: var(--accent); stroke-width: 2; }
.nav .cuenta { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; background: var(--pill-neg-bg); color: var(--pill-neg); font-variant-numeric: tabular-nums; }
.nav .cuenta.suave { background: var(--pill-neu-bg); color: var(--pill-neu); }
.lado-pie { border-top: 1px solid var(--border); padding: 10px; display: grid; gap: 4px; }
.lado-pie a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.lado-pie a:hover { background: var(--hover); color: var(--text); }
.yo { display: flex; align-items: center; gap: 8px; padding: 6px 10px 2px; font-size: 13px; color: var(--muted); }
.yo b { color: var(--text); font-weight: 600; display: block; line-height: 16px; }
.yo .btn { margin-left: auto; }

.barra { border-bottom: 1px solid var(--border); display: flex; align-items: center; min-width: 0; }
.barra .menu-btn { display: none; }
.buscador { position: relative; flex: 1; max-width: 520px; margin-left: var(--pad); }
.buscador input { width: 100%; height: 38px; padding: 0 12px 0 38px; border-radius: 10px; border: 1px solid var(--control); background: var(--surface); font-size: 14px; }
.buscador .ico { position: absolute; left: 12px; top: 10px; color: var(--faint); }
.buscador kbd { position: absolute; right: 10px; top: 9px; font: inherit; font-size: 12px; color: var(--faint); border: 1px solid var(--border); border-radius: 5px; padding: 0 6px; line-height: 18px; }
.sugerencias { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(40, 24, 0, .14); padding: 6px; z-index: 40; max-height: 70vh; overflow: auto; }
.sugerencias .vacio { padding: 12px; color: var(--muted); }
.barra-der { margin-left: auto; display: flex; align-items: center; height: 100%; }
.barra-der .div { width: 1px; align-self: stretch; background: var(--border); }
.sede-sel { display: flex; align-items: center; gap: 8px; padding: 0 var(--pad) 0 18px; height: 100%; }
.sede-sel span { font-size: 12px; color: var(--faint); }
.sede-sel select { border: 0; background: transparent; font-weight: 600; padding: 4px 22px 4px 0; min-height: 0; width: auto; }
.reloj { padding: 0 18px; color: var(--muted); font-size: 13px; white-space: nowrap; }

.lienzo { overflow: auto; min-width: 0; padding: 24px var(--pad) 48px; }
.lienzo:focus { outline: none; }

/* ------------------------------------------------------------ título de cada pantalla */
.titulo { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.titulo h1 { font-family: var(--display); font-size: 30px; line-height: 30px; letter-spacing: .005em; text-transform: uppercase; }
.titulo .sub { color: var(--muted); font-size: 15px; line-height: 22px; margin-top: 6px; }
.titulo .sub b { color: var(--text); font-weight: 600; }
.titulo .acc { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ botones y campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--radius-control);
  border: 1px solid var(--control); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.primario { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primario:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.negro { background: var(--ink-btn); border-color: var(--ink-btn); color: #fff; }
.btn.negro:hover { background: #2c2722; }
.btn.peligro { color: var(--negative); border-color: #efc3c0; }
.btn.peligro:hover { background: #fff4f3; }
.btn.fantasma { border-color: transparent; background: transparent; }
.btn.fantasma:hover { background: var(--hover); }
.btn.chico { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.grande { height: 48px; padding: 0 20px; font-size: 16px; }
.btn.ancho { width: 100%; }
.btn .ico { width: 17px; height: 17px; }
.btn.solo-ico { width: 36px; padding: 0; }
.btn.chico.solo-ico { width: 30px; }
.link { background: none; border: 0; padding: 0; color: var(--accent-ink); font-weight: 600; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

.campo { display: grid; gap: 6px; }
.campo > span { font-weight: 500; font-size: 13px; }
.campo small { color: var(--muted); font-size: 12px; line-height: 16px; }
input[type=text], input[type=tel], input[type=number], input[type=password], input[type=search], input[type=date], input[type=time],
input[type=email], input[type=month], input:not([type]), select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); font-size: 14px; }
textarea { height: auto; min-height: 76px; padding: 9px 12px; resize: vertical; line-height: 20px; }
select { padding-right: 28px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--foco); outline-offset: -1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.grilla2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grilla3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }
.grilla4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 16px; }
.span2 { grid-column: span 2; }
.fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fila.entre { justify-content: space-between; }
.pesos { position: relative; }
.pesos::before { content: '$'; position: absolute; left: 12px; top: 9px; color: var(--faint); }
.pesos input { padding-left: 26px; text-align: right; font-variant-numeric: tabular-nums; }

/* segmentado y pestañas */
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--rule); gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--text); outline: 1px solid var(--border); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 0 11px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected=true] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.tabs .n { color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ paneles */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); min-width: 0; }
.panel-cab { display: flex; align-items: center; gap: 10px; padding: 16px var(--card-pad) 0; min-height: 52px; }
.panel-cab h2 { font-size: 16px; line-height: 22px; font-weight: 600; }
.panel-cab .der { margin-left: auto; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.panel-cuerpo { padding: 12px var(--card-pad) var(--card-pad); }
.panel-pie { padding: 0 var(--card-pad) 16px; }
.columnas { display: grid; gap: var(--gap); align-items: start; }
.col-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-rail { grid-template-columns: minmax(0, 1fr) 360px; }
.pila { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.seccion-titulo { font-size: 16px; font-weight: 600; margin: 4px 0 8px; }

/* KPI en una sola caja dividida */
.kpis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.kpi { padding: 16px var(--card-pad); border-left: 1px solid var(--border); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi .v { font-size: 26px; line-height: 34px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.kpi .v small { font-size: 15px; color: var(--faint); font-weight: 500; }
.kpi .c { font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 2px; }
.kpi .c b { font-weight: 600; }
.kpi.lider .v { font-size: 32px; line-height: 40px; }
.pos { color: var(--positive); }
.neg { color: var(--negative); }

/* pastillas de estado */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; flex: none; background: var(--pill-neu-bg); color: var(--pill-neu); }
.pill.al_dia, .pill.ok, .pill.pos { background: var(--pill-pos-bg); color: var(--pill-pos); }
.pill.por_vencer, .pill.vence_hoy, .pill.war { background: var(--pill-war-bg); color: var(--pill-war); }
.pill.vencido, .pill.neg { background: var(--pill-neg-bg); color: var(--pill-neg); }
.pill.recargo { background: var(--pill-rec-bg); color: var(--pill-rec); }
.pill.acc { background: var(--acc-100); color: var(--accent-ink); }
.pill .ico { width: 13px; height: 13px; }
.pill.grande { height: 28px; padding: 0 12px; font-size: 14px; }

/* avatar con iniciales (tono propio de cada socio) */
.av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; font-size: 13px;
  background: hsl(var(--h, 30) 70% 92%); color: hsl(var(--h, 30) 45% 28%); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.g { width: 56px; height: 56px; font-size: 19px; }
.av.xg { width: 72px; height: 72px; font-size: 24px; }

/* ------------------------------------------------------------ tablas y listas */
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; padding: 8px 10px; white-space: nowrap; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.tabla td { padding: 10px; border-top: 1px solid var(--rule); vertical-align: middle; }
.tabla th:first-child, .tabla td:first-child { padding-left: var(--card-pad); }
.tabla th:last-child, .tabla td:last-child { padding-right: var(--card-pad); }
.tabla .num, .tabla th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla tr.clic { cursor: pointer; }
.tabla tr.clic:hover td { background: var(--raised); }
.tabla .sub { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.tabla .quien { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tabla .quien b { font-weight: 600; display: block; }
.tabla .acc { text-align: right; white-space: nowrap; }
.tabla .acc .btn + .btn { margin-left: 6px; }
.envoltura { overflow: auto; max-width: 100%; }
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: flex; align-items: center; gap: 12px; padding: 10px var(--card-pad); border-top: 1px solid var(--rule); min-height: 48px; }
.lista li:first-child { border-top: 0; }
.lista li .t { flex: 1; min-width: 0; }
.lista li .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista li .t span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista li .d { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lista li.clic { cursor: pointer; }
.lista li.clic:hover { background: var(--raised); }
.lista li.sel { background: var(--acc-50); }
.vacio { padding: 14px var(--card-pad); color: var(--muted); }
.vacio-caja { margin: 0 var(--card-pad) var(--card-pad); border: 1px dashed var(--control); border-radius: 8px; padding: 12px 14px; color: var(--muted); }
.mas { padding: 12px var(--card-pad) 16px; }
.mas .btn { height: 30px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.kv dd.izq { text-align: left; }
.total-fila { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border); font-weight: 600; }

/* avisos que piden acción, arriba del contenido */
.alerta { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: var(--acc-50); border: 1px solid var(--acc-200); margin-bottom: var(--gap); }
.alerta .ico { color: var(--accent-ink); }
.alerta b { font-weight: 600; }
.alerta .btn { margin-left: auto; }

/* ------------------------------------------------------------ calendario de cobranza (el elemento propio) */
.cobranza svg { width: 100%; height: 190px; overflow: visible; }
.cobranza .col-dia { cursor: pointer; }
.cobranza .col-dia:hover .fondo-dia { fill: var(--raised); }
.cobranza .clave { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.cobranza .clave i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* barras finas (progreso) */
.barrita { height: 6px; border-radius: 999px; background: var(--chart-track); overflow: hidden; }
.barrita > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.barrita.lleno > span { background: var(--negative); }
.ocupacion { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.ocupacion .barrita { flex: 1; }

/* ------------------------------------------------------------ recepción */
.recep { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; }
.recep-busca { position: relative; }
.recep-busca input { height: 56px; font-size: 20px; padding-left: 52px; border-radius: 12px; border-width: 1.5px; }
.recep-busca .ico { position: absolute; left: 18px; top: 18px; width: 20px; height: 20px; color: var(--faint); }
.ficha-rapida { margin-top: var(--gap); }
.ficha-rapida .cab { display: flex; gap: 16px; align-items: center; padding: var(--card-pad); }
.ficha-rapida .cab h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.ficha-rapida .datos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.ficha-rapida .datos > div { padding: 12px var(--card-pad); border-left: 1px solid var(--rule); }
.ficha-rapida .datos > div:first-child { border-left: 0; }
.ficha-rapida .datos .l { font-size: 12px; color: var(--muted); }
.ficha-rapida .datos .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.ficha-rapida .motivos { padding: 12px var(--card-pad); border-top: 1px solid var(--rule); display: grid; gap: 6px; }
.ficha-rapida .motivos div { display: flex; gap: 8px; align-items: center; }
.ficha-rapida .acciones { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 var(--card-pad) var(--card-pad); }
.resultado-ingreso { display: flex; align-items: center; gap: 14px; padding: 14px var(--card-pad); border-top: 1px solid var(--rule); font-weight: 600; }
.resultado-ingreso.ok { background: #f0fbf4; color: var(--pill-pos); }
.resultado-ingreso.aviso { background: #fdf8e4; color: var(--pill-war); }
.resultado-ingreso.rechazado { background: #fff2f0; color: var(--pill-neg); }
.resultado-ingreso.repetido { background: var(--raised); color: var(--muted); }

/* ------------------------------------------------------------ diálogos y cajón */
.dlg { border: 0; padding: 0; border-radius: 14px; background: var(--surface); color: var(--text); width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px); box-shadow: 0 24px 64px rgba(40, 24, 0, .26); }
.dlg::backdrop { background: rgba(28, 20, 10, .42); }
.dlg.chico { width: min(420px, calc(100vw - 24px)); }
.dlg.grande { width: min(920px, calc(100vw - 24px)); }
.dlg.enorme { width: min(1180px, calc(100vw - 24px)); }
.dlg-cuerpo { padding: 22px 24px; display: grid; gap: 16px; }
.dlg-cuerpo h2 { font-size: 20px; line-height: 26px; font-weight: 700; }
.dlg-cuerpo > p { color: var(--muted); }
.dlg-acciones { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dlg[open] { animation: entra .16s ease-out; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }
.dlg.cajon { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(680px, 100vw); border-radius: 0; }
.dlg.cajon[open] { animation: cajon .18s ease-out; }
@keyframes cajon { from { transform: translateX(24px); opacity: .6; } }
.cajon-cab { position: sticky; top: 0; z-index: 3; background: var(--surface); padding: 18px 24px 0; border-bottom: 1px solid var(--border); }
.cajon-cab .fila1 { display: flex; gap: 14px; align-items: center; }
.cajon-cab h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.cajon-cab .tabs { margin: 14px 0 -1px; border-bottom: 0; }
.cajon-cuerpo { padding: 20px 24px 32px; display: grid; gap: 18px; }
.cerrar-x { margin-left: auto; align-self: flex-start; }

/* cobro */
.cobro { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.cobro .izq { padding: 22px 24px; display: grid; gap: 16px; align-content: start; }
.cobro .der { background: var(--raised); border-left: 1px solid var(--border); padding: 22px 22px; display: grid; gap: 14px; align-content: start; border-radius: 0 14px 14px 0; }
.items-cobro { display: grid; gap: 8px; }
.items-cobro .it { display: flex; justify-content: space-between; gap: 12px; }
.items-cobro .it span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.items-cobro .it.desc span:last-child { color: var(--positive); }
.items-cobro .it.rec { color: var(--pill-neg); }
.total-cobro { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--control); padding-top: 12px; }
.total-cobro b { font-size: 30px; line-height: 36px; font-weight: 700; font-variant-numeric: tabular-nums; }
.medios { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.medios button { height: 40px; border-radius: 8px; border: 1px solid var(--control); background: var(--surface); font-weight: 600; cursor: pointer; font-size: 13px; }
.medios button[aria-pressed=true] { border-color: var(--accent); background: var(--acc-100); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 30px; border-radius: 999px; border: 1px solid var(--control); background: var(--surface); padding: 0 12px; font-size: 13px; cursor: pointer; }
.chips button:hover { background: var(--hover); }
.chips button[aria-pressed=true] { background: var(--acc-100); border-color: var(--acc-300); color: var(--accent-ink); font-weight: 600; }
.nota-recargo { font-size: 12px; line-height: 16px; color: var(--muted); }
.listo-cobro { text-align: center; padding: 34px 26px; display: grid; gap: 14px; justify-items: center; }
.listo-cobro .tilde { width: 56px; height: 56px; border-radius: 50%; background: var(--pill-pos-bg); color: var(--positive); display: grid; place-items: center; }
.listo-cobro .tilde .ico { width: 28px; height: 28px; stroke-width: 2.4; }
.listo-cobro h2 { font-size: 24px; }

/* avisos flotantes */
#avisos { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.aviso { background: #1d1914; color: #fff; padding: 11px 16px; border-radius: 10px; font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: entra .2s ease-out; transition: opacity .3s; max-width: min(92vw, 480px); }
.aviso.error { background: #8f1d1b; }
.aviso.ok { background: #1e5f3f; }
.aviso.fuera { opacity: 0; }

/* WhatsApp */
.burbuja { background: #e7fbd9; border-radius: 10px 10px 10px 2px; padding: 10px 12px; white-space: pre-wrap; line-height: 20px; font-size: 14px; color: #142010; }
.burbuja-ed { width: 100%; min-height: 120px; background: #effbe6; border: 1px solid #c9e6b5; border-radius: 10px; }
.uno-por-uno { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: var(--card-pad); }
.uno-por-uno .acciones { display: grid; gap: 8px; align-content: start; min-width: 200px; }

/* clases */
.semana { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.semana .dia h3 { font-size: 13px; font-weight: 600; padding: 4px 2px 8px; display: flex; justify-content: space-between; color: var(--muted); }
.semana .dia.hoy h3 { color: var(--accent-ink); }
.clase { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; margin-bottom: 8px; text-align: left; width: 100%; }
.clase:hover { border-color: var(--acc-300); }
.clase .h { font-weight: 700; font-variant-numeric: tabular-nums; }
.clase .n { font-weight: 600; }
.clase .p { font-size: 12px; color: var(--muted); line-height: 16px; }
.clase.pasada { opacity: .62; }

/* rutina */
.rutina-dias { display: grid; gap: 14px; }
.rutina-dia { border: 1px solid var(--border); border-radius: 10px; }
.rutina-dia .cab { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--raised); border-radius: 10px 10px 0 0; border-bottom: 1px solid var(--border); }
.rutina-dia .cab b { font-family: var(--display); font-size: 20px; text-transform: uppercase; letter-spacing: .01em; }
.ej-fila { display: grid; grid-template-columns: 22px minmax(160px, 2.4fr) 58px 92px 92px 74px minmax(90px, 1.4fr) 64px; gap: 6px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--rule); }
.ej-fila:first-of-type { border-top: 0; }
.ej-fila input { height: 32px; padding: 0 8px; font-size: 13px; }
.ej-cab { font-size: 12px; color: var(--muted); border-top: 0; padding-top: 8px; padding-bottom: 0; }
.ej-fila .orden { color: var(--faint); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.rutina-ver .ej { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--rule); }
.rutina-ver .ej:first-of-type { border-top: 0; }
.rutina-ver .ej .sr-txt { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

/* calor de asistencia (12 semanas) y horas pico */
.calor { display: grid; grid-template-rows: repeat(7, 13px); grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; }
.calor i { border-radius: 3px; background: var(--rule); }
.calor i.si { background: var(--accent); }
.calor i.con-aviso { background: var(--acc-300); }
.pico { display: grid; grid-template-columns: 74px repeat(16, minmax(0, 1fr)); gap: 3px; font-size: 12px; }
.pico .h { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.pico .d { color: var(--muted); }
.pico i { height: 22px; border-radius: 4px; background: var(--rule); display: block; }

/* compras */
.soltar { border: 1.5px dashed var(--control); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; display: grid; gap: 6px; justify-items: center; }
.soltar.encima { border-color: var(--accent); background: var(--acc-50); }
.soltar b { color: var(--text); }
.vista-archivo { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: 10px; background: var(--raised); }
.vista-archivo img { width: 100%; height: 100%; object-fit: contain; }
.leido { font-size: 12px; color: var(--accent-ink); background: var(--acc-50); border-radius: 8px; padding: 8px 10px; }

/* ajustes */
.ajuste { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; padding: 26px 0; border-top: 1px solid var(--border); }
.ajuste:first-of-type { border-top: 0; padding-top: 4px; }
.ajuste h2 { font-size: 16px; font-weight: 600; }
.ajuste .desc { color: var(--muted); margin-top: 6px; }
.ajuste .caja-ajuste { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; display: grid; gap: 16px; }
.ejemplo { background: var(--acc-50); border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 20px; color: var(--accent-ink); }

/* entrar */
.entrar-pant { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); }
.entrar-lado { background: #0d0b09; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; position: relative; overflow: hidden; }
.entrar-lado .diag { position: absolute; inset: 0; width: 100%; height: 100%; }
.entrar-lado .diag polygon { fill: var(--accent); }
.entrar-lado > * { position: relative; }
.entrar-lado h1 { font-family: var(--display); font-size: clamp(56px, 8vw, 112px); line-height: .9; text-transform: uppercase; letter-spacing: .005em; }
.entrar-lado p { font-size: 18px; line-height: 26px; max-width: 32ch; color: #f1ebe4; }
.entrar-form { display: grid; align-content: center; padding: 48px; gap: 16px; background: var(--surface); }
.entrar-form h2 { font-size: 24px; font-weight: 700; }
.entrar-form .error { color: var(--negative); font-weight: 600; min-height: 20px; }
.demo-roles { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: var(--raised); }
.demo-roles p { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------ teléfono y tablet */
@media (max-width: 1100px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); }
  .lado { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); background: var(--ground); z-index: 60; transform: translateX(-102%);
    transition: transform .18s ease-out; box-shadow: 0 0 0 100vmax rgba(28, 20, 10, 0); }
  .app.menu-abierto .lado { transform: none; box-shadow: 0 0 0 100vmax rgba(28, 20, 10, .4); }
  .barra .menu-btn { display: inline-flex; margin-left: 10px; }
  .buscador { margin-left: 10px; }
  .reloj { display: none; }
  .col-rail, .recep { grid-template-columns: minmax(0, 1fr); }
  .cobro { grid-template-columns: minmax(0, 1fr); }
  .cobro .der { border-left: 0; border-top: 1px solid var(--border); border-radius: 0 0 14px 14px; }
  .ajuste { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .semana { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  :root { --pad: 16px; --card-pad: 16px; }
  .titulo h1 { font-size: 26px; line-height: 26px; }
  .kpis { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .kpi { border-left: 0; border-top: 1px solid var(--border); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(2n) { border-left: 1px solid var(--border); }
  .kpi:last-child:nth-child(odd) { grid-column: span 2; }
  .col-2 { grid-template-columns: minmax(0, 1fr); }
  .grilla2, .grilla3, .grilla4 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .ficha-rapida .datos { grid-template-columns: 1fr 1fr; }
  .ficha-rapida .datos > div:nth-child(3) { border-left: 0; }
  .ficha-rapida .datos > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .sede-sel span, .buscador kbd { display: none; }
  .sede-sel { padding: 0 12px; }
  .tabla.apilable thead { display: none; }
  .tabla.apilable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 10px var(--card-pad); border-top: 1px solid var(--rule); }
  .tabla.apilable td { border: 0; padding: 0 !important; }
  .tabla.apilable td.opc { display: none; }
  .tabla.apilable td.l2 { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
  .semana { grid-template-columns: minmax(0, 1fr); }
  .uno-por-uno { grid-template-columns: minmax(0, 1fr); }
  .entrar-pant { grid-template-columns: minmax(0, 1fr); }
  .entrar-lado { min-height: 240px; padding: 28px; }
  .entrar-form { padding: 28px; }
  .ej-fila { grid-template-columns: 18px minmax(0, 1fr) 48px 70px; }
  .ej-fila .opc { display: none; }
  .dlg.cajon { width: 100vw; }
  .cajon-cab, .cajon-cuerpo { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
