:root {
  --fondo: #141416;
  --caja: #222226;
  --capa: #2b2b30;
  --capa2: #34343a;
  --capa3: #3e3e45;
  --tecla: var(--capa2);
  --linea: #2f2f35;
  --linea2: #44444b;
  --rotulo: #8e8e93;
  --verde: #30d158;
  --sobre-verde: #00150a;
  --azul: #0a84ff;
  --ambar: #ffd60a;
  --tono: var(--verde);
  --sobre-rojo: #1c0303;
  --tx: #f5f5f7;
  --tx2: #aeaeb2;
  --tx3: #8e8e93;
  --rojo: #ff453a;
  --ac: #f5f5f7;
  --sobre-ac: #000;
  --letra: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
  --radio: 20px;
  --lado: 16px;
  --barra: 62px;
  --abajo: env(safe-area-inset-bottom, 0px);
  --arriba: env(safe-area-inset-top, 0px);
  --ancho: 520px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--fondo); -webkit-text-size-adjust: 100%; }
html[data-tab=quincenas] { --tono: var(--azul); }
html[data-tab=metas] { --tono: var(--ambar); }
html[data-tab=movs] { --tono: var(--rojo); }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--tx);
  font: 400 17px/1.35 var(--letra);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.con-hoja { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; opacity: .35; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }
[hidden] { display: none !important; }

.mono, .caja > .sec-cab h2, .dia-cab, .aj h4 {
  font-weight: 600; font-size: 12px; line-height: 1.3;
  letter-spacing: .05em; text-transform: uppercase; color: var(--rotulo);
}

#vista {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 var(--lado) calc(var(--barra) + var(--abajo) + 44px);
  animation: entrar .22s ease-out;
}
#vista.sin-barra { padding-bottom: calc(var(--abajo) + 24px); }
@keyframes entrar { from { opacity: 0; transform: translateY(6px); } }

.cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding-top: calc(var(--arriba) + 10px);
  padding-bottom: 4px;
}
.cab h1 { font-size: 34px; font-weight: 700; line-height: 1.1; }
.icono {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 20px;
  background: var(--capa2);
  color: var(--tx2);
  transition: background .12s;
}
.icono svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icono:active { background: var(--capa3); }

.cab .texto, .hoja-cab .texto {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 16px;
  border-radius: 19px;
  background: var(--capa2);
  color: var(--tx);
  font-size: 15px; font-weight: 600;
  white-space: nowrap;
}
.cab .texto:active, .hoja-cab .texto:active { background: var(--capa3); }
.agregar::before { content: '+'; font-size: 20px; font-weight: 400; line-height: 0; margin-top: -2px; color: var(--ac); }

section { margin-top: 14px; }
.sec-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 22px; }
.sec-cab h2 { font-size: 20px; font-weight: 700; }
.sec-cab span { font-size: 15px; color: var(--tx3); font-variant-numeric: tabular-nums; }
.texto { color: var(--ac); font-size: 15px; font-weight: 600; padding: 8px 0; }
.peligro { color: var(--rojo); }
.lead { font-size: 15px; line-height: 1.45; color: var(--tx2); margin-top: 6px; }
.lead b { color: var(--tx); font-weight: 600; font-variant-numeric: tabular-nums; }
.vacio { color: var(--tx3); font-size: 15px; padding: 14px 0; }

.caja {
  background: var(--caja);
  border: 1px solid transparent;
  border-radius: var(--radio);
  overflow: hidden;
}
.caja > .sec-cab {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border-bottom: 1px solid var(--linea);
}
.caja > .sec-cab span { font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; color: var(--rotulo); }
.caja > .sec-cab .texto { font-size: 15px; padding: 10px 0; }
.caja .fila { padding-inline: 18px; }
.caja .fila:last-child { border-bottom: 0; }
.caja .vacio { padding: 16px 18px; }
.caja .vacio .texto { padding: 0 0 0 4px; }

