:root {
  --fondo: #f4f5f7; --sup: #ffffff; --sup2: #f8fafc; --borde: #e3e6eb; --texto: #0f172a; --suave: #64748b;
  --pri: #059669; --pri-osc: #047857; --pri-cl: #d1fae5;
  --rojo: #dc2626; --rojo-cl: #fee2e2; --naranja: #ea580c; --naranja-cl: #ffedd5;
  --amarillo: #b45309; --amarillo-cl: #fef3c7; --verde: #059669; --verde-cl: #d1fae5;
  --azul: #2563eb; --azul-cl: #dbeafe; --morado: #7c3aed; --morado-cl: #ede9fe;
  --radio: 14px; --sombra: 0 1px 2px rgba(15,23,42,.06), 0 1px 8px rgba(15,23,42,.04);
  --inf: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #0b1120; --sup: #131c2e; --sup2: #0f1728; --borde: #243047; --texto: #e5e9f0; --suave: #94a3b8;
    --pri: #10b981; --pri-osc: #059669; --pri-cl: #064e3b;
    --rojo: #f87171; --rojo-cl: #450a0a; --naranja: #fb923c; --naranja-cl: #431407;
    --amarillo: #fbbf24; --amarillo-cl: #422006; --verde: #34d399; --verde-cl: #064e3b;
    --azul: #60a5fa; --azul-cl: #172554; --morado: #a78bfa; --morado-cl: #2e1065;
    --sombra: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
body.con-hoja { overflow: hidden; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 1.5rem; margin: 0; line-height: 1.2; }
h2 { font-size: 1.05rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
small { font-size: .8rem; }
.muted { color: var(--suave); }
.rojo-t { color: var(--rojo); } .verde-t { color: var(--verde); } .naranja-t { color: var(--naranja); }
.flex1 { flex: 1; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; flex: none; }
[hidden] { display: none !important; }

/* ---------- marco ---------- */
#app { min-height: 100vh; }
main { padding: 16px 16px calc(var(--inf) + 24px + env(safe-area-inset-bottom)); max-width: 1100px; margin: 0 auto; outline: none; }
.lateral { display: none; }
.inferior { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--sup); border-top: 1px solid var(--borde); padding-bottom: env(safe-area-inset-bottom); height: calc(var(--inf) + env(safe-area-inset-bottom)); }
.inferior a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; color: var(--suave); }
.inferior a.activo { color: var(--pri); font-weight: 600; }
.inferior a.mas-grande svg { background: var(--pri); color: #fff; border-radius: 50%; width: 40px; height: 40px; padding: 8px; margin-top: -14px; box-shadow: 0 4px 12px rgba(5,150,105,.35); }
@media (min-width: 900px) {
  #app.con-marco { display: grid; grid-template-columns: 240px 1fr; }
  .inferior { display: none; }
  main { padding: 28px 32px 48px; width: 100%; }
  .lateral { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--sup); border-right: 1px solid var(--borde); padding: 20px 12px; }
  .lateral nav { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; flex: 1; }
  .lateral nav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--suave); font-weight: 500; }
  .lateral nav a:hover { background: var(--sup2); color: var(--texto); }
  .lateral nav a.activo { background: var(--pri-cl); color: var(--pri-osc); }
  .lateral .usuario { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-top: 1px solid var(--borde); font-weight: 600; }
  .marca { display: flex; gap: 10px; align-items: center; padding: 0 8px; }
  .marca small { display: block; color: var(--suave); }
}
@media (prefers-color-scheme: dark) { .lateral nav a.activo { color: var(--pri); } }

/* ---------- cabecera ---------- */
.cab { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cab h1 + p, .cab p { margin: 2px 0 0; }
.cab > div:first-child p.muted:first-child { margin: 0 0 2px; text-transform: capitalize; }
.volver { font-size: 1.4rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--sup); border: 1px solid var(--borde); flex: none; }
.h2-fila { display: flex; justify-content: space-between; align-items: baseline; }
.h2-fila a { color: var(--pri); font-weight: 600; font-size: .9rem; }
section { margin-top: 24px; }

