/* Alcancía · finanzas personales.
   Paleta: tinta azul de libreta contable, verde para lo que entra, rojo
   ladrillo para lo que sale y el dorado de la alcancía para los propósitos.
   Tokens en :root; modo oscuro solo redefine tokens. */

:root {
  --bg: #f5f4ef;
  --superficie: #ffffff;
  --superficie-2: #efeee7;
  --borde: #e0ddd2;
  --texto: #1b2433;
  --texto-suave: #656c78;
  --tinta: #1e3a5f;
  --tinta-hover: #152b47;
  --tinta-suave: #e4eaf2;
  --ingreso: #12805c;
  --ingreso-suave: #e1f2ea;
  --gasto: #c2413a;
  --gasto-suave: #fbe7e5;
  --oro: #c98a0c;
  --oro-suave: #fbf0d6;
  --alerta: #a35a00;
  --alerta-suave: #fff0d6;
  --info: #2a5a97;
  --info-suave: #e5edf8;
  --sombra: 0 1px 2px rgba(27, 36, 51, .05), 0 4px 14px rgba(27, 36, 51, .05);
  --radio: 14px;
  --balance: #1e3a5f; --balance-texto: #f5f4ef;
  --c0: #1e3a5f; --c1: #c98a0c; --c2: #12805c; --c3: #c2413a; --c4: #7a5bb5; --c5: #2a8fb0; --c6: #b5653a; --c7: #8a8f99;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151c; --superficie: #181e27; --superficie-2: #1f2631; --borde: #2b3442;
    --texto: #e8ebf0; --texto-suave: #9aa3b2; --tinta: #8fb3e3; --tinta-hover: #b0cbee; --tinta-suave: #1f2c40;
    --ingreso: #4cc794; --ingreso-suave: #16302a; --gasto: #ff8b80; --gasto-suave: #3a1f1e;
    --oro: #f0bd4f; --oro-suave: #352a12; --alerta: #f0b357; --alerta-suave: #33271a; --info: #8ab4f8; --info-suave: #1a2639;
    --sombra: 0 1px 2px rgba(0, 0, 0, .4);
    --balance: #1f3a60; --balance-texto: #eef2f8;
    --c0: #8fb3e3; --c1: #f0bd4f; --c2: #4cc794; --c3: #ff8b80; --c4: #b39ae6; --c5: #6cc5e0; --c6: #e3976b; --c7: #9aa3b2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11151c; --superficie: #181e27; --superficie-2: #1f2631; --borde: #2b3442;
  --texto: #e8ebf0; --texto-suave: #9aa3b2; --tinta: #8fb3e3; --tinta-hover: #b0cbee; --tinta-suave: #1f2c40;
  --ingreso: #4cc794; --ingreso-suave: #16302a; --gasto: #ff8b80; --gasto-suave: #3a1f1e;
  --oro: #f0bd4f; --oro-suave: #352a12; --alerta: #f0b357; --alerta-suave: #33271a; --info: #8ab4f8; --info-suave: #1a2639;
  --sombra: 0 1px 2px rgba(0, 0, 0, .4);
  --balance: #1f3a60; --balance-texto: #eef2f8;
  --c0: #8fb3e3; --c1: #f0bd4f; --c2: #4cc794; --c3: #ff8b80; --c4: #b39ae6; --c5: #6cc5e0; --c6: #e3976b; --c7: #9aa3b2;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--texto);
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--tinta); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.015em; }
h2 { font-size: 1.05rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
p { margin: 0; }
.num, .monto { font-variant-numeric: tabular-nums; white-space: nowrap; }
.suave { color: var(--texto-suave); }
.peque { font-size: .84rem; }
.ingreso-c { color: var(--ingreso); }
.gasto-c { color: var(--gasto); }
.oro-c { color: var(--oro); }
[hidden] { display: none !important; }

/* ---------- estructura ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.lateral {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 12px;
  display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--borde); background: var(--superficie);
}
.marca { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; color: var(--texto); }
.marca:hover { text-decoration: none; }
.marca svg { width: 34px; height: 34px; flex: none; }
.marca b { font-size: 1.12rem; letter-spacing: -.01em; }
.nav {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--texto-suave); font-weight: 600;
}
.nav svg { width: 19px; height: 19px; flex: none; }
.nav:hover { background: var(--superficie-2); color: var(--texto); text-decoration: none; }
.nav.activo { background: var(--tinta-suave); color: var(--tinta); }
.nav-grupo { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--texto-suave); padding: 16px 12px 4px; }
.lateral .pie { margin-top: auto; padding: 12px; font-size: .84rem; color: var(--texto-suave); display: grid; gap: 6px; }
.lateral .pie button { all: unset; cursor: pointer; color: var(--tinta); font-weight: 600; }

.principal { padding: 28px clamp(16px, 4vw, 44px) 120px; max-width: 1180px; width: 100%; display: grid; gap: 22px; align-content: start; }
.encabezado { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.encabezado .sub { color: var(--texto-suave); margin-top: 3px; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* barra inferior en el celular */
.barra-movil { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral { display: none; }
  .principal { padding: 18px 16px 110px; gap: 18px; }
  .barra-movil {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--superficie); border-top: 1px solid var(--borde);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .barra-movil a { display: grid; justify-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--texto-suave); padding: 4px 0; }
  .barra-movil a:hover { text-decoration: none; }
  .barra-movil a.activo { color: var(--tinta); }
  .barra-movil svg { width: 22px; height: 22px; }
  .barra-movil .mas-boton { align-self: start; }
  .barra-movil .mas-boton span {
    width: 52px; height: 52px; margin-top: -24px; border-radius: 50%; background: var(--tinta); color: var(--bg);
    display: grid; place-items: center; box-shadow: 0 6px 18px rgba(30, 58, 95, .35);
  }
  .barra-movil .mas-boton svg { width: 26px; height: 26px; }
  .solo-escritorio { display: none !important; }
}
@media (min-width: 861px) { .solo-movil { display: none !important; } }

