/* Presta Fácil · © 2026 Pedro Duarte Vaca */
/* Letras guardadas en la app (sin Google Fonts) */
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400 800; font-display: swap; src: url(fuentes/jakarta-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400 800; font-display: swap; src: url(fuentes/jakarta-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(fuentes/plex-mono-latin.woff2) format('woff2'); }

/* Colores: verde azulado de marca; rojo para mora, ámbar para lo que vence hoy */
:root {
  --bg: #f3f7f6;
  --surface: #ffffff;
  --ink: #0f1f1d;
  --muted: #52635f;
  --line: #dfe8e6;
  --marca: #134e4a;
  --marca-2: #0f766e;
  --accent: #0f766e;
  --accent-soft: #e2f3f1;
  --verde: #16a34a;
  --azul: #2563eb;
  --amarillo: #ca8a04;
  --morado: #7c3aed;
  --naranja: #ea580c;
  --rojo: #dc2626;
  --radio: 14px;
  --sombra: 0 1px 2px rgba(15, 31, 29, .05), 0 4px 16px rgba(15, 31, 29, .05);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 1.05rem; font-weight: 700; }
h3 { font-size: .95rem; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.muted { color: var(--muted); margin: 0; }
.nota { color: var(--muted); font-size: .85rem; margin: 0; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
code { font-family: var(--mono); font-size: .82rem; background: var(--bg); padding: 1px 6px; border-radius: 6px; }
.rojo { color: var(--rojo); }
.verde { color: var(--verde); }

/* ---------- Botones y campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.peligro { background: var(--surface); color: var(--rojo); border-color: #f5c2c2; }
.btn.verde { background: var(--verde); }
.btn.grande { min-height: 50px; width: 100%; font-size: 1rem; }
.btn.chico { min-height: 34px; padding: 0 12px; font-size: .88rem; }
.btn.cargando { position: relative; color: transparent !important; }
.btn.cargando::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: gira .7s linear infinite;
}
.btn.sec.cargando::after, .btn.peligro.cargando::after { border-color: var(--line); border-top-color: var(--accent); }
@keyframes gira { to { transform: rotate(360deg); } }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: .88rem; cursor: pointer; }
.icono-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.icono-btn:hover { background: rgba(127, 127, 127, .12); }
.icono-btn.chico { width: 30px; height: 30px; }
.icono-btn.chico .ico { width: 16px; height: 16px; }

.campo { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.campo small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 400;
}
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--accent); flex: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px;
}
.pila { display: flex; flex-direction: column; gap: 14px; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.acciones { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.acciones.izq { justify-content: flex-start; }
.casilla { display: flex; gap: 10px; align-items: center; font-size: .9rem; font-weight: 500; }
.con-boton { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }

/* Elegir el método de cálculo */
.opciones-metodo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcion { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; }
.opcion strong { display: block; font-size: .92rem; }
.opcion small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.opcion:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Acceso ---------- */
.pantalla-centro {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 10% -10%, #cdeee9 0, transparent 60%), var(--bg);
}
.caja { width: 100%; max-width: 420px; background: var(--surface); border-radius: 18px; padding: 28px 24px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 16px; }
.marca { display: flex; align-items: center; gap: 12px; }
.marca strong { display: block; font-size: 1.05rem; }
.marca small { display: block; color: var(--muted); font-size: .8rem; }
.logo {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--marca-2), var(--marca)); color: #fff;
}
.logo .ico { width: 24px; height: 24px; }
.logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; background: #fff; }
.pestanas { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); padding: 4px; border-radius: 12px; }
.pestanas button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.pestanas button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: var(--sombra); }
.codigo-encontrado { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--marca); font-size: .88rem; }
.codigo-encontrado.no { background: #fdecec; color: #8a1c1c; }
.exito { margin: 0; color: var(--verde); font-size: .9rem; }
.planes-pago { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-pago { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.plan-pago span { font-size: 1.2rem; font-weight: 800; color: var(--marca); }
.plan-pago small { color: var(--muted); }
.clave-grande { font: 700 2rem var(--mono); letter-spacing: .12em; padding: 10px 18px; background: var(--accent-soft); border-radius: 12px; color: var(--marca); text-align: center; }
.logo-grande { width: 96px; height: 96px; border-radius: 16px; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; background: #fff; color: var(--muted); }
.logo-grande img { width: 100%; height: 100%; object-fit: contain; }
.con-imagen { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.mini-logo { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; background: #fff; flex: none; color: var(--muted); }
.mini-logo img { width: 100%; height: 100%; object-fit: contain; }
.logo-impresion { max-height: 60px; max-width: 180px; object-fit: contain; float: right; }
.error { margin: 0; color: var(--rojo); font-size: .9rem; }
.copyright { margin: 0; text-align: center; font-size: .75rem; color: var(--muted); }
.lateral-copy { color: rgba(255,255,255,.55); font-size: .7rem; margin-top: -8px; }
.espera { text-align: center; align-items: center; }
.espera .ico-grande { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #fdecec; color: var(--rojo); }
.espera .ico-grande .ico { width: 32px; height: 32px; }

/* ---------- Estructura: menú lateral + contenido ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.lateral {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px;
  background: var(--marca); color: #fff; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
}
.lateral .marca small { color: rgba(255,255,255,.7); }
.lateral .logo { background: #fff; color: var(--marca); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: rgba(255,255,255,.82); font-weight: 500; font-size: .93rem; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.activo { background: rgba(255,255,255,.16); color: #fff; font-weight: 700; }
.nav-seccion { margin: 14px 12px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.burbuja { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--rojo); color: #fff; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; }
.usuario-bloque { display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); }
.usuario-fila { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: #fff; }
.usuario-txt { min-width: 0; }
.usuario-txt strong, .usuario-txt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario-txt small { color: rgba(255,255,255,.7); font-size: .78rem; }
.avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: rgba(255,255,255,.18); color: #fff; font-weight: 700; font-size: .85rem;
}

.principal { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 500; display: flex; align-items: center; gap: 10px;
  padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
}
.top h1 { font-size: 1.3rem; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vista { padding: 4px 28px 40px; display: flex; flex-direction: column; gap: 16px; max-width: 1150px; width: 100%; }
.solo-movil { display: none; }
.barra-inferior { display: none; }
.velo { position: fixed; inset: 0; z-index: 900; background: rgba(15, 31, 29, .45); }

/* ---------- Tarjetas, listas y datos ---------- */
.tarjeta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio); padding: 18px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tarjeta-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.formulario { max-width: 760px; }
.vacio { color: var(--muted); text-align: center; padding: 18px 8px; margin: 0; }
.lista { display: flex; flex-direction: column; }
.fila { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: inherit; }
.fila:last-child { border-bottom: 0; }
a.fila:hover { background: var(--bg); border-radius: 10px; }
.fila-num { flex: none; min-width: 54px; font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.fila-txt { flex: 1; min-width: 0; }
.fila-txt strong { display: block; }
.fila-txt small { display: block; color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-monto { text-align: right; font-weight: 700; white-space: nowrap; }
.fila-monto small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.fila-botones { display: flex; gap: 6px; flex: none; }
.datos { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.datos dt { color: var(--muted); font-size: .88rem; }
.datos dd { margin: 0; overflow-wrap: anywhere; }
.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }

/* Estados */
.chip { flex: none; display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--bg); color: var(--muted); white-space: nowrap; }
.chip.activo, .chip.al-dia { background: #dbeafe; color: #1e40af; }
.chip.pagado, .chip.pagada { background: #dcfce7; color: #166534; }
.chip.parcial, .chip.hoy { background: #fef3c7; color: #92400e; }
.chip.vencida, .chip.mora { background: #ffe4e6; color: #9f1239; }
.chip.anulado { background: #f1f5f9; color: #64748b; text-decoration: line-through; }
.chip.inactivo { background: #f1f5f9; color: #64748b; }

/* ---------- Panel principal ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio); padding: 14px 16px; color: inherit; box-shadow: var(--sombra); border-top: 4px solid var(--c, var(--accent)); }
.kpi small { display: block; color: var(--muted); font-weight: 600; font-size: .8rem; }
.kpi strong { display: block; font-size: 1.45rem; font-weight: 800; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; color: var(--muted); font-size: .8rem; }
a.kpi:hover { border-color: var(--c, var(--accent)); }
.accesos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.acceso {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 96px; padding: 14px 8px; border-radius: var(--radio); color: #fff; font-weight: 700; font-size: .9rem; line-height: 1.2;
  box-shadow: var(--sombra); background: var(--c, var(--accent)); transition: transform .15s;
}
.acceso:hover { transform: translateY(-2px); }
.acceso .ico { width: 28px; height: 28px; stroke-width: 1.7; }
.barra { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
.barra span { display: block; height: 100%; border-radius: inherit; background: var(--verde); }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.cifra { padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.cifra small { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; }
.cifra strong { display: block; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cifra.destacada { background: var(--accent-soft); }
.cifra.destacada strong { color: var(--marca); font-size: 1.35rem; }
.cifra.mal { background: #fff1f2; }
.cifra.mal strong { color: var(--rojo); }

/* ---------- Barra de filtros ---------- */
.barra-acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.barra-acciones input[type=search] { flex: 1 1 240px; width: auto; }
.barra-acciones select, .barra-acciones input[type=date] { width: auto; flex: 0 1 180px; }
.barra-acciones .btn.derecha { margin-left: auto; }
.segmentos { display: inline-flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); padding: 3px; border-radius: 11px; gap: 2px; }
.segmentos button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmentos button[aria-selected=true] { background: var(--accent); color: #fff; }
.aviso { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--marca); font-size: .9rem; }
.aviso.mal { background: #fff1f2; color: #9f1239; }

/* ---------- Tablas ---------- */
.tabla-envoltura { overflow-x: auto; margin: 0 -4px; }
.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabla th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabla td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabla tfoot td { font-weight: 800; border-bottom: 0; }
.tabla .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla tr.anulado td { opacity: .5; text-decoration: line-through; }
.tabla tr.vencida td:first-child { box-shadow: inset 3px 0 0 var(--rojo); }
.tabla tr.pagada td { color: var(--muted); }
.tabla tr[data-ir] { cursor: pointer; }
.tabla tr[data-ir]:hover td { background: var(--bg); }
.modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(15, 31, 29, .6); }
.modal-caja { width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-caja.ancha { width: min(760px, 100%); }
.recibo { border: 1px dashed var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.recibo-monto { font-size: 2rem; font-weight: 800; color: var(--marca); text-align: center; }

/* ---------- Fotos, firmas y formularios ---------- */
.buscador-cliente { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--accent-soft); }
.buscador-cliente .resultados { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; max-height: 320px; overflow-y: auto; }
.buscador-cliente button.fila { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; text-align: left; cursor: pointer; padding: 10px 12px; }
.buscador-cliente button.fila:hover { background: var(--bg); }
.buscador-cliente .nota { color: var(--marca); display: flex; gap: 6px; align-items: center; }
details { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
details summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.foto { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.foto small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.foto-img { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; border: 1px dashed var(--line); background: var(--bg); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.foto-img a, .foto-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pad-firma { width: 100%; height: 150px; border: 1px dashed var(--muted); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.firma-guardada { max-width: 260px; max-height: 110px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.firmas { display: flex; flex-wrap: wrap; gap: 30px 50px; justify-content: space-around; margin-top: 40px; }
.firma-impresa { width: 220px; text-align: center; font-size: .85rem; }
.firma-impresa img { max-width: 220px; max-height: 80px; display: block; margin: 0 auto -6px; }
.firma-espacio { height: 70px; }
.firma-linea { border-top: 1px solid #000; padding-top: 4px; }
.fotos-impresas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fotos-impresas figure { margin: 0; break-inside: avoid; }
.fotos-impresas img { width: 100%; max-height: 240px; object-fit: contain; border: 1px solid #ccc; }
.fotos-impresas figcaption { font-size: 10px; text-align: center; }
.foto-ficha { float: right; width: 110px; height: 130px; object-fit: cover; border: 1px solid #ccc; margin-left: 10px; }
.datos-impresos th, .formulario-impreso th { width: 38%; text-align: left; font-weight: 600; color: #333; }
.formulario-impreso td { height: 26px; border-bottom: 1px solid #999; }
@media print { .salto { break-before: page; } #impresion p { text-align: justify; } }

/* ---------- Aviso flotante ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 4000; max-width: min(92vw, 480px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 500;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--rojo); }

/* ---------- Impresión: solo el recibo o el estado de cuenta ---------- */
#impresion { display: none; }
@media print {
  body > *:not(#impresion) { display: none !important; }
  #impresion { display: block; color: #000; font-size: 12px; }
  #impresion h1 { font-size: 18px; }
  #impresion h2 { font-size: 14px; margin-top: 12px; }
  #impresion .tabla { font-size: 11px; }
  #impresion .tabla td, #impresion .tabla th { padding: 4px 6px; }
  body { background: #fff; }
}

/* ---------- Celular ---------- */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .lateral {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 1000; width: 280px; height: 100%;
    transform: translateX(-105%); transition: transform .22s ease; padding-top: calc(20px + env(safe-area-inset-top));
  }
  .lateral.abierto { transform: none; }
  .solo-movil { display: inline-grid; }
  .top { padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: var(--marca); color: #fff; }
  .top h1 { font-size: 1.1rem; }
  .vista { padding: 14px 16px calc(90px + env(safe-area-inset-bottom)); }
  .barra-inferior {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .barra-inferior a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; color: var(--muted); font-size: .72rem; font-weight: 600; }
  .barra-inferior a.activo { color: var(--accent); }
  .barra-inferior .ico { width: 22px; height: 22px; }
  .barra-inferior .burbuja { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: .65rem; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi strong { font-size: 1.15rem; }
  .accesos { grid-template-columns: 1fr 1fr; }
  .barra-acciones .btn.derecha { margin-left: 0; }
  .tres { grid-template-columns: 1fr 1fr; }
  .tarjeta { padding: 14px; }
}
@media (max-width: 480px) {
  .dos, .tres, .opciones-metodo, .planes-pago { grid-template-columns: 1fr; }
  .datos { grid-template-columns: 1fr; gap: 0; }
  .datos dt { margin-top: 8px; }
  .acciones:not(.izq) .btn { flex: 1; }
  .fila { flex-wrap: wrap; }
  .fila-botones { width: 100%; justify-content: flex-end; }
}