/* ---------- botones ---------- */
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; white-space: nowrap; }
.btn.pri { background: var(--pri); color: #fff; } .btn.pri:hover { background: var(--pri-osc); }
.btn.sec { background: var(--sup); border: 1px solid var(--borde); }
.btn.peligro { background: var(--rojo); color: #fff; }
.btn.ancho { width: 100%; } .btn.grande { min-height: 52px; font-size: 1.05rem; }
.btn.mini { min-height: 38px; padding: 6px 14px; font-size: .9rem; border-radius: 10px; }
.btn:disabled { opacity: .6; }
.enlace { background: none; border: 0; color: var(--pri); font-weight: 600; padding: 4px 6px; }
.logo { width: 64px; height: 64px; border-radius: 50%; background: var(--pri); color: #fff; font-weight: 800; font-size: 2rem; display: grid; place-items: center; margin: 0 auto 12px; }
.logo.peq { width: 38px; height: 38px; font-size: 1.2rem; margin: 0; }

/* ---------- entrar ---------- */
.entrar { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.entrar-caja { width: 100%; max-width: 380px; background: var(--sup); border-radius: 20px; padding: 28px 22px; box-shadow: var(--sombra); border: 1px solid var(--borde); text-align: center; }
.entrar-caja h1 { margin-bottom: 4px; }
.entrar-caja .sub { color: var(--suave); margin: 0 0 20px; }
.entrar-caja label { text-align: left; }
.error { color: var(--rojo); min-height: 1.2em; margin: 10px 0 0; }

/* ---------- formularios ---------- */
label { display: block; font-weight: 600; font-size: .92rem; margin: 12px 0 6px; }
label > input, label > select, label > textarea, label > .plata-input { margin-top: 6px; }
input, select, textarea { width: 100%; border: 1px solid var(--borde); background: var(--sup); border-radius: 12px; padding: 12px 14px; min-height: 48px; font-size: 16px; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pri); outline-offset: 0; border-color: transparent; }
textarea { min-height: auto; resize: vertical; }
.plata-input { display: flex; align-items: center; border: 1px solid var(--borde); border-radius: 12px; background: var(--sup); padding-left: 14px; }
.plata-input:focus-within { outline: 2px solid var(--pri); border-color: transparent; }
.plata-input span { color: var(--suave); font-weight: 600; font-size: 1.1rem; }
.plata-input input { border: 0; font-size: 1.25rem; font-weight: 700; padding-left: 6px; outline: none !important; background: transparent; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 14px 0; }
label.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--pri); flex: none; }
.dos { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.dos input { min-width: 0; }
input[type=date] { -webkit-appearance: none; appearance: none; }
.dos > label { margin-top: 12px; }
@media (max-width: 380px) { .dos { grid-template-columns: 1fr; } }
.ayuda { color: var(--suave); font-size: .85rem; margin: 6px 0; font-weight: 400; }
.formulario fieldset { border: 1px solid var(--borde); background: var(--sup); border-radius: var(--radio); padding: 6px 16px 16px; margin: 0 0 14px; }
.formulario legend { font-weight: 700; padding: 0 6px; }
.formulario { max-width: 640px; }
.segmento { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.segmento button { border: 1px solid var(--borde); background: var(--sup); border-radius: 999px; padding: 9px 16px; min-height: 42px; font-weight: 600; }
.segmento button.activo { background: var(--pri); border-color: var(--pri); color: #fff; }
.segmento.caps button.activo { background: var(--c); border-color: var(--c); }
.segmento .otra { width: 100px; min-height: 42px; border-radius: 999px; padding: 8px 14px; }
.rapidos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rapidos button { border: 1px dashed var(--borde); background: var(--sup2); border-radius: 999px; padding: 7px 12px; font-size: .85rem; }
label.mix { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; margin: 8px 0; }
label.mix .plata-input { margin: 0; }
label.mix .plata-input input { font-size: 1.05rem; min-height: 44px; }

/* ---------- buscador ---------- */
.buscador { display: flex; align-items: center; gap: 10px; background: var(--sup); border: 1px solid var(--borde); border-radius: 14px; padding: 0 14px; min-height: 52px; color: var(--suave); box-shadow: var(--sombra); }
.buscador.campo input { border: 0; padding: 12px 0; outline: none !important; background: transparent; font-size: 1.05rem; }
.buscador.campo span { display: flex; }
.buscar-prest { position: relative; }
.sugerencias { list-style: none; margin: 4px 0 0; padding: 0; background: var(--sup); border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; }
.sugerencias:empty { display: none; }
.sugerencias button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--borde); padding: 12px 14px; }
.sugerencias li:last-child button { border-bottom: 0; }
.sugerencias button:hover { background: var(--sup2); }

/* ---------- tarjetas ---------- */
.tarjetas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
@media (min-width: 700px) { .tarjetas { grid-template-columns: repeat(4, 1fr); } .tarjetas.dos-t { grid-template-columns: repeat(2, 1fr); max-width: 560px; } }
.tarjeta { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--sombra); border-left: 4px solid var(--borde); }
.tarjeta small { color: var(--suave); font-weight: 600; }
.tarjeta b { font-size: 1.5rem; }
.tarjeta span { color: var(--suave); font-size: .85rem; }
.tarjeta.rojo { border-left-color: var(--rojo); } .tarjeta.naranja { border-left-color: var(--naranja); }
.tarjeta.amarillo { border-left-color: #f59e0b; } .tarjeta.azul { border-left-color: var(--azul); }
.tarjeta.verde { border-left-color: var(--verde); } .tarjeta.morado { border-left-color: var(--morado); }

/* ---------- listas ---------- */
.lista { list-style: none; margin: 0; padding: 0; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.fila { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--borde); padding-right: 12px; }
.fila:last-child { border-bottom: 0; }
.fila-link { flex: 1; display: flex; justify-content: space-between; gap: 10px; padding: 12px 4px 12px 14px; min-width: 0; align-items: center; }
a.fila-link:hover { background: var(--sup2); }
.fila-a { min-width: 0; flex: 1; }
.fila-a b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.25; }
.fila-a b small { color: var(--suave); font-weight: 400; }
.fila-b { text-align: right; display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.fila-b .est { font-size: .78rem; }
.fila-b small { font-size: .75rem; }
@media (max-width: 480px) { .fila-link { padding-left: 12px; gap: 8px; } .fila { padding-right: 10px; } .fila .btn.mini { padding: 6px 10px; } }
.lista .vacio { padding: 24px; text-align: center; color: var(--suave); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; font-size: .8rem; }
.chip { --c: #64748b; display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: .75rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); white-space: nowrap; }
.chip.tel { --c: var(--azul); }
.est { font-weight: 600; }
.est.rojo, .rojo > .est { color: var(--rojo); } .est.naranja { color: var(--naranja); } .est.amarillo { color: var(--amarillo); } .est.verde { color: var(--verde); } .est.gris { color: var(--suave); }
.punto { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.punto.rojo { background: var(--rojo); } .punto.naranja { background: var(--naranja); } .punto.amarillo { background: #f59e0b; }
.filtros { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtro { border: 1px solid var(--borde); background: var(--sup); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: .88rem; white-space: nowrap; min-height: 38px; }
.filtro.activo { background: var(--texto); color: var(--fondo); border-color: var(--texto); }
.orden { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 10px; font-size: .88rem; flex-wrap: wrap; }
.orden label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.orden select { width: auto; min-height: 36px; padding: 6px 10px; margin: 0; }

/* ---------- detalle ---------- */
.numeros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .numeros { grid-template-columns: repeat(4, 1fr); } }
.numeros > div { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); padding: 12px 14px; display: flex; flex-direction: column; box-shadow: var(--sombra); }
.numeros small { color: var(--suave); font-weight: 600; }
.numeros b { font-size: 1.3rem; margin: 2px 0; }
.numeros span { font-size: .82rem; }
.numeros .rojo { border-color: var(--rojo); background: var(--rojo-cl); }
.numeros .naranja { border-color: var(--naranja); background: var(--naranja-cl); }
.numeros .morado b { color: var(--morado); }
.acciones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
@media (min-width: 700px) { .acciones { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.accion { border: 1px solid var(--borde); background: var(--sup); border-radius: var(--radio); padding: 14px 10px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 76px; box-shadow: var(--sombra); }
.accion span { font-size: 1.3rem; width: 34px; height: 34px; border-radius: 50%; background: var(--sup2); display: grid; place-items: center; }
.accion.pri { background: var(--pri); color: #fff; border-color: var(--pri); }
.accion.pri span { background: rgba(255,255,255,.2); }
.aviso-caja { background: var(--verde-cl); border-radius: var(--radio); padding: 14px; margin-top: 14px; }
.tabla-caps { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); padding: 4px 14px; }
.cap-fila { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.cap-fila:last-child { border-bottom: 0; }
.cap-fila .der { text-align: right; display: flex; flex-direction: column; }
.barra { height: 8px; background: var(--sup2); border-radius: 99px; overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 99px; }
@media (max-width: 480px) { .cap-fila { grid-template-columns: auto 1fr; } .cap-fila .barra { display: none; } }
.historial { list-style: none; margin: 0; padding: 0; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); }
.historial li { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--borde); }
.historial li:last-child { border-bottom: 0; }
.h-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sup2); font-weight: 800; flex: none; }
.t-interes .h-ico { background: var(--verde-cl); color: var(--verde); }
.t-abono .h-ico { background: var(--azul-cl); color: var(--azul); }
.t-prestamo .h-ico, .t-ampliacion .h-ico { background: var(--naranja-cl); color: var(--naranja); }
.t-cuota .h-ico { background: var(--morado-cl); color: var(--morado); }
.h-cuerpo { flex: 1; min-width: 0; }
.h-fila { display: flex; justify-content: space-between; gap: 8px; }
.h-det, .h-rep, .h-quien { font-size: .83rem; color: var(--suave); margin-top: 2px; }
.h-rep { background: var(--sup2); border-radius: 8px; padding: 4px 8px; margin-top: 4px; }
.h-nota { font-size: .85rem; margin-top: 3px; font-style: italic; }
.h-quien { display: flex; justify-content: space-between; align-items: center; }
.historial li.anulado .h-fila b { text-decoration: line-through; color: var(--suave); }
.datos dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px; margin: 0; }
.datos dt { color: var(--suave); } .datos dd { margin: 0; font-weight: 600; }
details { margin-top: 12px; } summary { cursor: pointer; color: var(--pri); font-weight: 600; padding: 6px 0; }
.audit { font-size: .85rem; padding-left: 18px; }

/* ---------- capitales ---------- */
.mes-nav { display: flex; align-items: center; justify-content: space-between; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); padding: 6px; max-width: 360px; }
.mes-nav a, .mes-nav span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; }
.mes-nav a:hover { background: var(--sup2); }
.caps-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .caps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .caps-grid { grid-template-columns: repeat(3, 1fr); } }
.cap-card { background: var(--sup); border: 1px solid var(--borde); border-top: 4px solid var(--c); border-radius: var(--radio); padding: 14px; box-shadow: var(--sombra); display: block; }
.cap-cab { display: flex; justify-content: space-between; align-items: center; }
.cap-card b.grande { display: block; font-size: 1.45rem; margin: 8px 0; }
.cap-card dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; font-size: .88rem; }
.cap-card dt { color: var(--suave); } .cap-card dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- tablas ---------- */
.tabla { overflow-x: auto; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--borde); white-space: nowrap; }
th { color: var(--suave); font-size: .8rem; font-weight: 600; background: var(--sup2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 800; border-bottom: 0; }
tbody tr[data-ir] { cursor: pointer; } tbody tr[data-ir]:hover { background: var(--sup2); }

/* ---------- actividad / menú ---------- */
.actividad { list-style: none; margin: 0; padding: 0; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); }
.actividad li { border-bottom: 1px solid var(--borde); }
.actividad li:last-child { border-bottom: 0; }
.actividad li > a, .actividad li > span { display: flex; gap: 12px; padding: 12px 14px; align-items: flex-start; }
.actividad li > :not(a) { display: flex; gap: 12px; padding: 12px 14px; }
.actividad small { display: block; color: var(--suave); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--pri-cl); color: var(--pri-osc); font-weight: 800; display: grid; place-items: center; flex: none; }
.menu { list-style: none; padding: 0; margin: 0; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); }
.menu li { border-bottom: 1px solid var(--borde); } .menu li:last-child { border-bottom: 0; }
.menu a, .menu button { display: grid; grid-template-columns: 36px 1fr; align-items: center; padding: 16px; width: 100%; background: none; border: 0; text-align: left; font-weight: 600; }
.menu span { font-size: 1.3rem; grid-row: span 2; }
.menu small { color: var(--suave); font-weight: 400; grid-column: 2; }