/* ---------- piezas ---------- */
.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; box-shadow: var(--sombra); min-width: 0; }
.tarjeta > header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.tarjeta > header a { font-size: .85rem; font-weight: 600; }
.rejilla { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.rejilla-2 { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 980px) { .rejilla-2 { grid-template-columns: minmax(0, 1fr); } }
.pila { display: grid; gap: 18px; min-width: 0; }
.pila > .resumen-cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; cursor: pointer;
  border-radius: 10px; padding: 9px 15px; font: inherit; font-weight: 700; font-size: .92rem;
  background: var(--tinta); color: var(--bg); text-decoration: none !important; line-height: 1.2;
}
.boton:hover { background: var(--tinta-hover); }
.boton svg { width: 17px; height: 17px; }
.boton.sec { background: var(--superficie); color: var(--texto); border-color: var(--borde); }
.boton.sec:hover { background: var(--superficie-2); }
.boton.ingreso { background: var(--ingreso); color: #fff; }
.boton.gasto { background: var(--gasto); color: #fff; }
.boton.oro { background: var(--oro); color: #1b1b1b; }
.boton.peligro { background: transparent; color: var(--gasto); border-color: var(--gasto-suave); }
.boton.peligro:hover { background: var(--gasto-suave); }
.boton.mini { padding: 6px 10px; font-size: .82rem; border-radius: 8px; }
.boton.ancho { width: 100%; padding: 13px; font-size: 1rem; }
.enlace-boton { all: unset; cursor: pointer; color: var(--tinta); font-weight: 600; font-size: .85rem; }

.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(--superficie-2); color: var(--texto-suave); }
.chip.ok { background: var(--ingreso-suave); color: var(--ingreso); }
.chip.mal { background: var(--gasto-suave); color: var(--gasto); }
.chip.alerta { background: var(--alerta-suave); color: var(--alerta); }
.chip.oro { background: var(--oro-suave); color: var(--oro); }
.chip.info { background: var(--info-suave); color: var(--info); }

.mensajes { display: grid; gap: 8px; }
.mensaje { padding: 11px 14px; border-radius: 11px; font-weight: 600; font-size: .92rem; background: var(--ingreso-suave); color: var(--ingreso); }
.mensaje.error { background: var(--gasto-suave); color: var(--gasto); }
.vacio { text-align: center; padding: 26px 12px; color: var(--texto-suave); display: grid; gap: 10px; justify-items: center; }
.vacio .icono-grande { font-size: 2rem; }

/* selector de mes */
.selector-mes { display: inline-flex; align-items: center; gap: 2px; background: var(--superficie); border: 1px solid var(--borde); border-radius: 999px; padding: 3px; }
.selector-mes a, .selector-mes span.des { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--texto); }
.selector-mes a:hover { background: var(--superficie-2); text-decoration: none; }
.selector-mes span.des { opacity: .3; }
.selector-mes b { padding: 0 8px; font-size: .9rem; text-transform: capitalize; min-width: 118px; text-align: center; }

/* ---------- tablero ---------- */
.balance {
  background: var(--balance); color: var(--balance-texto); border-radius: 20px; padding: 22px 24px;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 20px; align-items: center;
  background-image: radial-gradient(circle at 92% 10%, rgba(255, 255, 255, .12), transparent 45%);
}
.balance .etq { font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; opacity: .75; font-weight: 700; }
.balance .grande { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; }
.balance .cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.balance .cifra { background: rgba(255, 255, 255, .1); border-radius: 13px; padding: 12px 14px; min-width: 0; }
.balance .cifra b { display: block; font-size: 1.12rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.balance .cifra .punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
@media (max-width: 700px) {
  .balance { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .balance .cifras { gap: 8px; }
  .balance .cifra { padding: 9px 8px; }
  .balance .cifra .etq { font-size: .62rem; letter-spacing: .05em; white-space: nowrap; }
  .balance .cifra .punto { width: 6px; height: 6px; margin-right: 4px; }
  .balance .cifra b { font-size: clamp(.74rem, 3.6vw, .95rem); text-overflow: clip; letter-spacing: -.01em; }
}
.accesos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.acceso {
  display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--superficie);
  border: 1px solid var(--borde); font-weight: 700; font-size: .84rem; color: var(--texto); text-align: center;
}
.acceso:hover { text-decoration: none; border-color: var(--tinta); }
.acceso .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.acceso .ico svg { width: 21px; height: 21px; }
.acceso.i .ico { background: var(--ingreso-suave); color: var(--ingreso); }
.acceso.g .ico { background: var(--gasto-suave); color: var(--gasto); }
.acceso.m .ico { background: var(--oro-suave); color: var(--oro); }
.acceso.t .ico { background: var(--tinta-suave); color: var(--tinta); }

.consejos { display: grid; gap: 8px; }
.consejo { position: relative; padding: 11px 13px 11px 30px; border-radius: 11px; font-size: .9rem; background: var(--info-suave); color: var(--texto); }
.consejo::before { content: ""; position: absolute; left: 13px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--info); }
.consejo.alerta { background: var(--alerta-suave); } .consejo.alerta::before { background: var(--alerta); }
.consejo.error { background: var(--gasto-suave); } .consejo.error::before { background: var(--gasto); }
.consejo.ok { background: var(--ingreso-suave); } .consejo.ok::before { background: var(--ingreso); }

/* donut */
.dona-caja { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; }
@media (max-width: 420px) { .dona-caja { grid-template-columns: minmax(0, 1fr); justify-items: center; } }
.dona { width: 150px; height: 150px; border-radius: 50%; position: relative; }
.dona::after { content: ""; position: absolute; inset: 26px; border-radius: 50%; background: var(--superficie); }
.dona .centro { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; font-size: .72rem; color: var(--texto-suave); }
.dona .centro b { color: var(--texto); font-size: .95rem; }
.leyenda { display: grid; gap: 7px; width: 100%; min-width: 0; }
.leyenda a { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; color: var(--texto); font-size: .88rem; }
.leyenda a:hover { text-decoration: none; color: var(--tinta); }
.leyenda .sw { width: 10px; height: 10px; border-radius: 3px; }
.leyenda .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* barras 6 meses */
.barras { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; height: 170px; padding-top: 8px; }
.barras .col { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 6px; }
.barras .par { display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 100%; }
.barras .b { width: min(16px, 40%); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.barras .b.i { background: var(--ingreso); } .barras .b.g { background: var(--gasto); }
.barras .mes { text-align: center; font-size: .74rem; color: var(--texto-suave); text-transform: capitalize; }
.barras .col.actual .mes { color: var(--texto); font-weight: 700; }
.leyenda-mini { display: flex; gap: 14px; font-size: .78rem; color: var(--texto-suave); }
.leyenda-mini i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

/* barra de progreso */
.progreso { height: 9px; border-radius: 999px; background: var(--superficie-2); overflow: hidden; position: relative; }
.progreso > span { display: block; height: 100%; border-radius: inherit; background: var(--oro); }
.progreso.ok > span { background: var(--ingreso); }
.progreso.alerta > span { background: var(--alerta); }
.progreso.excedido > span { background: var(--gasto); }
.progreso .marca-esperado { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--texto); opacity: .5; }

/* listas */
.lista { display: grid; }
.fila { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--borde); color: var(--texto); }
.lista > .fila:first-child { border-top: 0; }
a.fila:hover { text-decoration: none; background: var(--superficie-2); margin: 0 -10px; padding-inline: 10px; border-radius: 10px; }
.fila .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--superficie-2); font-size: 1.1rem; }
.fila .ico.i { background: var(--ingreso-suave); } .fila .ico.g { background: var(--gasto-suave); } .fila .ico.t { background: var(--tinta-suave); }
.fila .txt { min-width: 0; }
.fila .txt b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila .txt small { color: var(--texto-suave); font-size: .8rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila .monto { font-weight: 750; text-align: right; }
.dia-cab { display: flex; justify-content: space-between; padding: 14px 0 4px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); }