.cifra { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.cifra .sig { font-size: .5em; font-weight: 500; vertical-align: .7em; margin-right: .06em; opacity: .6; letter-spacing: 0; }
.cifra .menos { margin-right: .04em; }

.es-ejemplo {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 4px;
  padding: 4px 6px 4px 16px;
  font-size: 15px; color: var(--tx2);
  background: var(--caja);
  border: 1px solid transparent;
  border-radius: 16px;
}
.es-ejemplo .texto { font-size: 15px; padding: 10px; }

.cuenta { margin-top: 12px; }
.rotulo { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 500; color: var(--tx2); }

.puedo {
  position: relative;
  padding: 18px 20px 20px;
  border-radius: 26px;
  --sobre-ac: var(--sobre-verde);
  color: var(--sobre-ac);
  background: var(--verde);
}
.puedo .rotulo { justify-content: space-between; font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; color: inherit; opacity: .68; }
.enorme {
  display: block;
  margin-top: 14px;
  font-size: min(72px, calc((min(100vw, var(--ancho)) - 2 * var(--lado) - 40px) / (var(--n, 9) * .56 + .5)));
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: .95;
}
.ritmo { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin-top: 14px; font-size: 15px; color: inherit; font-variant-numeric: tabular-nums; }
.ritmo > span { color: color-mix(in srgb, var(--sobre-ac) 74%, transparent); }
.ritmo b { font-weight: 600; color: var(--sobre-ac); }
.en-rojo .ritmo { opacity: .85; }
.dias { display: grid; grid-template-columns: repeat(var(--d), 1fr); gap: 4px; margin-top: 18px; }
.dias span { display: grid; gap: 5px; justify-items: center; }
.dias i { position: relative; width: 100%; height: 30px; overflow: hidden; border-radius: 6px; background: color-mix(in srgb, var(--sobre-ac) 13%, transparent); }
.dias .hoy i { box-shadow: inset 0 0 0 2px var(--sobre-ac); background: color-mix(in srgb, var(--sobre-ac) 8%, transparent); }
.dias i b { position: absolute; left: 0; right: 0; bottom: 0; background: var(--sobre-ac); transition: height .5s cubic-bezier(.2,.8,.2,1); }
.dias .pasado b { background: var(--sobre-rojo); }
.dias em { font-style: normal; font-size: 11px; font-weight: 600; line-height: 1; color: color-mix(in srgb, var(--sobre-ac) 62%, transparent); }
.dias .hoy em { color: var(--sobre-ac); }
.dias em::after { content: ''; display: block; width: 4px; height: 4px; margin: 4px auto 0; border-radius: 2px; }
.dias .vence em::after { background: var(--sobre-ac); }
.dias + .ritmo { margin-top: 12px; }
.puedo.en-rojo { --sobre-ac: var(--sobre-rojo); color: var(--sobre-ac); background: var(--rojo); }

.pieza { border-radius: 26px; overflow: hidden; background: var(--caja); }
.pieza .puedo { border-radius: 0; }
.hero {
  margin-top: 12px;
  padding: 18px 20px 20px;
  border-radius: 26px;
  --sobre-ac: var(--tx);
  background: var(--caja);
  animation: entrar .3s ease-out;
}
.hero .rotulo { justify-content: space-between; font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; color: var(--rotulo); }
.hero .rotulo > span:first-child::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 3px; vertical-align: .02em; background: var(--tono); }
.hero .ritmo { margin-top: 14px; }
.hv { display: grid; gap: 9px; margin-top: 16px; }
.hv-fila { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.hv-k { font-size: 12px; font-weight: 700; color: var(--tx3); }
.hv-pista { position: relative; height: 12px; border-radius: 4px; background: var(--capa2); }
.hv-pista i { display: block; height: 100%; min-width: 4px; border-radius: 4px; background: var(--tono); transform-origin: left; animation: crecer .6s cubic-bezier(.2, .8, .2, 1) backwards; }
.hv-pista::after { content: ''; position: absolute; top: -5px; bottom: -5px; left: var(--p, -10px); border-left: 1.5px dashed var(--tx); }
.hv-v { min-width: 92px; text-align: right; font-size: 15px; font-weight: 600; }
.hv-v.verde { color: var(--verde); }
.hv-v.rojo { color: var(--rojo); }
.hv-mov .hv-fila { grid-template-columns: 44px minmax(0, 1fr) auto; }
.hv-mov .hv-pista::after { display: none; }
.hv-mov .hv-k { font-size: 13px; font-weight: 600; color: var(--tx2); }
.hm { display: flex; gap: 3px; height: 12px; margin-top: 16px; }
.hm span { position: relative; overflow: hidden; border-radius: 4px; background: var(--capa2); }
.hm span i { position: absolute; inset: 0 auto 0 0; background: var(--tono); border-radius: 4px; transform-origin: left; animation: crecer .6s cubic-bezier(.2, .8, .2, 1) backwards; }
.de-donde { padding-bottom: 6px; }
.tengo { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 16px 18px 2px; font-size: 15px; color: var(--tx2); text-align: left; }
.tengo > span:first-child { flex: 1; }
.tengo .grande { font-weight: 600; color: var(--tx); font-variant-numeric: tabular-nums; }
.tengo .cifra .sig { font-size: inherit; vertical-align: baseline; opacity: 1; margin: 0; font-weight: inherit; }
.tengo:active { background: var(--capa); }
.barra-tengo { display: flex; gap: 3px; height: 10px; margin: 12px 18px 8px; }
.barra-tengo i { min-width: 4px; border-radius: 3px; }
.s-libre { background: var(--verde); }
.s-pagar { background: var(--tx); }
.s-metas { background: var(--ambar); }
.s-guardar { background: var(--azul); }
.s-falta { background: var(--rojo); }
.s-colchon { background: color-mix(in srgb, var(--verde) 38%, var(--capa2)); }
.pt { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 10px; vertical-align: .02em; }
.s-fijos { background: var(--tx); }
.s-dia { background: var(--tx3); }
.s-ahorro { background: var(--verde); }
.s-demas { background: var(--rojo); }
.s-queda { background: transparent; box-shadow: inset 0 0 0 1.5px var(--linea2); }
.verde { color: var(--verde); }

.mm-graf { display: flex; gap: 10px; height: 176px; padding: 6px 18px 0; }
.mm-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mm-zona { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; padding-top: 22px; }
.mm-tasa { flex: none; font-size: 12px; font-weight: 600; line-height: 1; color: var(--tx3); font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .2s; }
.mm-pila { flex: none; display: flex; flex-direction: column-reverse; gap: 2px; width: 100%; max-width: 40px; min-height: 4px; border-radius: 7px 7px 3px 3px; overflow: hidden; transition: opacity .25s; }
.mm-pila i { flex-basis: 0; min-height: 2px; }
.mm-pila .s-queda { border-radius: 7px 7px 2px 2px; }
.mm-mes { font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .05em; text-transform: uppercase; color: var(--tx3); padding-bottom: 2px; transition: color .2s; }
.mm-mes::after { content: ""; display: block; width: 18px; height: 2px; margin: 6px auto 0; border-radius: 1px; background: transparent; transition: background .2s; }
.mm-col[aria-pressed=true] .mm-mes::after { background: var(--tx); }
.mm-col[aria-pressed=true] .mm-mes, .mm-col[aria-pressed=true] .mm-tasa { color: var(--tx); }
.mm-col[aria-pressed=true] .mm-tasa.neg { color: var(--rojo); }
.mm-det { margin-top: 16px; border-top: 1px solid var(--linea); }
.mm-rot { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px 0; font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; color: var(--rotulo); font-variant-numeric: tabular-nums; }
.mm-rot span:first-child { color: var(--tx); }
.eq { border-top: 1px solid var(--linea); }
.eq-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.eq-cab > span:first-child { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--rotulo); }
.eq-cab .sube, .eq-nom .sube, .eq-cosas .sube { color: var(--rojo); }
.eq-cab .baja, .eq-nom .baja, .eq-cosas .baja { color: var(--verde); }
.eq-filas { padding: 2px 0 8px; }
.eq-linea { display: grid; grid-template-columns: 98px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px 18px; }
button.eq-linea:active { background: var(--capa); }
.eq-nom { min-width: 0; overflow: hidden; font-size: 15px; white-space: nowrap; text-overflow: ellipsis; }
.eq-nom em { margin-left: 5px; font-style: normal; font-size: 13px; font-weight: 700; }
.eq-pista { display: block; height: 10px; }
.eq-barra { display: flex; gap: 2px; height: 100%; min-width: 4px; border-radius: 3px; overflow: hidden; transform-origin: left; }
.eq-barra b { flex-basis: 0; min-width: 2px; }
.eq-v { min-width: 86px; font-size: 15px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eq.anima .eq-barra { animation: crecer .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 45ms); }
@keyframes crecer { from { transform: scaleX(0); } }
.eq-cosas { margin: 0; padding: 2px 18px 10px 28px; list-style: none; animation: abrir .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes abrir { from { opacity: 0; transform: translateY(-5px); } }
.eq-cosas li { display: flex; align-items: baseline; gap: 12px; padding: 5px 0; font-size: 14px; color: var(--tx2); }
.eq-cosas li.sube, .eq-cosas li.baja { font-size: 13px; font-weight: 600; }
.eq-cn { flex: 1; min-width: 0; }
.eq-cn small { margin-left: 8px; font-size: 13px; color: var(--tx3); }
.eq-cv { font-variant-numeric: tabular-nums; color: var(--tx); }
.eq-cosas .eq-resto { font-size: 13px; color: var(--tx3); }
.eq-mas { display: block; width: 100%; padding: 6px 18px 16px; text-align: left; }

.tengo > span:first-child::after, button.dato .dato-rot::after {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 7px; vertical-align: .12em;
  border-right: 1.6px solid var(--tx3); border-top: 1.6px solid var(--tx3); transform: rotate(45deg);
}
button.dato .dato-rot::after { width: 5px; height: 5px; margin-left: 5px; vertical-align: .1em; }

.datos { display: grid; grid-template-columns: repeat(var(--c, 3), minmax(0, 1fr)); gap: 14px 16px; padding: 12px 18px 16px; }
.dato { display: grid; gap: 4px; min-width: 0; text-align: left; }
.dato-rot { display: flex; align-items: center; font-size: 13px; line-height: 1.2; color: var(--tx3); white-space: nowrap; }
.dato-rot .pt { margin-right: 6px; }
.dato-v { font-size: 16px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dato.verde .dato-v { color: var(--verde); }
.dato.rojo .dato-v { color: var(--rojo); }
button.dato:active { opacity: .6; }

.cuadritos { display: grid; grid-template-rows: repeat(5, auto); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; margin: 14px 18px 2px; }
.cuadritos i { aspect-ratio: 1; border-radius: 3px; }
.cuadritos.entra i { animation: cuadro .45s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 4ms); }
@keyframes cuadro { from { opacity: 0; transform: scale(.3); } }

.llego {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: var(--radio);
  border: 1px solid color-mix(in srgb, var(--verde) 55%, transparent);
  background: color-mix(in srgb, var(--verde) 8%, var(--caja));
}
.llego p { font-size: 15px; color: var(--tx2); }
.llego p b { color: var(--tx); font-weight: 600; display: block; font-size: 17px; }

#curso { height: 170px; margin: 8px 14px 0; touch-action: pan-y; }
#curso svg { width: 100%; height: 100%; overflow: visible; }
.c-real { fill: none; stroke: var(--verde); stroke-width: 2.25; stroke-linejoin: round; }
.c-area { fill: color-mix(in oklab, var(--verde) 16%, transparent); }
.c-plan { fill: none; stroke: var(--verde); stroke-width: 2; stroke-dasharray: 3 4; stroke-linejoin: round; opacity: .85; }
.c-base { stroke: var(--linea2); stroke-width: 1; }
.c-cero { stroke: var(--rojo); stroke-width: 1; stroke-dasharray: 2 3; }
.c-colchon { stroke: var(--tx3); stroke-width: 1; stroke-dasharray: 5 4; }
.bajo .c-plan { stroke: var(--rojo); }
.bajo .c-fin { fill: var(--rojo); }
.c-hoy { stroke: var(--tx3); stroke-width: 1; stroke-dasharray: 2 3; }
.c-punto { fill: var(--caja); stroke: var(--verde); stroke-width: 2.25; transition: r .15s; }
.c-punto.sel { fill: var(--verde); }
.c-toque { fill: transparent; cursor: pointer; }
.c-txt { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; fill: var(--tx3); }
.c-etq { font-size: 12px; font-weight: 600; fill: var(--tx); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--caja); stroke-width: 4px; stroke-linejoin: round; }
.pagar .fila.fijo { transition: background .2s; }
.pagar .fila.fijo.sel { background: var(--capa); }
.c-fin { font-size: 13px; font-weight: 600; fill: var(--verde); font-variant-numeric: tabular-nums; }

