/* Bohe Fitness · app para gimnasios y grupos de actividades.
   Estilo deportivo oscuro (referencias: bigg.fit y sportclub.com.ar): fondo casi negro, títulos en mayúsculas
   condensadas y acento turquesa del logo Bohe Fitness, con el azul marino de la "B".
   Layout: barra superior con el negocio; una columna pensada para el celular; barra inferior de navegación
   (en computadora pasa arriba, como pestañas). */
:root {
  --bg: #05080D;
  --surface: #0D1520;
  --surface-2: #131E2B;
  --ink: #F2F6FA;
  --muted: #9AABBD;
  --faint: #6B7C8F;
  --line: #1D2938;
  --line-strong: #2C3C51;
  --brand: #00E0C2;
  --brand-dark: #00BFA5;
  --brand-ink: #02201B;            /* texto sobre el turquesa */
  --brand-soft: #0B2A2A;
  --navy: #0B2D5E;
  --amber: #F5B83D;
  --amber-soft: #2A2011;
  --ok: #2BD67B;
  --danger: #FF5A5F;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --f-display: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
  --f-body: 'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--f-body);
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
  padding-block: 0 calc(88px + env(safe-area-inset-bottom, 0px));
}
body.sin-nav { padding-bottom: 32px; }
body.locked { overflow: hidden; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; text-wrap: balance; font-weight: 700; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--muted); } .fine { color: var(--faint); font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
.acento { color: var(--brand); }
.ic { width: 20px; height: 20px; flex: none; }
.wrap { max-width: 980px; margin: 0 auto; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* Botones y campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; text-decoration: none; white-space: nowrap; letter-spacing: .01em; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-brand { background: var(--brand); color: var(--brand-ink); } .btn-brand:hover:not(:disabled) { background: var(--brand-dark); }
.btn-ghost { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand); }
.btn-wa { background: #25D366; color: #052E16; } .btn-wa:hover { background: #1FBE5B; }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); color: var(--danger); }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); flex: none; }
.icon-btn:disabled { opacity: .4; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field small { color: var(--faint); font-size: .8rem; }
.input { width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); font-size: 1rem; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 0; border-color: var(--brand); }
.input[readonly] { color: var(--muted); }
.input.big { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
select.input option { background: var(--surface); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid2 .full, .grid3 .full { grid-column: 1 / -1; }
.err { color: var(--danger); font-size: .9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: .93rem; }
.alert > span { min-width: 0; }
.alert .btn { margin-top: 6px; }
.alert-warn { background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--line)); }
.alert-warn .ic { color: var(--amber); }
.alert-info { background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.alert-info .ic { color: var(--brand); }
.alert-err { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line)); }
.alert-err .ic { color: var(--danger); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.chip.aldia, .chip.confirmada, .chip.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); color: var(--ok); }
.chip.porvencer, .chip.pendiente, .chip.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 45%, var(--line)); color: var(--amber); }
.chip.vencido, .chip.rechazada, .chip.mal { background: color-mix(in srgb, var(--danger) 13%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); color: var(--danger); }
.chip.demo, .chip.brand { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 26px 16px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--surface); }
.empty .ic { width: 30px; height: 30px; color: var(--faint); }
.empty b { color: var(--ink); }
.loading { display: grid; place-items: center; padding: 40px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Barra superior */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; margin: 0 calc(-1 * max(14px, env(safe-area-inset-right, 0px))) 16px calc(-1 * max(14px, env(safe-area-inset-left, 0px))); padding: 10px max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); background: rgba(0, 0, 0, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: #000; }
.top-in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.marca { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.marca-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; }
img.marca-ic { object-fit: cover; background: #000; border: 1px solid var(--line-strong); }
.marca b { display: block; font-family: var(--f-display); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }
.marca small { color: var(--muted); font-size: .78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca > div { min-width: 0; }
.tabs-desk { display: none; }
.btn-instalar { flex: none; }
.btn-instalar .ic { width: 18px; height: 18px; }
.login > .contador { align-items: center; }
@media (max-width: 380px) { .btn-instalar span { display: none; } .btn-instalar { padding: 0 10px; } }

/* Barra inferior */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: #000; border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.bn { display: grid; justify-items: center; gap: 2px; border: 0; background: none; padding: 6px 1px; font-size: .66rem; color: var(--faint); border-radius: 10px; text-transform: uppercase; letter-spacing: 0; font-weight: 600; min-width: 0; }
.bn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn .ic { width: 24px; height: 24px; }
.bn.on { color: var(--brand); }

/* Inicio */
.saludo { display: grid; gap: 4px; }
.saludo h1 span { color: var(--brand); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; gap: 0; min-width: 0; text-align: left; }
button.kpi:hover { border-color: var(--brand); }
.kpi span { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.kpi b { font-family: var(--f-display); font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi.ok b { color: var(--ok); } .kpi.warn b { color: var(--amber); } .kpi.mal b { color: var(--danger); } .kpi.brand b { color: var(--brand); }
.contador { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.buscar { display: flex; gap: 8px; }
.buscar .input { flex: 1; min-width: 0; }
.input.busca-grande { min-height: 60px; font-size: 1.15rem; border-color: color-mix(in srgb, var(--brand) 45%, var(--line-strong)); }
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 18px; background: linear-gradient(135deg, var(--navy), #04121F 70%); border: 1px solid var(--line); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 35%, transparent), transparent 70%); pointer-events: none; }

/* Listas */
.cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.cats button { white-space: nowrap; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: .84rem; font-weight: 700; color: var(--muted); }
.cats button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.lista { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.fila { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; align-items: center; }
.fila:last-child { border-bottom: 0; }
button.fila:hover { background: var(--surface-2); }
.fila b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila .izq { display: grid; min-width: 0; }
.fila .der { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.fila .monto { font-weight: 700; font-variant-numeric: tabular-nums; }
.fila.anulada b, .fila.anulada .monto { text-decoration: line-through; color: var(--faint); }
/* Fila con botón principal y acciones al costado (no se anidan botones). */
.fila-doble { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); }
.fila-doble:last-child { border-bottom: 0; }
.fila-doble > .fila { border-bottom: 0; }
.fila-doble > .acc { display: flex; gap: 6px; padding-right: 12px; }
.hora { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; min-width: 44px; }

/* Salidas */
.salida { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
button.salida:hover { border-color: var(--brand); }
.salida.pasada { opacity: .65; }
.fecha-blk { display: grid; justify-items: center; width: 58px; padding: 6px 0; border-radius: 12px; background: var(--navy); line-height: 1; }
.fecha-blk b { font-family: var(--f-display); font-size: 1.8rem; }
.fecha-blk small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); font-weight: 700; margin-top: 2px; }
.salida .s-txt { display: grid; gap: 2px; min-width: 0; }
.salida .s-txt b { font-family: var(--f-display); font-size: 1.25rem; text-transform: uppercase; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salida .s-txt small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salida .s-der { display: grid; justify-items: end; gap: 4px; }
.cupo { font-family: var(--f-display); font-size: 1.3rem; color: var(--brand); line-height: 1; }
.datos-salida { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.dato { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; }
.dato span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.dato b { font-size: 1rem; overflow-wrap: anywhere; }
.texto-largo { white-space: pre-wrap; color: var(--ink); }

/* Rutinas */
.dia { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.ej { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(4, minmax(0, 1fr)) 44px; gap: 6px; align-items: center; }
.ej .input { min-height: 42px; padding: 8px 10px; font-size: .92rem; }
.ej-cab { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(4, minmax(0, 1fr)) 44px; gap: 6px; font-size: .68rem; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.ver-ej { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.ver-ej.con-foto { grid-template-columns: 72px minmax(0, 1fr) auto; }
.ver-ej:last-child { border-bottom: 0; }
.ver-ej b { font-size: 1rem; }
.ej-txt { display: grid; gap: 2px; min-width: 0; }
.ej-foto img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; display: block; border: 1px solid var(--line); }
.ver-video { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; text-decoration: none; }
.ver-video .ic { width: 18px; height: 18px; }
.ver-ej .carga { font-family: var(--f-display); font-size: 1.25rem; color: var(--brand); text-align: right; white-space: nowrap; }
.ver-ej small { color: var(--muted); }
.icon-btn.con-media { border-color: var(--brand); color: var(--brand); }
.ej-extra { grid-column: 1 / -1; display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ej-media { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ej-media img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
details.dia-ver { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 4px 14px; }
details.dia-ver summary { padding: 10px 0; font-family: var(--f-display); font-size: 1.2rem; text-transform: uppercase; color: var(--ink); }

/* Portada tipo página web (inicio del socio y página pública) */
.portada { position: relative; min-height: 190px; display: flex; align-items: flex-end; padding: 18px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--navy), #04121F 70%) center / cover no-repeat; }
.portada::after { content: ""; position: absolute; right: -50px; top: -50px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 30%, transparent), transparent 70%); pointer-events: none; }
.portada-in { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.portada-in h1 { font-size: 2.2rem; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.portada-in p { color: #E6EEF5; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.portada-in b { font-family: var(--f-display); font-size: 1.4rem; text-transform: uppercase; }
.portada.mini { min-height: 130px; }
.descripcion { color: var(--muted); font-size: 1.02rem; }
.plan-card { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; width: 100%; color: var(--ink); }
.plan-card + .plan-card { margin-top: 0; }
button.plan-btn:hover { border-color: var(--brand); }
.plan-card b { font-family: var(--f-display); font-size: 1.25rem; text-transform: uppercase; }
.precio-g { font-family: var(--f-display); font-size: 1.5rem; color: var(--brand); white-space: nowrap; }
.precio-g small { font-size: .85rem; color: var(--muted); }
/* Galería de fotos */
.galeria { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.galeria img { height: 170px; width: auto; max-width: 260px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); scroll-snap-align: start; display: block; }
.galeria.edit { flex-wrap: wrap; overflow: visible; }
.foto-ed { position: relative; }
.foto-ed img { height: 92px; width: 92px; max-width: none; }
.foto-ed .icon-btn { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .7); }
.foto-mas { width: 92px; height: 92px; border-radius: 14px; border: 1px dashed var(--brand); display: grid; place-items: center; align-content: center; gap: 2px; color: var(--brand); font-size: .8rem; font-weight: 700; cursor: pointer; }
.foto-mas input { display: none; }
/* Actividad con foto del lugar: la foto es la portada de la tarjeta y del detalle. */
.salida.con-foto { display: block; padding: 0; overflow: hidden; }
.salida-portada { position: relative; display: block; height: 160px; background: center / cover no-repeat var(--navy); }
.salida-portada::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.salida-portada .fecha-blk, .act-portada .fecha-blk { position: absolute; left: 12px; bottom: 12px; z-index: 1; background: rgba(11, 45, 94, .92); }
.salida-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; }
.act-portada { position: relative; display: block; height: 220px; border-radius: 18px; background: center / cover no-repeat var(--navy); border: 1px solid var(--line); }
.act-portada.edit { height: 180px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px; }
.act-portada.edit .btn { background: rgba(0, 0, 0, .7); }
.act-portada.edit input, .portada-vacia input { display: none; }
.portada-vacia { display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 1px dashed var(--brand); border-radius: 18px; color: var(--brand); text-align: center; cursor: pointer; }
.portada-vacia .ic { width: 30px; height: 30px; }
.portada-vacia small { color: var(--muted); }
.foto-ed .usar-portada { position: absolute; left: 4px; bottom: 4px; min-height: 26px; padding: 0 8px; font-size: .72rem; background: rgba(0, 0, 0, .75); }
.sub { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.sub > b, .sub .contador b { font-family: var(--f-display); font-size: 1.15rem; text-transform: uppercase; color: var(--brand); }

/* Ficha */
.datos { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: .95rem; }
.datos dt { color: var(--muted); }
.datos dd { margin: 0; overflow-wrap: anywhere; }
.botones { display: flex; flex-wrap: wrap; gap: 8px; }
.botones .btn { flex: 1 1 150px; }
.estado-cuota { display: grid; gap: 4px; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.estado-cuota b { font-family: var(--f-display); font-size: 1.9rem; line-height: 1.05; text-transform: uppercase; }
.estado-cuota.aldia { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.estado-cuota.aldia b { color: var(--ok); }
.estado-cuota.porvencer { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 45%, var(--line)); }
.estado-cuota.porvencer b { color: var(--amber); }
.estado-cuota.vencido { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.estado-cuota.vencido b { color: var(--danger); }
.cuentas { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin: 0; }
.cuentas dt { color: var(--muted); }
.cuentas dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.cuentas .tot { border-top: 1px solid var(--line); padding-top: 8px; color: var(--ink); font-size: 1.08rem; }
.total-grande { display: grid; justify-items: center; gap: 2px; padding: 12px; border-radius: 16px; background: var(--surface-2); text-align: center; }
.total-grande span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.total-grande b { font-family: var(--f-display); font-size: 2.2rem; line-height: 1.1; color: var(--brand); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { min-height: 42px; border: 0; border-radius: 10px; background: none; font-weight: 700; color: var(--muted); font-size: .88rem; padding: 0 4px; }
.seg.medios { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .seg.medios { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.mes { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mes b { font-family: var(--f-display); font-size: 1.3rem; text-transform: uppercase; }
.hecha { display: grid; justify-items: center; gap: 4px; padding: 6px 0; text-align: center; }
.hecha .ic { width: 52px; height: 52px; padding: 10px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 18%, var(--surface)); color: var(--ok); }
.hecha.mal .ic { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); color: var(--danger); }
.hecha b { font-family: var(--f-display); font-size: 1.8rem; text-transform: uppercase; }
.cred { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; white-space: pre-wrap; font: .88rem/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; overflow-wrap: anywhere; }
.foto { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; object-fit: cover; background: var(--navy); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; }
.logo-g { width: 72px; height: 72px; border-radius: 18px; flex: none; display: grid; place-items: center; object-fit: cover; background: var(--navy); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 2rem; border: 1px solid var(--line-strong); }
.perfil { display: flex; align-items: center; gap: 14px; min-width: 0; }
.perfil > div { display: grid; min-width: 0; }
.perfil b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-display); font-size: 1.3rem; text-transform: uppercase; }
.perfil small { color: var(--muted); }
label.btn input[type=file] { display: none; }
.menu { display: grid; }
.menu button, .menu a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; text-decoration: none; color: var(--ink); font-weight: 700; }
.menu > :last-child { border-bottom: 0; }
.menu .ic { color: var(--brand); }
.menu small { display: block; color: var(--muted); font-weight: 400; font-size: .84rem; }
details summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: .92rem; }

/* Modal */
.ov { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 12px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 24px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 22px; box-shadow: var(--shadow); }
.modal.ancho { width: min(760px, 100%); }
.m-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.m-head h2 { min-width: 0; overflow-wrap: anywhere; }
.m-body { overflow-y: auto; padding: 16px 18px; display: grid; gap: 14px; align-content: start; grid-auto-rows: max-content; grid-template-columns: minmax(0, 1fr); }
.m-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.m-foot .grow { flex: 1; }

/* Ingreso */
.login { max-width: 420px; margin: 8vh auto 0; display: grid; gap: 18px; }
.logo-app { width: min(320px, 100%); height: auto; display: block; }
.firma { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--faint); font-size: .8rem; padding: 8px 0; }
.firma img { width: 18px; height: auto; border-radius: 4px; }
.opcion { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.opcion:hover { border-color: var(--brand); }
.opcion span { display: grid; }
.opcion small { color: var(--muted); }

#toast-root { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; width: min(440px, calc(100% - 28px)); pointer-events: none; }
.toast { background: var(--surface-2); border: 1px solid var(--brand); color: var(--ink); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow); font-size: .92rem; display: flex; gap: 10px; align-items: center; animation: fade .2s; }
.toast .ic { color: var(--brand); }
.toast.err { border-color: var(--danger); } .toast.err .ic { color: var(--danger); }
.toast.warn { border-color: var(--amber); } .toast.warn .ic { color: var(--amber); }

/* Lista impresa para el guía (solo se ve al imprimir) */
#print-root { display: none; }
@media print {
  html, body { background: #fff; color: #000; padding: 0; }
  body > *:not(#print-root) { display: none !important; }
  body::before { display: none; }
  #print-root { display: block; font: 12px/1.4 Arial, sans-serif; color: #000; }
  #print-root h1 { font: 700 18px Arial, sans-serif; text-transform: none; margin-bottom: 4px; }
  #print-root p { margin: 0 0 8px; }
  #print-root table { width: 100%; border-collapse: collapse; }
  #print-root th, #print-root td { border: 1px solid #999; padding: 4px 6px; text-align: left; vertical-align: top; }
  #print-root th { background: #eee; }
}

@media (min-width: 860px) {
  body { padding-bottom: 32px; }
  .bottom { display: none; }
  .tabs-desk { display: flex; gap: 4px; }
  .tabs-desk button { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; font-size: .88rem; }
  .tabs-desk button.on { background: var(--brand); color: var(--brand-ink); }
  #toast-root { bottom: 24px; }
}
@media (max-width: 859px) {
  .modal { align-self: end; border-radius: 22px 22px 16px 16px; }
}
@media (max-width: 560px) {
  .ej { grid-template-columns: repeat(4, minmax(0, 1fr)) 44px; }
  .ej .ej-nombre { grid-column: 1 / -1; }
  .ej-cab { display: none; }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .kpi b { font-size: 1.6rem; }
  .salida-cuerpo { grid-template-columns: minmax(0, 1fr); }
  .salida-cuerpo .s-der { justify-items: start; display: flex; gap: 8px; align-items: center; }
  .salida-portada { height: 140px; }
  .portada-in h1 { font-size: 1.8rem; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .salida { grid-template-columns: auto minmax(0, 1fr); }
  .salida .s-der { grid-column: 1 / -1; justify-items: start; display: flex; gap: 8px; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