/* propósitos */
.prop { display: grid; gap: 10px; color: var(--texto); }
a.prop:hover { text-decoration: none; }
.prop-cab { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.prop-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--oro-suave); display: grid; place-items: center; font-size: 1.4rem; }
.prop-cab b { display: block; font-size: 1rem; overflow-wrap: anywhere; line-height: 1.25; }
.prop-cifras { display: flex; justify-content: space-between; font-size: .86rem; gap: 10px; flex-wrap: wrap; }
.prop-msg { font-size: .86rem; color: var(--texto-suave); }
.tarjetas-prop { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tarjetas-prop .tarjeta:hover { border-color: var(--oro); }
.grupo-plazo { display: grid; gap: 12px; }
.grupo-plazo > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 2px solid var(--borde); padding-bottom: 6px; }
.grupo-plazo > header h2 span { color: var(--texto-suave); font-weight: 500; font-size: .86rem; margin-left: 6px; }

.resumen-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; }
.cifra-caja { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px 16px; min-width: 0; }
.cifra-caja .etq { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-suave); font-weight: 700; }
.cifra-caja b { display: block; font-size: 1.25rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.cifra-caja small { color: var(--texto-suave); font-size: .8rem; }

.hero-prop { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.anillo { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.anillo::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--superficie); }
.anillo span { position: relative; z-index: 1; font-size: 1.6rem; font-weight: 800; text-align: center; line-height: 1.1; }
.anillo span small { display: block; font-size: .7rem; font-weight: 600; color: var(--texto-suave); }
@media (max-width: 520px) { .hero-prop { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } }

.grafica-avance { width: 100%; height: auto; display: block; }
.grafica-avance text { fill: var(--texto-suave); font-size: 11px; font-family: inherit; }

/* tabla */
.tabla-caja { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--texto-suave); padding: 8px 10px; border-bottom: 1px solid var(--borde); }
td { padding: 10px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
td.der, th.der { text-align: right; }

/* ---------- formularios ---------- */
.formulario { display: grid; gap: 16px; }
.campo { display: grid; gap: 6px; min-width: 0; }
.campo > label { font-weight: 700; font-size: .88rem; }
.campo .ayuda { font-size: .8rem; color: var(--texto-suave); }
.campo .error { font-size: .82rem; color: var(--gasto); font-weight: 600; }
.campos-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--texto); background: var(--superficie); border: 1px solid var(--borde);
  border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--tinta); outline-offset: 1px; border-color: transparent; }