/* ---------- hoja inferior ---------- */
.hoja-fondo { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.hoja-fondo.ver { opacity: 1; }
.hoja { background: var(--fondo); width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; transform: translateY(30px); transition: transform .2s; }
.hoja-fondo.ver .hoja { transform: none; }
@media (min-width: 700px) { .hoja-fondo { align-items: center; } .hoja { max-width: 520px; border-radius: 20px; } .hoja.ancha { max-width: 680px; } }
.hoja-cab { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.hoja-cab h2 { margin: 0; font-size: 1.15rem; }
.x { background: var(--sup); border: 1px solid var(--borde); width: 38px; height: 38px; border-radius: 50%; flex: none; }
.hoja-cuerpo { padding: 0 18px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; }
.hoja-pie { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 18px; position: sticky; bottom: 0; background: var(--fondo); padding-top: 10px; }
.texto { line-height: 1.5; }
.info-linea { display: flex; justify-content: space-between; gap: 10px; background: var(--sup); border: 1px solid var(--borde); border-radius: 12px; padding: 10px 14px; margin: 8px 0; font-size: .92rem; flex-wrap: wrap; }
.reparto { background: var(--sup); border: 1px solid var(--borde); border-radius: 12px; padding: 6px 14px; margin-top: 14px; font-size: .92rem; }
.reparto:empty { display: none; }
.reparto > div { display: flex; justify-content: space-between; padding: 5px 0; }
.reparto > div.sub { color: var(--suave); padding-left: 8px; font-size: .88rem; }
.reparto small { display: block; color: var(--suave); padding-top: 6px; }
.reparto.grande { max-width: 640px; margin-bottom: 14px; }
.app-fila { display: grid; grid-template-columns: 1fr 170px auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--borde); }
.app-fila small { display: block; }
.app-fila .plata-input input { font-size: 1rem; min-height: 42px; }
@media (max-width: 480px) { .app-fila { grid-template-columns: 1fr auto; } .app-fila .plata-input { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- varios ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--inf) + 20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--texto); color: var(--fondo); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 100; opacity: 0; transition: .25s; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.error { background: var(--rojo); color: #fff; }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.cargando { display: grid; place-items: center; padding: 60px 0; color: var(--suave); }
.spin { width: 34px; height: 34px; border: 3px solid var(--borde); border-top-color: var(--pri); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.vacio { text-align: center; padding: 30px 10px; color: var(--suave); }

@media (max-width: 600px) { th.om, td.om { display: none; } td { white-space: normal; } .cab h1 { font-size: 1.35rem; } }

/* ---------- ajustes v2 ---------- */
.tarjetas.tres { grid-template-columns: 1fr 1fr; }
.tarjetas.tres .principal { grid-column: 1 / -1; }
.tarjetas.tres .principal b { font-size: 1.9rem; }
@media (min-width: 700px) { .tarjetas.tres { grid-template-columns: 2fr 1fr 1fr; } .tarjetas.tres .principal { grid-column: auto; } }
.banda-revisar { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding: 12px 14px; border-radius: var(--radio); background: var(--azul-cl); color: var(--azul); border: 1px solid color-mix(in srgb, var(--azul) 30%, transparent); }
.banda-revisar span { font-size: .88rem; }
.total-linea { display: flex; justify-content: space-between; padding: 12px 14px; margin-top: 8px; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--radio); font-size: 1.05rem; }
.botonera { display: flex; gap: 10px; flex-wrap: wrap; }
.botonera .btn { flex: 1 1 200px; }
.rev-botones { display: flex; gap: 8px; margin-top: 8px; }
.info-linea.resaltado { background: var(--verde-cl); border-color: transparent; font-size: 1rem; }
.historial a { color: var(--pri); }
#zona-impresion { display: none; }

@media print {
  @page { size: letter portrait; margin: 7mm; }
  body { background: #fff !important; color: #000 !important; }
  body > *:not(#zona-impresion) { display: none !important; }
  #zona-impresion { display: block !important; font-family: Arial, Helvetica, sans-serif; color: #000; }
  .copia { height: 128mm; overflow: hidden; display: flex; flex-direction: column; }
  .p-cab { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5pt solid #000; padding-bottom: 2mm; margin-bottom: 2mm; }
  .p-cab b { font-size: 1.35em; } .p-cab span { font-size: .85em; }
  .p-cols { display: grid; gap: 5mm; flex: 1; align-content: start; }
  .p-cols.c2 { grid-template-columns: 1fr 1fr; }
  .copia table { width: 100%; border-collapse: collapse; font-size: 1em; table-layout: fixed; line-height: 1.2; }
  .copia th, .copia td { border-bottom: .5pt solid #999; padding: .65mm 1mm; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; color: #000; }
  .copia th { font-size: .85em; border-bottom: 1pt solid #000; }
  .copia .num { text-align: right; }
  .copia .ok { width: 6mm; text-align: center; }
  .copia td.ok { border: .5pt solid #666; }
  .p-total { text-align: right; font-size: 1.2em; border-top: 1.5pt solid #000; padding-top: 1.5mm; margin-top: 2mm; }
  .corte { height: 8mm; line-height: 8mm; text-align: center; color: #777; font-size: 8pt; letter-spacing: 1px; overflow: hidden; white-space: nowrap; }
}