.fila {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 10px 0;
  border-bottom: 1px solid var(--linea);
}
.fila.fijo { grid-template-columns: 26px 1fr auto; }
.fila .cuerpo { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nom { font-size: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.det { font-size: 13px; color: var(--tx3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila .cuerpo .det { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.det.tarde { color: var(--rojo); }
.monto { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fila.mov.entra .monto { color: var(--verde); }
.fila.mov:not(.entra):not(.neutro) .monto { color: var(--rojo); }
.fila.mov.neutro .monto { color: var(--tx2); }
.fila.hecho .nom, .fila.hecho .monto { color: var(--tx3); }
.fila.hecho .monto { text-decoration: line-through; text-decoration-color: var(--tx3); }
button.fila:active, .fila .cuerpo:active { opacity: .6; }
.fila.saliendo {
  height: 0 !important; min-height: 0; padding-block: 0; opacity: 0; border-color: transparent; overflow: hidden;
  transition: height .3s cubic-bezier(.4,0,.2,1), padding .3s, opacity .18s, min-height .3s;
}

.casilla {
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 1.5px solid #5a5a5e;
  display: grid; place-items: center;
  transition: background .18s, border-color .18s;
}
.casilla svg { width: 17px; height: 17px; fill: none; stroke: var(--sobre-ac); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .25s .05s ease-out; }
.casilla[aria-checked=true] { background: var(--ac); border-color: var(--ac); }
.casilla[aria-checked=true] svg { stroke-dashoffset: 0; }
.fila.hecho .casilla[aria-checked=true] { background: #34332f; border-color: #34332f; }
.fila.hecho .casilla svg { stroke: var(--tx); }

.dia-cab {
  display: flex; justify-content: space-between;
  padding: 16px 18px 8px;
  border-bottom: 1px solid var(--linea);
  font-variant-numeric: tabular-nums;
}
.caja > .dia-cab:first-of-type { padding-top: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 38px; padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 19px;
  background: var(--capa2);
  font-size: 15px; font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip[aria-pressed=true] { background: var(--tx); color: #000; }
.chip.lleno { background: var(--ac); color: var(--sobre-ac); font-weight: 600; }
.chip:active { opacity: .7; }

.boton {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 52px;
  border-radius: 16px;
  background: var(--ac); color: var(--sobre-ac);
  font-size: 17px; font-weight: 600; text-align: center;
  transition: transform .1s, opacity .1s;
}
.boton.suave { background: var(--capa2); color: var(--tx); font-weight: 600; }
.boton:active { transform: scale(.985); opacity: .9; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.boton.chico { width: auto; height: 44px; padding: 0 18px; border-radius: 14px; font-size: 15px; }

.rojo { color: var(--rojo); }
.lead .rojo { color: var(--rojo); }
.quin { margin-top: 14px; }
.quin-total { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 18px 0; }
.quin-total > span:first-child { padding-top: 5px; font-size: 15px; font-weight: 600; color: var(--tx2); }
.quin-total .v { display: flex; flex-direction: column; align-items: flex-end; }
.quin-total b { font-size: 26px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; color: var(--verde); font-variant-numeric: tabular-nums lining-nums; }
.quin-total small { font-size: 13px; color: var(--tx3); font-variant-numeric: tabular-nums; }
.quin-total.rojo > span:first-child, .quin-total.rojo b { color: var(--rojo); }
.quin .datos { border-bottom: 1px solid var(--linea); }
.tipo .datos { border-bottom: 1px solid var(--linea); }
.fila.aparte .nom, .fila.aparte .monto { color: var(--tx3); }
.tipo .qn-pie { border-top: 1px solid var(--linea); }
.hoja-rango { margin: -4px 2px 12px; }
.panel .quin { margin-top: 0; }

.qn { display: flex; gap: 4px; height: 168px; padding: 14px 14px 0; }
.qn-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.qn-zona { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; padding-top: 16px; }
.qn-zona::after { content: ''; position: absolute; left: -2px; right: -2px; bottom: var(--n); border-top: 1.5px dashed var(--tx3); opacity: .7; pointer-events: none; }
.qn-zona i { flex: none; width: 100%; max-width: 22px; min-height: 3px; border-radius: 5px 5px 2px 2px; transform-origin: bottom; animation: sube .55s cubic-bezier(.2, .8, .2, 1) backwards; }
.qn-col:nth-child(2) i { animation-delay: 30ms; } .qn-col:nth-child(3) i { animation-delay: 60ms; } .qn-col:nth-child(4) i { animation-delay: 90ms; }
.qn-col:nth-child(5) i { animation-delay: 120ms; } .qn-col:nth-child(6) i { animation-delay: 150ms; } .qn-col:nth-child(7) i { animation-delay: 180ms; }
.qn-col:nth-child(8) i { animation-delay: 210ms; } .qn-col:nth-child(9) i { animation-delay: 240ms; } .qn-col:nth-child(10) i { animation-delay: 270ms; }
.qn-col:nth-child(11) i { animation-delay: 300ms; } .qn-col:nth-child(12) i { animation-delay: 330ms; }
@keyframes sube { from { transform: scaleY(0); } }
.qn-col.actual i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--verde); }
.qn-v { flex: none; font-size: 10px; font-weight: 600; line-height: 1; color: var(--tx2); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.02em; }
.qn-v.rojo { color: var(--rojo); }
.qn-dia { display: grid; justify-items: center; gap: 1px; padding-bottom: 2px; font-size: 12px; font-weight: 600; line-height: 1; color: var(--tx); font-variant-numeric: tabular-nums; }
.qn-dia small { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--tx3); }
.qn-col:active .qn-zona i { opacity: .7; }
.caja > .sec-cab .qn-ley { display: inline-flex; align-items: center; gap: 6px; }
.qn-ley i { width: 14px; border-top: 1.5px dashed var(--tx3); }
.qn-pie { padding: 12px 18px 16px; font-size: 13px; color: var(--tx3); }

.lado { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.lado .det { font-variant-numeric: tabular-nums; }
.monto .aprox { color: var(--tx3); font-weight: 400; margin-right: 3px; }
.fila.fijo.estimado .monto { color: var(--tx2); }
.fila .chip { height: 34px; padding: 0 14px; font-size: 15px; }


.meta { padding: 18px 18px 18px; }
.meta-cab { display: block; width: 100%; }
.meta-cab h2 { font-size: 22px; font-weight: 700; line-height: 1.1; }
.meta-cab span { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; color: var(--tx3); }
.meta-cifras { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; }
.meta-cifras .ya { font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.meta-cifras .de { color: var(--tx2); font-size: 15px; font-variant-numeric: tabular-nums; }
.escalones { width: 100%; height: 84px; margin-top: 16px; }
.esc { fill: var(--capa2); }
.esc.hoy { stroke: var(--tx); stroke-width: 1.5; }
.lleno { fill: var(--ambar); }
.meta-pie { margin-top: 12px; font-size: 15px; color: var(--tx2); }
.meta-pie b { color: var(--tx); font-weight: 600; }
.hechas .fila { min-height: 54px; }

.mes-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.mes-nav h2 { font-size: 20px; font-weight: 700; line-height: 1.1; }
.cal-caja { margin-top: 14px; padding: 14px 12px 12px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal .sem { text-align: center; font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .04em; color: var(--tx3); padding: 2px 0 6px; }
.cal .dia {
  position: relative;
  aspect-ratio: 1 / 1.08;
  border-radius: 10px;
  padding: 6px 6px 5px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: color-mix(in srgb, var(--rojo) calc(var(--p, 0) * .7%), var(--capa2));
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.cal .dia .n { font-size: 13px; font-weight: 600; }
.cal .dia .g { font-size: 11px; font-weight: 500; opacity: .82; white-space: nowrap; overflow: hidden; }
.cal .dia.oscuro { color: var(--sobre-rojo); }
.cal .dia.entra { box-shadow: inset 0 0 0 1.5px var(--verde); }
.cal .dia.entra .g { color: var(--verde); opacity: 1; font-weight: 600; }
.cal .dia:disabled { opacity: 1; }
.cal .dia.futuro { background: transparent; box-shadow: inset 0 0 0 1px var(--linea); color: var(--tx3); }
.cal .dia.vence { box-shadow: inset 0 0 0 1.5px var(--linea2); }
.cal .dia.vence .g { color: var(--tx2); opacity: 1; }
.cal .dia.hoy { box-shadow: inset 0 0 0 2px var(--tx); }
.cal .dia.sel { box-shadow: inset 0 0 0 2px var(--tx), 0 0 0 2px var(--caja), 0 0 0 4px var(--ac); }
.cal .vacio-dia { aspect-ratio: 1 / 1.08; }


#barra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 0 8px max(8px, calc(var(--abajo) - 12px));
  pointer-events: none;
}
#barra .in {
  position: relative;
  pointer-events: auto;
  max-width: 480px; height: var(--barra);
  margin: 0 auto;
  padding: 0 4px;
  display: grid; grid-template-columns: 1fr 1fr 56px 1fr 1fr; align-items: center;
  background: rgba(38, 38, 43, .95);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 31px;
}
#barra .marca {
  position: absolute; top: 50%; left: 0;
  width: var(--w, 0); height: 52px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--tono) 22%, transparent);
  transform: translate(var(--x, 0), -50%);
  transition: transform .5s cubic-bezier(.3, 1.3, .5, 1), width .5s cubic-bezier(.3, 1.3, .5, 1), background-color .4s;
  pointer-events: none;
}
#barra .marca.quieta { transition: none; }
#barra button {
  position: relative;
  height: 52px;
  border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; letter-spacing: -.01em; color: var(--tx3);
  transition: color .25s;
}
#barra button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#barra button[aria-current] { color: var(--tono); }
#barra button[aria-current] svg { animation: salta .55s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes salta {
  0% { transform: none; }
  30% { transform: scale(.8) translateY(1px); }
  65% { transform: scale(1.14) translateY(-2px); }
  100% { transform: none; }
}
#barra button:not(.anotar):active svg { transform: scale(.88); transition: transform .1s; }
#barra .anotar { position: relative; }
#barra .mas { width: 50px; height: 50px; border-radius: 25px; background: var(--ac); display: grid; place-items: center; transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
#barra .mas svg { width: 24px; height: 24px; stroke: var(--sobre-ac); stroke-width: 2.4; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
#barra .anotar > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#barra .anotar:active .mas { transform: scale(.9); }
#barra .anotar:active .mas svg { transform: rotate(90deg); }

#hoja { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
#hoja .velo { position: absolute; inset: 0; background: rgba(0,0,0,.7); opacity: 0; transition: opacity .25s; }
#hoja .panel {
  position: relative;
  width: 100%; max-width: var(--ancho);
  max-height: calc(100% - var(--arriba) - 12px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--capa);
  border-top: 1px solid var(--linea2);
  border-radius: 26px 26px 0 0;
  padding: 8px 18px calc(var(--abajo) + 20px);
  transform: translateY(100%);
  transition: transform .34s cubic-bezier(.2,.85,.25,1);
}
#hoja.abierta .velo { opacity: 1; }
#hoja.abierta .panel { transform: none; }
#hoja .panel.alta { height: calc(100% - var(--arriba) - 12px); display: flex; flex-direction: column; }
.tirador { width: 38px; height: 5px; border-radius: 3px; background: #3b3a37; margin: 0 auto 6px; flex: none; }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; flex: none; }
.hoja-cab h3 { font-size: 28px; font-weight: 700; line-height: 1.1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hoja-cab .icono { width: 36px; height: 36px; }
.hoja-cab .icono svg { width: 20px; height: 20px; }
.hoja-pie { margin-top: 22px; display: grid; gap: 10px; }
.hoja-pie .texto { justify-self: center; }
#hoja .caja { margin-top: 14px; background: #101011; }

.campo {
  display: block;
  margin-top: 10px;
  padding: 10px 14px 9px;
  background: var(--capa2);
  border: 1px solid var(--linea2);
  border-radius: 14px;
  transition: border-color .15s;
}
.campo > span { display: block; font-size: 13px; font-weight: 500; color: var(--tx3); margin-bottom: 2px; }
.campo input, .campo select {
  width: 100%; border: 0; outline: 0; padding: 2px 0;
  -webkit-appearance: none; appearance: none; border-radius: 0;
  background: none; color: var(--tx);
  font: 500 20px/1.3 var(--letra);
  font-variant-numeric: tabular-nums;
}
.campo input::placeholder { color: #55544f; }
.campo input[type=date], .campo input[type=month] { min-height: 30px; text-align: left; }
.campo input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.campo:focus-within { border-color: var(--ac); }
form > .campo:first-child, .lead + form > .campo:first-child { margin-top: 12px; }
.fila-chips { margin-top: 18px; }
.fila-chips > span { display: block; font-size: 13px; font-weight: 500; color: var(--tx3); margin-bottom: 8px; }
.fila-chips .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
.fila-chips .chips::-webkit-scrollbar { display: none; }
.fila-chips .nota { margin: 8px 0 0; font-size: 13px; line-height: 1.35; color: var(--tx3); }
.fila-chips .nota:empty { display: none; }

.aj { margin-top: 26px; }
.aj h4 { margin-bottom: 4px; }
.aj p { font-size: 15px; color: var(--tx2); margin: 6px 0 12px; }
.aj .campo { margin-top: 8px; }

.cuentas-lista .fila { min-height: 58px; }
.cuentas-lista .total { border-bottom: 0; background: var(--caja); }
.cuentas-lista .total .nom { font-weight: 600; }
.cuentas-lista .total .monto { font-size: 20px; font-weight: 600; line-height: 1.1; }

.seg { display: flex; flex: 1; padding: 3px; border-radius: 13px; background: var(--capa2); }
.seg button { flex: 1; height: 34px; border-radius: 10px; font-size: 15px; white-space: nowrap; font-weight: 500; color: var(--tx2); text-align: center; }
.seg button[aria-selected=true] { background: #2e2d2a; color: var(--tx); }
.monto-grande {
  flex: none;
  text-align: center;
  padding: 10px 0 10px;
  font-size: min(64px, calc((min(100vw, var(--ancho)) - 40px) / (var(--n, 4) * .56 + 1)));
  font-weight: 600; letter-spacing: -.03em; line-height: 1.05;
  font-variant-numeric: tabular-nums lining-nums;
}
.monto-grande.cero .num { color: var(--tx3); }
.monto-grande .sig { font-size: .48em; vertical-align: .75em; opacity: .55; margin-right: .06em; }
.cursor { display: inline-block; width: 3px; height: .74em; margin-left: 4px; border-radius: 2px; background: var(--ac); vertical-align: -.02em; animation: parpadeo 1.05s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; flex: none; }
.cats button {
  height: 42px; border-radius: 13px;
  background: var(--capa2);
  font-size: 15px; font-weight: 500; text-align: center;
  transition: background .12s, color .12s;
}
.cats button[aria-pressed=true] { background: var(--tx); color: #000; }
.anotar-hoja .fila-chips { margin-top: 12px; flex: none; }
.borrar-mov { align-self: center; margin-top: 10px; flex: none; }
.anotar-hoja .fila-chips > span { margin-bottom: 6px; }
.nota {
  flex: none;
  margin-top: 12px;
  width: 100%; height: 46px;
  -webkit-appearance: none; appearance: none;
  padding: 0 14px;
  border: 1px solid var(--linea2); border-radius: 14px; outline: 0;
  background: var(--capa2); color: var(--tx);
  font: 500 17px var(--letra);
}
.nota:focus { border-color: var(--ac); }
.nota::placeholder { color: #5d5c57; }
.nota-fila { flex: none; display: flex; gap: 8px; margin-top: 12px; }
.nota-fila .nota { flex: 1; min-width: 0; margin-top: 0; }
.pegar {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  height: 46px; padding: 0 14px 0 12px;
  border: 1px solid var(--linea2); border-radius: 14px;
  background: var(--capa2); color: var(--tx);
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.pegar svg { width: 19px; height: 19px; fill: none; stroke: var(--ac); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pegar:active { background: var(--capa3); }
.pegado {
  display: block; width: 100%; margin-top: 16px; min-height: 140px; resize: vertical;
  -webkit-appearance: none; appearance: none;
  padding: 12px 14px;
  border: 1px solid var(--linea2); border-radius: 14px; outline: 0;
  background: var(--capa2); color: var(--tx);
  font: 400 17px/1.4 var(--letra);
}
.pegado:focus { border-color: var(--ac); }
.pegado::placeholder { color: #5d5c57; }
.error { min-height: 20px; margin-top: 6px; font-size: 15px; color: var(--rojo); text-align: center; flex: none; }
.teclado {
  margin-top: auto;
  padding-top: 12px;
  flex: none;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 50px); gap: 7px;
}
.tecla {
  border-radius: 14px; background: var(--tecla);
  font-size: 28px; font-weight: 400; text-align: center;
  font-variant-numeric: tabular-nums;
  display: grid; place-items: center;
  transition: background .08s;
}
.tecla:active { background: #2f2e2b; }
.tecla svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tecla.borrar { grid-column: 4; grid-row: 1; color: var(--tx2); }
.tecla.listo { grid-column: 4; grid-row: 2 / span 3; background: var(--ac); color: var(--sobre-ac); font-size: 17px; font-weight: 600; }
.tecla.mil { grid-column: span 2; }

.pago-color {
  margin-top: 10px;
  padding: 16px 18px 4px;
  border-radius: 22px;
  --sobre-ac: var(--sobre-verde);
  color: var(--sobre-ac);
  background: var(--verde);
}
.pago-color > .mono { color: inherit; opacity: .68; }
.pago-color .quin-total { padding: 12px 0 0; }
.pago-color .barra-tengo { margin: 12px 0 2px; }
.pago-color .s-libre { background: var(--sobre-ac); }
.pago-color .datos { padding: 12px 0 2px; }
.pago-color .dato-rot, .pago-color .dato-v { color: inherit; }
.pago-color .dato-rot { opacity: .72; }
.pago-color .quin-total > span:first-child, .pago-color .quin-total b { color: inherit; }
.pago-color .quin-total b { font-size: 34px; }
.pago-color .quin-total small { color: inherit; opacity: .7; }

.empezar .paso { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--tx3); }
.titulo-grande { margin-top: 18px; font-size: 34px; font-weight: 700; line-height: 1.1; }
.empezar .lead { margin-top: 10px; }
.editables { margin-top: 18px; padding: 0 14px; }
.editables:empty { display: none; }
.editable {
  display: grid; grid-template-columns: 1fr 132px 32px; align-items: center; gap: 10px;
  min-height: 60px; border-bottom: 1px solid var(--linea);
}
.editable:last-child { border-bottom: 0; }
.editable.con-dia { grid-template-columns: 1fr 98px 44px 30px; gap: 8px; }
.editable input {
  width: 100%; min-width: 0; height: 44px;
  border: 0; outline: 0; background: none; color: var(--tx);
  font: 500 17px var(--letra);
  font-variant-numeric: tabular-nums;
}
.editable input::placeholder { color: #4d4c48; }
.editable input.plata, .editable input.dia { text-align: right; }
.editable input:focus { box-shadow: inset 0 -2px var(--ac); }
.editable .etq { font-size: 13px; color: var(--tx3); display: block; text-align: right; margin-bottom: -6px; }
.editable .quitar { width: 32px; height: 32px; display: grid; place-items: center; color: var(--tx3); border-radius: 16px; background: var(--capa2); }
.editable .quitar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.editable .quinc { text-align: right; font-size: 13px; color: var(--tx3); line-height: 1.2; }
.editables .fila { padding-inline: 0; }
.empezar .chips { margin-top: 16px; }
.empezar .pie { margin-top: 30px; display: grid; gap: 14px; }
.empezar .pie .lead { margin: 0; }
.monto-campo { margin-top: 22px; }
.monto-campo input { font: 600 34px/1.1 var(--letra); letter-spacing: -.02em; }

.empezar .lead + .texto { margin-top: 4px; }

.cab-der { display: flex; align-items: center; gap: 8px; }
.nube-estado { font-size: 13px; font-weight: 600; color: var(--tx2); height: 32px; padding: 0 12px; border-radius: 16px; background: var(--capa2); }

.pin-hoja .lead { font-size: 15px; }
.pin-puntos { display: flex; justify-content: center; gap: 16px; height: 16px; margin-top: 34px; }
.pin-puntos i { width: 14px; height: 14px; border-radius: 7px; border: 1.5px solid var(--tx3); transition: background .12s, border-color .12s; }
.pin-puntos i.lleno { background: var(--tx); border-color: var(--tx); }
.pin-hoja .error { margin-top: 14px; }
.pin-teclado { margin-top: 10px; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 56px); }
.pin-teclado .tecla.borrar, .pin-teclado .tecla.listo { grid-column: auto; grid-row: auto; }
.pin-teclado .tecla.listo:disabled { background: var(--tecla); color: var(--tx3); opacity: 1; }

.opciones { margin-top: 14px; }
.opciones .fila svg { width: 20px; height: 20px; fill: none; stroke: var(--tx3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#aviso {
  position: fixed; left: 50%; z-index: 30;
  bottom: calc(var(--barra) + max(8px, calc(var(--abajo) - 12px)) + 12px);
  width: max-content; max-width: calc(100% - 28px);
  display: flex; align-items: center; gap: 18px;
  padding: 13px 16px 13px 18px;
  border-radius: 16px;
  background: var(--tx); color: #000;
  font-size: 15px; font-weight: 500;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: transform .28s cubic-bezier(.2,.85,.25,1), opacity .2s;
}
#aviso.ver { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#aviso button { font-weight: 600; color: #000; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
body.con-hoja #aviso { bottom: calc(var(--abajo) + 16px); }

@media (min-width: 900px) {
  #vista[data-tab=inicio] { --ancho: 1000px; }
  .inicio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .inicio .col-cifras { position: sticky; top: 0; }
  .inicio .col-resto { padding-top: 64px; }
  .inicio .col-resto > section:first-child { margin-top: 16px; }
  #vista[data-tab=inicio] .enorme { font-size: min(88px, calc(420px / (var(--n, 9) * .56 + .5))); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.panel:has([data-tipo=gasto][aria-selected=true]) .monto-grande:not(.cero) .num { color: var(--rojo); }
.panel:has([data-tipo=ingreso][aria-selected=true]) .monto-grande:not(.cero) .num { color: var(--verde); }