.campo-icono { max-width: 72px; text-align: center; font-size: 1.3rem !important; }
.monto-grande { display: flex; align-items: center; gap: 6px; border-bottom: 2px solid var(--borde); padding-bottom: 4px; }
.monto-grande span { font-size: 2rem; font-weight: 800; color: var(--texto-suave); }
.monto-grande input { border: 0 !important; outline: 0 !important; background: transparent; font-size: clamp(2rem, 7vw, 2.6rem); font-weight: 800; padding: 0; min-height: 0; font-variant-numeric: tabular-nums; }
.tipo-mov { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--superficie-2); border-radius: 12px; padding: 4px; }
.tipo-mov label { text-align: center; padding: 9px 4px; border-radius: 9px; font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--texto-suave); }
.tipo-mov input { position: absolute; opacity: 0; pointer-events: none; }
.tipo-mov label:has(input:checked) { background: var(--superficie); color: var(--texto); box-shadow: var(--sombra); }
.tipo-mov label.t-INGRESO:has(input:checked) { color: var(--ingreso); }
.tipo-mov label.t-GASTO:has(input:checked) { color: var(--gasto); }
.tipo-mov label.t-TRANSFERENCIA:has(input:checked) { color: var(--tinta); }
.cats-rapidas { display: flex; flex-wrap: wrap; gap: 6px; }
.cats-rapidas button { font: inherit; font-size: .84rem; font-weight: 600; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--borde); background: var(--superficie); color: var(--texto); cursor: pointer; }
.cats-rapidas button.sel { border-color: var(--tinta); background: var(--tinta-suave); color: var(--tinta); }
.plazos { display: flex; flex-wrap: wrap; gap: 6px; }
.plazos label { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--borde); font-weight: 600; font-size: .86rem; cursor: pointer; }
.plazos input { position: absolute; opacity: 0; pointer-events: none; }
.plazos label:has(input:checked) { background: var(--oro-suave); border-color: var(--oro); color: var(--texto); }
.calculo-vivo { padding: 12px 14px; border-radius: 12px; background: var(--oro-suave); font-size: .92rem; }
.filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filtros select, .filtros input { width: auto; min-height: 38px; padding: 7px 10px; font-size: .88rem; }
.filtros input[type=search] { flex: 1 1 160px; }
.formulario-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.formulario-inline input { width: 130px; min-height: 36px; padding: 6px 10px; }
.reparto-fila { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--borde); }
.reparto-fila input { text-align: right; font-weight: 700; }
@media (max-width: 520px) { .reparto-fila { grid-template-columns: minmax(0, 1fr); } }

/* login */
.pantalla-entrar { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.caja-entrar { width: min(400px, 100%); display: grid; gap: 20px; }
.caja-entrar .marca { justify-content: center; padding: 0; }
@media (max-width: 520px) {
  .resumen-cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resumen-cifras > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.separador-o { display: flex; align-items: center; gap: 10px; color: var(--texto-suave); font-size: .82rem; }
.separador-o::before, .separador-o::after { content: ""; flex: 1; height: 1px; background: var(--borde); }
.boton-ms svg { width: 18px; height: 18px; }

/* Tu plan del mes (tablero) */
.plan-cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-cifra { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--borde); border-radius: 13px; min-width: 0; }
.plan-cifra .etq { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; opacity: .75; }
.plan-cifra b { font-size: 1.3rem; overflow-wrap: anywhere; }
.plan-cifra.ahorro { border-color: #f0bd4f; }
.plan-cifra .rojo { color: #e5484d; }
@media (max-width: 640px) { .plan-cifras { grid-template-columns: 1fr; } }
