/* ═══════════════════════════════════════════════════════════════════════════
   Cuartico · sistema visual "Esmeralda" (23/09/2026) · entrar, registro y panel.
   (suscripción y admin siguen con app.css)
   Marcos esmeralda profundos, lienzo menta muy suave y naranja solo para la acción.
   Poppins para titulares · Manrope para interfaz y cifras · Caveat para el lema.
   Todo lo que se mueve usa transform/opacity y se apaga con prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════════════ */

.cq {
  /* Esmeralda */
  --e950: #021A13; --e900: #04261C; --e850: #052E22; --e800: #073A2B; --e700: #0A4D38; --e600: #0B5C3F;
  --g500: #178F5D; --g400: #2FAE74; --g300: #5BCF95; --mint: #5BE3A6;
  --mint-200: #BDEFD6; --mint-100: #DDF6EA; --mint-50: #EFFAF4;
  /* Naranja de acción */
  --o700: #A84708; --o600: #E06A0B; --o500: #F5821F; --o400: #FF9D42; --o300: #FFBE7A; --o100: #FFEEDD; --o50: #FFF7EF;
  /* Estados */
  --r600: #B8321F; --r500: #E0533F; --r100: #FDE9E5;
  --a600: #8F5A00; --a500: #F2A516; --a100: #FFF3D6;
  /* Neutros (claro) */
  --bg: #F2F5F3; --bg-2: #E9EFEB; --surface: #FFFFFF; --surface-2: #F6F9F7; --surface-3: #EEF4F0;
  --line: rgba(4, 42, 31, .08); --line-2: rgba(4, 42, 31, .14);
  --text: #0A2219; --text-2: #3A5147; --text-3: #56695F;
  --pos: #11804F; --neg: #0A2219;
  --sh-1: 0 1px 1px rgba(4, 42, 31, .04), 0 2px 8px -3px rgba(4, 42, 31, .08);
  --sh-2: 0 1px 2px rgba(4, 42, 31, .05), 0 14px 34px -14px rgba(4, 42, 31, .22);
  --sh-3: 0 2px 6px rgba(4, 42, 31, .06), 0 34px 70px -24px rgba(4, 42, 31, .38);
  --sh-o: 0 12px 26px -10px rgba(224, 106, 11, .65);
  --r-xl: 28px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --f-display: 'Poppins', ui-sans-serif, 'Segoe UI', system-ui, sans-serif;
  --f-ui: 'Manrope', ui-sans-serif, 'Segoe UI', system-ui, sans-serif;
  --f-hand: 'Caveat', 'Segoe Script', cursive;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  /* Acentos de MARCA (barra lateral, tarjetas oscuras, navegación activa, enlaces sobre oscuro).
     Por defecto son los verdes de siempre; Cuartico Pro los cambia (ver «Cuartico Pro» al final).
     Los verdes con significado (--pos, --mint en ingresos y medidores, «al día») no pasan por aquí. */
  --acc: var(--mint); --acc-2: var(--g400); --acc-soft: var(--mint-100); --side-ink: #D7EDE2;
  /* Cuartico Pro (28/09): azul marino con cian, estilo NOVACONTROL. */
  --pro-950: #040A16; --pro-900: #07132A; --pro-850: #0A1A36; --pro-800: #0E2244; --pro-700: #143058; --pro-600: #1C4274;
  --pro-cyan: #3DD6F5; --pro-teal: #2DD4BF; --pro-ice: #D5E3F2; --pro-ink: #0E7490;

  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  box-sizing: border-box;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
.cq *, .cq *::before, .cq *::after { box-sizing: border-box; }
.cq :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; padding: 0; }
.cq :where(ul, ol) { list-style: none; }
.cq :where(button, input, select, textarea) { font: inherit; color: inherit; }
.cq :where(a) { color: inherit; text-decoration: none; }
.cq :where(h1, h2, h3) { font-family: var(--f-display); color: var(--text); letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
.cq :focus-visible { outline: 3px solid var(--o400); outline-offset: 2px; border-radius: 10px; }

/* Tema noche: mismo sistema, superficies profundas */
.cq[data-theme='oscuro'] {
  --bg: #061410; --bg-2: #0A1B15; --surface: #0D1F18; --surface-2: #11271F; --surface-3: #163027;
  --line: rgba(221, 246, 234, .07); --line-2: rgba(221, 246, 234, .13);
  --text: #E8F4EE; --text-2: #B4C9BE; --text-3: #92A99D;
  --pos: #5BE3A6; --neg: #E8F4EE;
  --mint-50: rgba(91, 227, 166, .06); --mint-100: rgba(91, 227, 166, .12);
  --o50: rgba(245, 130, 31, .08); --o100: rgba(245, 130, 31, .16); --o700: #FFB06A;
  --r100: rgba(224, 83, 63, .16); --r600: #FF8B78; --a100: rgba(242, 165, 22, .16); --a600: #FFC95C;
  --sh-1: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 2px 10px -4px rgba(0, 0, 0, .5);
  --sh-2: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 36px -16px rgba(0, 0, 0, .7);
  --sh-3: 0 30px 70px -24px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ── Utilidades ─────────────────────────────────────────────────────────── */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.money { font-family: var(--f-ui); font-variant-numeric: proportional-nums; letter-spacing: -.015em; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.money .cur { font-size: .56em; font-weight: 700; letter-spacing: 0; opacity: .72; margin-right: .08em; vertical-align: .52em; }
.money .sg { margin-right: .04em; }
.overline { font-family: var(--f-ui); font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.muted { color: var(--text-3); }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── Movimiento ─────────────────────────────────────────────────────────── */
@keyframes cq-rise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes cq-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cq-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes cq-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cq-draw { from { stroke-dashoffset: var(--len, 1000); } to { stroke-dashoffset: 0; } }
@keyframes cq-pop { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes cq-pulse { 0% { box-shadow: 0 0 0 0 rgba(91, 227, 166, .55); } 70% { box-shadow: 0 0 0 12px rgba(91, 227, 166, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 227, 166, 0); } }
@keyframes cq-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -10px, 0); } }
@keyframes cq-drift-a { 0% { transform: translate3d(-8%, -6%, 0) scale(1); } 50% { transform: translate3d(10%, 8%, 0) scale(1.12); } 100% { transform: translate3d(-8%, -6%, 0) scale(1); } }
@keyframes cq-drift-b { 0% { transform: translate3d(6%, 10%, 0) scale(1.05); } 50% { transform: translate3d(-12%, -4%, 0) scale(.92); } 100% { transform: translate3d(6%, 10%, 0) scale(1.05); } }
@keyframes cq-shine { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(260%) skewX(-18deg); } }
@keyframes cq-dots { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes cq-caret { 50% { opacity: 0; } }
@keyframes cq-stripes { to { background-position: 28px 0; } }
@keyframes cq-spin { to { transform: rotate(360deg); } }
@keyframes cq-sheet { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes cq-toast { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.96); } 12%, 86% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, 10px) scale(.98); } }
@keyframes cq-flash { 0% { background: color-mix(in srgb, var(--mint) 34%, transparent); } 100% { background: transparent; } }
@keyframes cq-wipe { from { clip-path: circle(0% at var(--wx, 50%) var(--wy, 60%)); } to { clip-path: circle(150% at var(--wx, 50%) var(--wy, 60%)); } }
@keyframes cq-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }

.rise { animation: cq-rise .75s var(--ease) both; }
.fade { animation: cq-fade .6s var(--ease) both; }
.pop { animation: cq-pop .5s var(--spring) both; }

@media (prefers-reduced-motion: reduce) {
  .cq *, .cq *::before, .cq *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ── Botones ────────────────────────────────────────────────────────────── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 0; font-family: var(--f-ui); font-weight: 800; font-size: 15px; letter-spacing: -.005em; cursor: pointer; overflow: hidden; isolation: isolate; transition: transform .25s var(--spring), box-shadow .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease); white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn .i { transition: transform .35s var(--spring); }
.btn:hover .i-go { transform: translateX(4px); }
.btn-primary { color: #1F1204; background: linear-gradient(135deg, var(--o400) 0%, var(--o500) 45%, var(--o600) 100%); box-shadow: var(--sh-o), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-120%) skewX(-18deg); z-index: -1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -12px rgba(224, 106, 11, .75), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary:hover::after { animation: cq-shine .9s var(--ease); }
.btn-dark { color: #fff; background: var(--e800); box-shadow: 0 10px 24px -12px rgba(4, 38, 28, .7); }
.btn-dark:hover { background: var(--e700); transform: translateY(-2px); }
.btn-ghost { color: var(--text); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-soft { color: var(--e600); background: var(--acc-soft); }
.cq[data-theme='oscuro'] .btn-soft { color: var(--acc); }
.btn-soft:hover { background: color-mix(in srgb, var(--acc-soft) 60%, var(--mint-200)); }
.btn-sm { min-height: 38px; padding: 8px 15px; font-size: 13.5px; gap: 7px; }
.btn-sm .i { width: 17px; height: 17px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), transform .25s var(--spring); }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.danger:hover { background: var(--r100); color: var(--r600); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(31, 18, 4, .25); border-top-color: #1F1204; animation: cq-spin .7s linear infinite; }

/* ── Campos ─────────────────────────────────────────────────────────────── */
.fld { position: relative; display: block; }
.fld + .fld { margin-top: 14px; }
.fld-box { position: relative; display: flex; align-items: center; min-height: 60px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .25s var(--ease), background-color .25s var(--ease); }
.fld-box:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--g500) 45%, var(--line-2)); }
.fld-box.is-focus { box-shadow: inset 0 0 0 2px var(--g500), 0 0 0 5px color-mix(in srgb, var(--g500) 16%, transparent); }
.fld-box.is-bad { box-shadow: inset 0 0 0 2px var(--r500), 0 0 0 5px color-mix(in srgb, var(--r500) 14%, transparent); }
.fld-ico { position: absolute; left: 18px; color: var(--text-3); transition: color .25s var(--ease); pointer-events: none; }
.fld-box.is-focus .fld-ico { color: var(--g500); }
.fld-label { position: absolute; left: 50px; top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 600; color: var(--text-3); pointer-events: none; transition: top .3s var(--ease), font-size .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
.fld-box.is-up .fld-label { top: 14px; transform: none; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--g500); }
.fld input { width: 100%; height: 60px; padding: 22px 16px 6px 50px; border: 0; background: transparent; font-size: 16px; font-weight: 600; color: var(--text); outline: none; }
.fld input::placeholder { color: transparent; }
.fld-end { position: absolute; right: 8px; display: flex; align-items: center; gap: 4px; }
.fld-ok { color: var(--g500); animation: cq-pop .45s var(--spring) both; }
.fld-hint { display: block; margin: 7px 4px 0; font-size: 12.5px; color: var(--text-3); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 4px 0; }
.strength i { height: 5px; border-radius: 99px; background: var(--line-2); transform-origin: left; transition: background-color .35s var(--ease); }
.strength i.on { background: var(--g400); animation: cq-grow-x .5s var(--ease) both; }
.strength i.on.warm { background: var(--o500); }

/* Etiquetas y fichas */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .01em; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip.ok { background: var(--mint-100); color: var(--pos); }
.chip.warm { background: var(--a100); color: var(--a600); }
.chip.bad { background: var(--r100); color: var(--r600); }
.chip.orange { background: var(--o100); color: var(--o700); }
.chip .i { width: 13px; height: 13px; stroke-width: 2.4; }
.tile { --c: var(--g500); display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 16%, transparent); }
.tile .i { width: 21px; height: 21px; }
.tile-sm { width: 34px; height: 34px; border-radius: 11px; }
.tile-sm .i { width: 17px; height: 17px; }

/* Control segmentado con indicador que se desliza */
.seg { --n: 4; --k: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 999px; background: var(--e800); box-shadow: 0 6px 16px -6px rgba(4, 38, 28, .6); transform: translateX(calc(var(--k) * 100%)); transition: transform .55s var(--spring); }
.cq[data-theme='oscuro'] .seg-thumb { background: var(--acc); }
.seg button { position: relative; z-index: 1; min-height: 38px; padding: 0 16px; border: 0; background: none; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: color .3s var(--ease); }
.seg button[aria-pressed='true'] { color: #fff; }
.cq[data-theme='oscuro'] .seg button[aria-pressed='true'] { color: var(--e900); }

/* ═══ Entrar y registro ═════════════════════════════════════════════════ */
.auth { position: relative; display: grid; grid-template-columns: 1fr 1.08fr; width: 100%; min-height: 100vh; min-height: 100dvh; background: var(--surface); overflow: hidden; }
.auth-form { position: relative; display: flex; flex-direction: column; padding: 40px 72px 32px; }
.auth-form .brand { margin-bottom: auto; }
.auth-inner { width: min(420px, 100%); margin: auto; padding: 24px 0; }
.auth-inner h1 { font-size: 44px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.auth-inner h1 .hl { position: relative; white-space: nowrap; }
.auth-inner h1 .hl::after { content: ''; position: absolute; left: 0; right: 0; bottom: -.04em; height: .14em; border-radius: 99px; background: linear-gradient(90deg, var(--o400), var(--o500)); opacity: .9; z-index: -1; transform-origin: left; animation: cq-grow-x .9s .55s var(--ease) both; }
.auth-inner .lead { margin: 12px 0 30px; font-size: 16.5px; color: var(--text-2); max-width: 36ch; }
.auth-inner form { display: block; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 2px 22px; font-size: 13.5px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.check input { appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--line-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.check input:checked { background: var(--g500); box-shadow: none; }
.check input:checked::after { content: ''; width: 10px; height: 6px; border: 2.4px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.link { font-weight: 800; color: var(--g500); background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { color: var(--e600); text-decoration: underline; text-underline-offset: 3px; }
.cq[data-theme='oscuro'] .link { color: var(--acc); }
.divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 18px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.trial { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, var(--o50), var(--mint-50)); box-shadow: inset 0 0 0 1px var(--line); }
.trial p { flex: 1; min-width: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.trial .btn { flex: none; }
.trial b { color: var(--text); }
.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 20px; font-size: 12.5px; color: var(--text-3); }
.auth-foot a:hover { color: var(--text); }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; margin-bottom: 16px; font-size: 13.5px; font-weight: 600; background: var(--r100); color: var(--r600); animation: cq-rise .45s var(--ease) both; }

/* Marca */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-tile { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #fff; box-shadow: 0 6px 16px -8px rgba(4, 38, 28, .5), inset 0 0 0 1px rgba(4, 42, 31, .06); }
.brand-tile img { width: 27px; height: auto; display: block; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word b { font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: .02em; color: var(--e900); }
.brand-word small { margin-top: 4px; font-size: 7.6px; font-weight: 800; letter-spacing: .3em; color: var(--text-3); }
.brand.on-dark .brand-word b { color: #fff; }
.brand.on-dark .brand-word small { color: color-mix(in srgb, var(--mint-200) 75%, transparent); }
.cq[data-theme='oscuro'] .brand-word b { color: #fff; }

/* Lado esmeralda con aurora */
.aurora { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 90% at 100% 0%, #0C5A40 0%, transparent 55%), linear-gradient(160deg, #06382A 0%, #04261C 48%, #021A13 100%); isolation: isolate; }
.aurora .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: -1; will-change: transform; }
.aurora .blob.b1 { width: 58%; aspect-ratio: 1; top: -12%; right: -14%; background: radial-gradient(circle, #5BE3A6 0%, rgba(91, 227, 166, 0) 70%); animation: cq-drift-a 22s var(--ease-io) infinite; }
.aurora .blob.b2 { width: 50%; aspect-ratio: 1; bottom: -18%; left: -10%; background: radial-gradient(circle, #F5821F 0%, rgba(245, 130, 31, 0) 70%); opacity: .38; animation: cq-drift-b 26s var(--ease-io) infinite; }
.aurora .blob.b3 { width: 38%; aspect-ratio: 1; top: 38%; left: 34%; background: radial-gradient(circle, #2FAE74 0%, rgba(47, 174, 116, 0) 70%); opacity: .42; animation: cq-drift-a 30s var(--ease-io) infinite reverse; }
.aurora .grid-bg { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(221, 246, 234, .16) 1px, transparent 1.2px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(70% 60% at 60% 40%, #000 20%, transparent 80%); mask-image: radial-gradient(70% 60% at 60% 40%, #000 20%, transparent 80%); }

.auth-side { display: flex; flex-direction: column; padding: 56px 64px 40px; margin: 14px; border-radius: 34px; }
.auth-side .hand { font-family: var(--f-hand); font-size: 32px; font-weight: 700; color: var(--o300); transform: rotate(-3deg); transform-origin: left; display: inline-block; }
.auth-side h2 { margin-top: 4px; font-size: 42px; font-weight: 700; line-height: 1.06; letter-spacing: -.035em; color: #fff; max-width: 13ch; }
.auth-side h2 em { font-style: normal; background: linear-gradient(90deg, var(--mint), #B8F5D6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side .sub { margin-top: 14px; max-width: 40ch; font-size: 15.5px; color: color-mix(in srgb, var(--mint-200) 80%, transparent); }
.stage { position: relative; flex: 1; margin-top: 26px; min-height: 360px; }
.glass { background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05)); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 30px 60px -24px rgba(0, 0, 0, .55); border-radius: 24px; }
.layer { position: absolute; transition: transform .6s var(--ease); will-change: transform; }
.chat { width: 360px; padding: 16px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.chat-head .av { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.chat-head .av img { width: 20px; }
.chat-head b { display: block; font-size: 14px; }
.chat-head small { font-size: 11.5px; color: var(--mint); font-weight: 700; }
.bubbles { display: flex; flex-direction: column; gap: 8px; min-height: 150px; }
.bub { max-width: 86%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.4; animation: cq-sheet .45s var(--spring) both; }
.bub.me { align-self: flex-end; border-bottom-right-radius: 5px; background: #DCF8C6; color: #0B2A1C; }
.bub.bot { align-self: flex-start; border-bottom-left-radius: 5px; background: rgba(255, 255, 255, .94); color: #0B2A1C; }
.bub.bot b { color: var(--e600); }
.bub .t { display: block; margin-top: 3px; font-size: 10.5px; text-align: right; opacity: .55; }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px; background: currentColor; animation: cq-caret 1s steps(1) infinite; }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; border-bottom-left-radius: 5px; background: rgba(255, 255, 255, .94); animation: cq-sheet .35s var(--ease) both; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--g500); animation: cq-dots 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.mini { width: 250px; padding: 16px 18px; }
.mini .overline { color: color-mix(in srgb, var(--mint-200) 80%, transparent); font-size: 10.5px; }
.mini .money { display: block; margin-top: 4px; font-size: 30px; font-weight: 800; color: #fff; }
.mini .bar { position: relative; height: 8px; margin-top: 12px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.mini .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--mint), var(--g400)); transition: width 1.1s var(--ease); }
.mini .row { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: color-mix(in srgb, var(--mint-200) 80%, transparent); }
.pill-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; }
.pill-card .tile { --c: var(--mint); background: rgba(91, 227, 166, .16); box-shadow: none; }
.pill-card b { display: block; font-size: 13.5px; }
.pill-card small { font-size: 12px; color: color-mix(in srgb, var(--mint-200) 80%, transparent); }
.ring-sm { width: 44px; height: 44px; flex: none; transform: rotate(-90deg); }
.ring-sm circle { fill: none; stroke-width: 5; }
.ring-sm .bg { stroke: rgba(255, 255, 255, .14); }
.ring-sm .fg { stroke: var(--o400); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--mint-200) 85%, transparent); }
.trust > span { display: inline-flex; align-items: center; gap: 8px; }
.trust .i { width: 17px; height: 17px; color: var(--mint); }
.steps3 { display: grid; gap: 12px; }
.step3 { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.step3 .n { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; font-weight: 800; font-size: 14px; color: #1F1204; background: linear-gradient(135deg, var(--o400), var(--o600)); box-shadow: 0 8px 18px -8px rgba(224, 106, 11, .8); }
.step3 b { display: block; font-size: 14.5px; }
.step3 small { font-size: 12.5px; color: color-mix(in srgb, var(--mint-200) 80%, transparent); }

/* Transición de éxito al entrar */
.welcome { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; text-align: center; color: #fff; background: radial-gradient(80% 80% at 50% 40%, #0C5A40, #021A13); animation: cq-wipe .9s var(--ease-io) both; }
.welcome .ok { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 50%; background: rgba(91, 227, 166, .16); box-shadow: 0 0 0 10px rgba(91, 227, 166, .06); animation: cq-pop .6s .35s var(--spring) both; }
.welcome .ok svg { width: 44px; height: 44px; fill: none; stroke: var(--mint); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; animation: cq-check .5s .7s var(--ease) both; }
.welcome h2 { color: #fff; font-size: 38px; font-weight: 700; animation: cq-rise .6s .55s var(--ease) both; }
.welcome p { margin-top: 8px; color: color-mix(in srgb, var(--mint-200) 85%, transparent); animation: cq-rise .6s .7s var(--ease) both; }
.welcome .btn { margin-top: 26px; animation: cq-rise .6s .85s var(--ease) both; }
/* Con Pro, la bienvenida ya sale en el azul noche del panel (y el panel abre en azul, sin pasar por el verde). */
.welcome.pro { background: radial-gradient(60% 50% at 50% 38%, rgba(45, 212, 191, .18), transparent 70%), radial-gradient(80% 80% at 50% 40%, var(--pro-700), var(--pro-950)); }
.welcome.pro .ok { background: rgba(61, 214, 245, .16); box-shadow: 0 0 0 10px rgba(61, 214, 245, .07), 0 0 44px rgba(61, 214, 245, .25); }
.welcome.pro .ok svg { stroke: var(--pro-cyan); }
.welcome.pro p { color: color-mix(in srgb, var(--pro-ice) 88%, transparent); }

/* Entrar en el celular */
.auth-m { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; background: var(--e900); }
.auth-m .aurora { flex: none; height: 330px; padding: 22px 22px 0; }
.auth-m .trial { margin-top: 18px; }
.auth-m .sheet { z-index: 2; }
.auth-m .hand { font-family: var(--f-hand); font-size: 26px; font-weight: 700; color: var(--o300); display: inline-block; transform: rotate(-3deg); margin-top: 26px; }
.auth-m .aurora h2 { font-size: 30px; font-weight: 700; color: #fff; letter-spacing: -.03em; line-height: 1.08; max-width: 12ch; }
.auth-m .sheet { position: relative; flex: 1; margin-top: -54px; padding: 26px 22px 18px; border-radius: 30px 30px 0 0; background: var(--surface); box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, .5); animation: cq-sheet .8s .15s var(--ease) both; display: flex; flex-direction: column; }
.auth-m .sheet h1 { font-size: 27px; font-weight: 700; letter-spacing: -.03em; }
.auth-m .sheet .lead { margin: 6px 0 20px; font-size: 14.5px; color: var(--text-2); }
.auth-m .float-card { position: absolute; z-index: 3; right: 16px; top: 214px; width: 158px; padding: 12px 14px; animation: cq-float 6s var(--ease-io) infinite; }
.auth-m .float-card .money { font-size: 22px; font-weight: 800; color: #fff; display: block; }

/* ═══ Panel ═════════════════════════════════════════════════════════════ */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); width: 100%; min-height: 100vh; background: var(--bg); }

/* Barra lateral */
.side { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 24px 16px 18px; color: var(--side-ink); background: radial-gradient(120% 50% at 0% 0%, color-mix(in srgb, var(--acc) 14%, transparent), transparent 60%), radial-gradient(90% 40% at 100% 100%, rgba(245, 130, 31, .10), transparent 60%), linear-gradient(180deg, #05291F 0%, #031C15 100%); overflow: hidden; isolation: isolate; }
.cq[data-theme='oscuro'] .side { background: radial-gradient(120% 50% at 0% 0%, rgba(91, 227, 166, .10), transparent 60%), linear-gradient(180deg, #03140F 0%, #020D0A 100%); box-shadow: inset -1px 0 0 var(--line); }
.side .brand { padding: 0 8px; }
.side-in { position: sticky; top: 0; display: flex; flex-direction: column; gap: 22px; height: 100vh; max-height: 100%; padding: 24px 16px 18px; }
.side { padding: 0; }
.side-sec { padding: 0 12px; font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--mint-200) 55%, transparent); }
.nav { position: relative; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.nav-pill { position: absolute; left: 0; right: 0; top: 0; height: 46px; border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 20%, transparent), color-mix(in srgb, var(--acc) 7%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 22%, transparent), 0 8px 20px -10px rgba(0, 0, 0, .6); transition: translate .55s var(--spring); z-index: 0; animation: cq-pill .7s var(--spring) both; }
@keyframes cq-pill { from { opacity: 0; scale: .8 .6; } to { opacity: 1; scale: 1 1; } }
.nav-pill::before { content: ''; position: absolute; left: 12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 12px 2px color-mix(in srgb, var(--acc) 70%, transparent); opacity: 0; }
.nav-item { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px 0 14px; border-radius: 14px; font-size: 14.5px; font-weight: 700; color: color-mix(in srgb, var(--side-ink) 78%, transparent); transition: color .25s var(--ease), background-color .25s var(--ease); cursor: pointer; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.nav-item .i { width: 20px; height: 20px; transition: transform .35s var(--spring), color .25s var(--ease); }
.nav-item:hover .i { transform: scale(1.1); }
.nav-item[aria-current='page'] { color: #fff; }
.nav-item[aria-current='page'] .i { color: var(--acc); }
.nav-item .count { margin-left: auto; min-width: 24px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 800; text-align: center; color: var(--side-ink); background: rgba(255, 255, 255, .08); }
.nav-item[aria-current='page'] .count { color: var(--e900); background: var(--acc); }
.side-card { position: relative; padding: 16px; border-radius: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.side-card .t { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 800; color: #fff; }
.side-card p { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: color-mix(in srgb, var(--mint-200) 78%, transparent); }
.side-card p q { color: #fff; font-weight: 700; quotes: '«' '»'; }
.side-card .btn { margin-top: 12px; min-height: 40px; width: 100%; font-size: 13.5px; }
.side-card .t .tile { --c: var(--acc); width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--acc) 15%, transparent); box-shadow: none; }
.side-card .t .tile .i { width: 17px; height: 17px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.me { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--e900); background: linear-gradient(135deg, var(--acc), var(--acc-2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 13.5px; color: #fff; }
.me .who small { display: block; font-size: 11.5px; color: color-mix(in srgb, var(--mint-200) 65%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .icon-btn { color: color-mix(in srgb, var(--mint-200) 80%, transparent); width: 36px; height: 36px; }
.me .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--mint-200) 70%, transparent); }
.plan a { color: var(--o300); font-weight: 800; }

/* Contenido */
.main { position: relative; min-width: 0; padding: 30px 38px 44px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.topbar .overline { display: block; margin-bottom: 8px; }
.topbar h1 { font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
.topbar h1 .wave { display: inline-block; transform-origin: 70% 70%; }
.tools { display: flex; align-items: center; gap: 10px; }
.tools .icon-btn { width: 46px; height: 46px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }

.grid { display: grid; gap: 22px; }
.g-hero { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); }
.g-2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.g-2b { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-mv { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack { display: grid; gap: 22px; align-content: start; }
.sec-gap { margin-top: 22px; }

.card { position: relative; min-width: 0; padding: 22px 24px 24px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); transition: box-shadow .35s var(--ease), transform .35s var(--ease), background-color .5s var(--ease); }
.card:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-2); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.card-head .sp { flex: 1; }
.card-head .sub { font-size: 13px; color: var(--text-3); font-weight: 600; }
.card-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 800; color: var(--g500); cursor: pointer; }
.cq[data-theme='oscuro'] .card-link { color: var(--acc); }
.card-link .i { width: 16px; height: 16px; transition: transform .3s var(--spring); }
.card-link:hover .i { transform: translateX(3px); }

/* Tarjeta principal: balance del mes */
.hero { padding: 26px 28px 24px; border-radius: 30px; box-shadow: 0 30px 60px -30px rgba(2, 26, 19, .75); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 26px; min-height: 314px; }
.hero-main { display: flex; flex-direction: column; min-width: 0; }
.hero-main .flow { margin-top: auto; padding-top: 26px; }
.hero .big { font-variant-numeric: tabular-nums; }
.hero .big .sg { font-weight: 600; opacity: .85; }
.hero .overline { color: color-mix(in srgb, var(--mint-200) 80%, transparent); }
.hero .big { display: block; margin-top: 10px; font-size: 54px; font-weight: 800; line-height: 1; color: #fff; }
.hero .big.neg { color: #FFB29F; }
.hero .status { display: inline-flex; margin-top: 14px; }
.hero-note { margin-top: 14px; font-size: 14px; font-weight: 600; color: color-mix(in srgb, var(--mint-200) 82%, transparent); }
.hero-note b { color: #fff; font-weight: 800; }
.hero .status .chip { background: rgba(91, 227, 166, .16); color: var(--mint); }
.hero .status .chip.bad { background: rgba(255, 139, 120, .16); color: #FFB29F; }
.flow { display: grid; gap: 14px; margin-top: 26px; }
.flow-row .top { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--mint-200) 85%, transparent); }
.flow-row .top .money { font-size: 17px; font-weight: 800; color: #fff; }
.flow-row .track { height: 10px; margin-top: 8px; border-radius: 99px; background: rgba(255, 255, 255, .10); overflow: hidden; }
.flow-row .track i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: cq-grow-x 1.2s var(--ease) both; }
.flow-row.in .track i { background: linear-gradient(90deg, #2FAE74, #5BE3A6); }
.flow-row.out .track i { background: linear-gradient(90deg, #E06A0B, #FF9D42); }
.hero-chart { position: relative; display: flex; flex-direction: column; padding: 16px 16px 12px; border-radius: 22px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.hero-chart .hd { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 800; color: #fff; }
.hero-chart .hd small { font-weight: 700; color: color-mix(in srgb, var(--mint-200) 70%, transparent); }
.hero-chart .plotbox { position: relative; flex: 1; min-height: 150px; margin-top: 10px; }
.hero-chart svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.hero-chart .area { fill: url(#gArea); opacity: 0; animation: cq-fade .9s .9s var(--ease) both; }
.hero-chart .line { fill: none; stroke: var(--acc); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); animation: cq-draw 1.6s .3s var(--ease-io) both; filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--acc) 45%, transparent)); }
.hero-chart .zero { stroke: rgba(255, 255, 255, .18); stroke-dasharray: 3 5; }
.hero-chart .pay { fill: #FFB06A; }
.hero-chart .today { fill: var(--acc); stroke: var(--e900); stroke-width: 3; }
.hero-chart .halo { fill: color-mix(in srgb, var(--acc) 25%, transparent); transform-box: fill-box; transform-origin: center; animation: cq-halo 2.2s ease-out infinite; }
@keyframes cq-halo { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
.hero-chart .xl { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; font-weight: 700; color: color-mix(in srgb, var(--mint-200) 60%, transparent); }
/* La posición va en «translate» (no en «transform»): cq-pop anima transform y, con fill «both», lo dejaba en scale(1) y movía etiquetas, puntos y burbujas. */
.hero-chart .tag { position: absolute; padding: 3px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 800; color: #1F1204; background: var(--o300); translate: -50% -130%; white-space: nowrap; animation: cq-pop .5s var(--spring) both; }

/* Cifras al lado del balance */
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; }
.kpi .kh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; font-weight: 800; color: var(--text-2); }
.kpi .val { font-size: 32px; font-weight: 800; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi .note { font-size: 13px; color: var(--text-3); font-weight: 600; }
.kpi .note b { color: var(--text); }
.stackbar { display: flex; height: 12px; margin-top: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-3); gap: 3px; }
.stackbar i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: cq-grow-x 1.1s var(--ease) both; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.compare { display: grid; gap: 8px; margin-top: 12px; }
.compare .cr { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.compare .cr .bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.compare .cr .bar i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: cq-grow-x 1.1s var(--ease) both; }
.compare .cr .money { font-size: 12.5px; font-weight: 800; color: var(--text-2); }

/* Día por día */
.daily { position: relative; }
.daily-plot { position: relative; display: grid; grid-template-columns: repeat(var(--n, 30), minmax(0, 1fr)); align-items: end; gap: 6px; height: 214px; padding-top: 34px; border-bottom: 1px solid var(--line-2); }
.daily-guides { position: absolute; inset: 34px 0 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.daily-guides i { height: 0; border-top: 1px dashed var(--line); }
.daily-avg { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed color-mix(in srgb, var(--o500) 70%, transparent); pointer-events: none; animation: cq-fade .6s 1.1s both; }
.daily-avg > span { position: absolute; right: 0; top: -24px; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 800; color: var(--o700); background: var(--o100); white-space: nowrap; }
.col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.col .bar { position: relative; width: 100%; max-width: 20px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--o400), var(--o600)); transform-origin: bottom; animation: cq-grow-y .9s var(--ease) both; transition: filter .2s var(--ease), opacity .2s var(--ease); }
.col .bar.zero { height: 4px !important; background: var(--line-2); border-radius: 99px; }
.col.future .bar { height: 4px !important; background: repeating-linear-gradient(90deg, var(--line-2) 0 3px, transparent 3px 6px); border-radius: 0; animation: none; opacity: .9; }
.col.today .bar { background: linear-gradient(180deg, #FFC48A, var(--o500)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--o500) 22%, transparent); }
.col.dim .bar { opacity: .35; }
.col.hot .bar { filter: brightness(1.08) saturate(1.1); }
.col .inc { position: absolute; bottom: calc(var(--y) + 8px); left: 50%; translate: -50% 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--g500); box-shadow: 0 0 0 3px var(--surface), 0 6px 12px -4px rgba(17, 128, 79, .6); animation: cq-pop .5s var(--spring) both; }
.col .inc .i { width: 13px; height: 13px; stroke-width: 2.6; }
.daily-x { display: grid; grid-template-columns: repeat(var(--n, 30), minmax(0, 1fr)); gap: 6px; margin-top: 8px; font-size: 11px; font-weight: 700; color: var(--text-3); text-align: center; }
.daily-x span.today { color: var(--o700); font-weight: 800; }
.tip { position: absolute; z-index: 5; min-width: 196px; padding: 12px 14px; border-radius: 16px; color: #fff; background: var(--e900); box-shadow: var(--sh-3); translate: -50% calc(-100% - 12px); pointer-events: none; animation: cq-pop .3s var(--spring) both; }
.cq[data-theme='oscuro'] .tip { background: #1B3A2F; }
.tip::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.tip b { display: block; font-size: 13px; }
.tip .r { display: flex; justify-content: space-between; gap: 14px; margin-top: 5px; font-size: 12.5px; color: color-mix(in srgb, var(--mint-200) 85%, transparent); }
.tip .r .money { color: #fff; font-weight: 800; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.stat small { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.stat b { font-size: 17px; font-weight: 800; color: var(--text); }
.stat b small { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 700; }

/* ¿En qué se va? */
.donut-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; align-items: center; }
.donut-wrap > .cats { flex: 1 1 260px; min-width: 0; }
.donut { position: relative; flex: 0 0 208px; width: 208px; max-width: 100%; aspect-ratio: 1; }
.donut .seg-c { transform-box: fill-box; transform-origin: center; }
.donut svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.donut circle { fill: none; stroke-width: 18; }
.donut .base { stroke: var(--surface-3); }
.donut .seg-c { stroke-linecap: round; transition: stroke-width .3s var(--ease), opacity .3s var(--ease); animation: cq-draw 1.2s var(--ease-io) both; cursor: pointer; }
.donut .seg-c.on { stroke-width: 24; }
.donut .seg-c.off { opacity: .28; }
.donut .center { position: absolute; inset: 22% 18%; display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; text-align: center; pointer-events: none; }
.donut .center small { font-size: 12px; font-weight: 700; color: var(--text-3); }
.donut .center .money { display: block; width: 100%; min-width: 0; font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.donut .center small { max-width: 110px; margin: 0 auto; line-height: 1.25; }
.donut .center .pc { font-size: 12px; font-weight: 800; color: var(--text-3); }
.cats { display: grid; gap: 4px; }
.cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 10px; margin: 0 -10px; border-radius: 14px; transition: background-color .2s var(--ease); cursor: pointer; }
.cat .nmw { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cat .dot { width: 10px; height: 10px; flex: none; border-radius: 4px; }
.cat .tr { grid-column: 1 / -1; }
.cat:hover, .cat.on { background: var(--surface-2); }
.cat .nm { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat .tr { display: block; height: 5px; margin-top: 2px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.cat .tr i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: cq-grow-x 1s var(--ease) both; }
.cat .fg { display: flex; align-items: baseline; gap: 8px; }
.cat .fg .money { font-size: 14px; font-weight: 800; color: var(--text); }
.cat .fg small { min-width: 30px; text-align: right; font-size: 11.5px; font-weight: 700; color: var(--text-3); }
/* Subcategorías de un grupo, debajo de su fila («Rutas» → cada ruta). */
.cat.sub { cursor: default; padding-top: 2px; padding-bottom: 2px; }
.cat.sub:hover { background: transparent; }
.cat.sub .nmw { padding-left: 19px; }
.cat.sub .nm { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.cat.sub .nm::before { content: '↳ '; color: var(--text-3); }
.cat.sub .fg .money { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 8px; padding: 10px; border: 0; border-radius: 14px; background: var(--surface-2); font-size: 13px; font-weight: 800; color: var(--text-2); cursor: pointer; transition: background-color .2s var(--ease); }
.more:hover { background: var(--surface-3); }

/* Lo que veo */
.insights { display: grid; gap: 10px; }
.insight { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.insight:hover { transform: translateX(4px); box-shadow: inset 0 0 0 1px var(--line-2); }
.insight p { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.insight p b { color: var(--text); font-weight: 800; }
.insight .tile { width: 40px; height: 40px; }
.insight.good .tile { --c: var(--g500); }
.insight.warm .tile { --c: #E08A00; }
.insight.bad .tile { --c: var(--r500); }
.insight.fire .tile { --c: var(--o500); }

/* Próximos pagos */
.pays { display: grid; gap: 8px; }
.pay-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px 10px 10px; margin: 0 -8px; border-radius: 18px; transition: background-color .2s var(--ease); }
.pay-row:hover { background: var(--surface-2); }
.date { display: grid; place-items: center; align-content: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); line-height: 1; }
.date b { font-family: var(--f-display); font-size: 19px; font-weight: 700; color: var(--text); }
.date small { margin-top: 3px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.pay-row.soon .date { background: var(--o100); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--o500) 30%, transparent); }
.pay-row.soon .date b { color: var(--o700); }
.pay-row.done { opacity: .72; }
.pay-row.done .date { background: var(--mint-100); }
.pay-row.done .date b { color: var(--pos); }
.pay-row .what { min-width: 0; }
.pay-row .what b { display: block; font-size: 14.5px; font-weight: 800; color: var(--text); }
.pay-row .what .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.pay-row .end { display: flex; align-items: center; gap: 10px; }
.pay-row .end .money { font-size: 15px; font-weight: 800; color: var(--text); }
.progress-line { display: flex; align-items: center; gap: 12px; margin: -4px 0 16px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.progress-line .bar { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-line .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--g400), var(--mint)); transform-origin: left; animation: cq-grow-x 1.1s var(--ease) both; }

/* Presupuestos, metas y deudas */
.meters { display: grid; gap: 18px; }
.meter-row .top { display: flex; align-items: center; gap: 12px; }
.meter-row .top .nm { flex: 1; min-width: 0; }
.meter-row .top .nm b { display: block; font-size: 14.5px; font-weight: 800; color: var(--text); }
.meter-row .top .nm small { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.meter-row .top .pc { font-size: 13px; font-weight: 800; color: var(--text-2); }
.meter { position: relative; height: 10px; margin-top: 12px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--g400), var(--mint)); transform-origin: left; animation: cq-grow-x 1.2s var(--ease) both; }
.meter.warm i { background: linear-gradient(90deg, #F2A516, #FFC857); }
.meter.over i { background: repeating-linear-gradient(-45deg, var(--r500) 0 8px, #EE6B58 8px 14px); background-size: 28px 100%; animation: cq-grow-x 1.2s var(--ease) both, cq-stripes 1.2s linear infinite; }
.meter.debt i { background: linear-gradient(90deg, #4B55C9, #7C86F0); }
.meter-row .note { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.meter-row .note.bad { color: var(--r600); }
.meter-row .note.warm { color: var(--a600); }
.note { font-size: 13px; font-weight: 700; color: var(--text-3); }
.note.bad { color: var(--r600); }
.note.warm { color: var(--a600); }
.goals { display: grid; gap: 16px; }
.goal { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: center; }
.ring { position: relative; width: 76px; height: 76px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .bg { stroke: var(--surface-3); }
.ring .fg { stroke: url(#gGoal); stroke-linecap: round; animation: cq-draw 1.4s .3s var(--ease-io) both; }
.ring .pc { position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; font-weight: 800; color: var(--text); }
.goal b { display: block; font-size: 15px; font-weight: 800; color: var(--text); }
.goal .amt { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.goal .amt .money { color: var(--text); font-weight: 800; }
.goal .hint { display: inline-flex; margin-top: 8px; }

/* Movimientos */
.movs { display: grid; }
.mov { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) 70px 112px 76px; align-items: center; gap: 14px; padding: 10px 12px; margin: 0 -12px; border-radius: 16px; transition: background-color .2s var(--ease); }
.movs.wide .mov { grid-template-columns: 42px minmax(0, 1fr) 96px 130px 84px; }
.mov:hover { background: var(--surface-2); }
.mov.fresh { animation: cq-rise .6s var(--ease) both, cq-flash 2.2s .2s var(--ease) both; }
.mov .d { min-width: 0; }
.mov .d b { display: block; font-size: 14.5px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mov .d small { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.mov .d small .i { width: 14px; height: 14px; }
.mov .c { font-size: 13px; font-weight: 700; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mov .w { font-size: 13px; font-weight: 700; color: var(--text-3); }
.mov .a { text-align: right; font-size: 15.5px; font-weight: 800; color: var(--neg); font-variant-numeric: tabular-nums; }
.mov.in .a { color: var(--pos); }
.mov .acts { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transform: translateX(6px); transition: opacity .2s var(--ease), transform .3s var(--ease); }
.mov:hover .acts { opacity: 1; transform: none; }
.mov .acts .icon-btn { width: 34px; height: 34px; border-radius: 11px; }
.src { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 800; background: var(--surface-3); color: var(--text-2); }
.day-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 4px; padding: 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.day-head:first-child { margin-top: 0; }
.day-head .money { letter-spacing: 0; font-size: 13px; color: var(--text-2); }
.tops { display: grid; gap: 14px; }
.top-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.top-row .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-size: 13px; font-weight: 800; color: var(--text-2); background: var(--surface-3); }
.top-row:first-child .n { color: #1F1204; background: linear-gradient(135deg, var(--o300), var(--o500)); }
.top-row .nm b { display: block; font-size: 14px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-row .nm .tr { display: block; height: 5px; margin-top: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.top-row .nm .tr i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--o500), var(--o300)); transform-origin: left; animation: cq-grow-x 1s var(--ease) both; }
.top-row .v { text-align: right; }
.top-row .v .money { display: block; font-size: 14.5px; font-weight: 800; color: var(--text); }
.top-row .v small { font-size: 11.5px; font-weight: 700; color: var(--text-3); }

/* Vista de movimientos */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 240px; }
.search .i { position: absolute; left: 16px; top: 50%; margin-top: -10px; color: var(--text-3); }
.search input { width: 100%; height: 48px; padding: 0 16px 0 46px; border: 0; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14.5px; font-weight: 600; outline: none; transition: box-shadow .25s var(--ease), background-color .25s var(--ease); }
.search input:focus { background: var(--surface); box-shadow: inset 0 0 0 2px var(--g500), 0 0 0 5px color-mix(in srgb, var(--g500) 14%, transparent); }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 13px; font-weight: 800; color: var(--text-2); cursor: pointer; transition: all .25s var(--ease); }
.fchip:hover { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.fchip[aria-pressed='true'] { color: #fff; background: var(--e800); box-shadow: none; }
.cq[data-theme='oscuro'] .fchip[aria-pressed='true'] { color: var(--e900); background: var(--acc); }
.fchip .dot { width: 8px; height: 8px; border-radius: 50%; }
.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.total { padding: 16px 18px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }
.total small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.total .money { display: block; margin-top: 6px; font-size: 24px; font-weight: 800; color: var(--text); }
.total.in .money { color: var(--pos); }
.empty { display: grid; place-items: center; gap: 10px; padding: 36px 12px; text-align: center; color: var(--text-3); font-weight: 600; }

/* Ventana para anotar */
.scrim { position: fixed; inset: 0; z-index: 40; display: grid; place-items: start center; padding-top: 110px; background: rgba(2, 20, 15, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: cq-fade .3s var(--ease) both; }
.modal { width: 500px; padding: 26px; border-radius: 30px; background: var(--surface); box-shadow: var(--sh-3), inset 0 0 0 1px var(--line); animation: cq-sheet .5s var(--spring) both; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2 { font-size: 22px; font-weight: 600; }
.amount-in { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 18px; margin: 16px 0; border-radius: 22px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.amount-in .cur { font-size: 22px; font-weight: 800; color: var(--text-3); }
.amount-in input { width: 5ch; min-width: 2ch; max-width: 280px; border: 0; background: none; outline: none; font-size: 46px; font-weight: 800; letter-spacing: -.03em; text-align: left; color: var(--text); caret-color: var(--o500); }
@supports (field-sizing: content) { .amount-in input { field-sizing: content; width: auto; } }
.pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 0; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 11.5px; font-weight: 800; color: var(--text-2); cursor: pointer; transition: all .25s var(--ease); }
.pick button:hover { transform: translateY(-2px); }
.pick button[aria-pressed='true'] { background: color-mix(in srgb, var(--c) 12%, var(--surface)); box-shadow: inset 0 0 0 2px var(--c); color: var(--text); }
.pick .tile { width: 36px; height: 36px; border-radius: 12px; }
.pick .tile .i { width: 18px; height: 18px; }
.modal .fld-box { min-height: 58px; }
.modal .fld input { height: 58px; padding: 24px 16px 6px 16px; }
.modal .fld-label { left: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.toast { position: fixed; left: 50%; bottom: 34px; z-index: 90; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 12px 20px 12px 14px; border-radius: 999px; color: #fff; background: var(--e900); box-shadow: var(--sh-3); font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 20px) scale(.96); transition: opacity .35s var(--ease), transform .45s var(--spring); }
.toast::before { content: ''; flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(91, 227, 166, .2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235BE3A6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 14px no-repeat; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.bad { background: #6E1D12; }
.toast.bad::before { background: rgba(255, 178, 159, .2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB29F' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center / 14px no-repeat; }
.cq[data-theme='oscuro'] .toast { background: #1B3A2F; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.toast .tile { --c: var(--mint); width: 30px; height: 30px; border-radius: 50%; background: rgba(91, 227, 166, .18); box-shadow: none; }
.toast .tile .i { width: 16px; height: 16px; stroke-width: 2.6; }

.tabbar { position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: 70px; padding: 0 6px; border-radius: 26px; background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); box-shadow: inset 0 0 0 1px var(--line), var(--sh-3); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; justify-content: center; border: 0; background: none; font-size: 10.5px; font-weight: 800; color: var(--text-3); cursor: pointer; }
.tab .i { width: 22px; height: 22px; transition: transform .35s var(--spring); }
.tab[aria-current='page'] { color: var(--e600); }
.cq[data-theme='oscuro'] .tab[aria-current='page'] { color: var(--acc); }
.tab[aria-current='page'] .i { transform: translateY(-2px); }
.fab { justify-self: center; display: grid; place-items: center; width: 58px; height: 58px; margin-top: -26px; border: 0; border-radius: 20px; color: #1F1204; background: linear-gradient(135deg, var(--o400), var(--o600)); box-shadow: 0 16px 30px -10px rgba(224, 106, 11, .8), inset 0 1px 0 rgba(255, 255, 255, .35); cursor: pointer; transition: transform .3s var(--spring); }
.fab:active { transform: scale(.92) rotate(90deg); }
.fab .i { width: 26px; height: 26px; stroke-width: 2.4; }

/* Vistas de sección */
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.summary .total .note { display: block; margin-top: 4px; }
.add-card { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 110px; padding: 20px; border: 0; border-radius: var(--r-xl); background: transparent; box-shadow: inset 0 0 0 2px var(--line-2); font-weight: 800; font-size: 14.5px; color: var(--text-2); cursor: pointer; transition: background-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease); }
.add-card:hover { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 2px var(--g400); }
.add-card .tile { --c: var(--g500); }
.tip-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 22px; color: #fff; background: radial-gradient(90% 140% at 100% 0%, rgba(91, 227, 166, .18), transparent 60%), linear-gradient(135deg, #073A2B, #04261C); }
.tip-card p { flex: 1; font-size: 14px; color: color-mix(in srgb, var(--mint-200) 85%, transparent); }
.tip-card p b { color: #fff; }
.tip-card q { color: var(--o300); font-weight: 800; quotes: '«' '»'; }
.tip-card .tile { --c: var(--acc); background: color-mix(in srgb, var(--acc) 15%, transparent); box-shadow: none; }
.gauge { position: relative; width: 260px; height: 150px; margin: 6px auto 0; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .bg { fill: none; stroke: var(--surface-3); stroke-width: 20; stroke-linecap: round; }
.gauge .fg { fill: none; stroke-width: 20; stroke-linecap: round; animation: cq-draw 1.4s .3s var(--ease-io) both; }
.gauge .mid { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; }
.gauge .mid .money { display: block; font-size: 30px; font-weight: 800; color: var(--text); }
.gauge .mid small { font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.side-grid { display: grid; gap: 22px; align-content: start; }
.more-row { display: flex; justify-content: center; margin-top: 16px; }

/* ═══ Producción: base, ventanas, celular ════════════════════════════════ */
[hidden] { display: none !important; }
.cq body { margin: 0; min-height: 100vh; background: var(--bg); }
.cq img { display: block; max-width: 100%; }
.cq[data-theme='oscuro'] { background: var(--bg); }
@keyframes cq-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes cq-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
.skeleton { min-height: 180px; border-radius: var(--r-xl); background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: cq-shimmer 1.3s linear infinite; }
.skeleton + .skeleton { margin-top: 22px; }
.alert.shake { animation: cq-rise .45s var(--ease) both, cq-shake .5s .1s both; }
.alert-good { background: var(--mint-100); color: var(--pos); }
.foot { padding: 26px 16px 34px; text-align: center; font-size: 12.5px; color: var(--text-3); }
.foot a { text-decoration: underline; text-underline-offset: 2px; }
.foot a:hover { color: var(--text); }
.center { text-align: center; }
.mini { font-size: 12.5px; }

/* Las entradas se animan solo al llegar a una vista o cambiar de periodo, no al filtrar o guardar */
.sin-anim .rise, .sin-anim .fade, .sin-anim .pop, .sin-anim .col .bar, .sin-anim .col .inc, .sin-anim .flow-row .track i,
.sin-anim .stackbar i, .sin-anim .compare .bar i, .sin-anim .cat .tr i, .sin-anim .top-row .tr i, .sin-anim .progress-line .bar i,
.sin-anim .meter i, .sin-anim .ring .fg, .sin-anim .gauge .fg, .sin-anim .donut .seg-c, .sin-anim .hero-chart .line,
.sin-anim .hero-chart .area, .sin-anim .hero-chart .tag, .sin-anim .daily-avg, .sin-anim .nav-pill { animation: none !important; }
.sin-anim .meter.over i { animation: cq-stripes 1.2s linear infinite !important; }

/* Gráfica del día: resaltado al pasar */
.daily-plot.hovering .col:not(.hot) .bar { opacity: .35; }
.daily-plot .col { outline: none; }
.cq[data-theme='oscuro'] .col .inc { box-shadow: 0 0 0 3px var(--surface), 0 6px 12px -4px rgba(0, 0, 0, .6); }
.lista-hoy { display: grid; gap: 4px; }

/* Tema: icono que corresponde */
.ico-sol { display: none; }
.cq[data-theme='oscuro'] .ico-sol { display: block; }
.cq[data-theme='oscuro'] .ico-luna { display: none; }

/* Botón de enlace estilo ícono en la barra lateral */
button.nav-item { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; }
.nav-item span:not(.count) { flex: 1; }

/* ── Ventanas (dialog nativo) ─────────────────────────────────────────── */
dialog.dlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 30px; color: var(--text); background: var(--surface); box-shadow: var(--sh-3), inset 0 0 0 1px var(--line); overflow: auto; overscroll-behavior: contain; }
dialog.dlg[open] { animation: cq-sheet .5s var(--spring) both; }
dialog.dlg::backdrop { background: rgba(2, 20, 15, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dlg form { padding: 26px; }
.dlg .modal-head { margin-bottom: 14px; }
.dlg .intro { margin: -4px 0 18px; font-size: 14px; color: var(--text-3); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; color: var(--text-2); }
.field > span .muted { font-weight: 600; }
.field input, .field select { width: 100%; min-height: 52px; padding: 12px 16px; border: 0; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 15.5px; font-weight: 600; color: var(--text); outline: none; transition: box-shadow .2s var(--ease), background-color .2s var(--ease); -webkit-appearance: none; appearance: none; }
.field select { padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356695F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.field input:focus, .field select:focus { background-color: var(--surface); box-shadow: inset 0 0 0 2px var(--g500), 0 0 0 5px color-mix(in srgb, var(--g500) 14%, transparent); }
.field input[type='date'] { min-height: 52px; }
.cq[data-theme='oscuro'] .field input[type='date']::-webkit-calendar-picker-indicator { filter: invert(1); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.chk { display: flex; align-items: center; gap: 12px; margin: 4px 2px 6px; font-size: 14.5px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.chk input { appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; cursor: pointer; }
.chk input:checked { background: var(--g500); box-shadow: none; }
.chk input:checked::after { content: ''; width: 10px; height: 6px; border: 2.4px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dlg .seg { margin-bottom: 4px; }
.seg label { position: relative; z-index: 1; display: grid; place-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 800; font-size: 14px; color: var(--text-2); cursor: pointer; transition: color .3s var(--ease); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { color: #fff; }
.cq[data-theme='oscuro'] .seg label:has(input:checked) { color: var(--e900); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--o400); outline-offset: 2px; }
.seg:has(label:nth-of-type(2) input:checked) .seg-thumb { transform: translateX(100%); }
.amount-in { position: relative; }
.amount-in select { position: absolute; left: 12px; top: 12px; min-height: 34px; padding: 0 28px 0 12px; border: 0; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: var(--text-2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356695F' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; box-shadow: inset 0 0 0 1px var(--line-2); -webkit-appearance: none; appearance: none; cursor: pointer; }
.amount-in select:disabled { opacity: .6; cursor: default; }
.amount-in .cur { pointer-events: none; }
.pick { max-height: 238px; overflow-y: auto; padding: 3px; margin: 0 -3px; overscroll-behavior: contain; }
.pick label { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 11.5px; font-weight: 800; color: var(--text-2); text-align: center; line-height: 1.2; cursor: pointer; transition: transform .25s var(--spring), box-shadow .25s var(--ease), background-color .25s var(--ease); }
.pick label:hover { transform: translateY(-2px); }
.pick label input { position: absolute; opacity: 0; pointer-events: none; }
.pick label:has(input:checked) { background: color-mix(in srgb, var(--c) 12%, var(--surface)); box-shadow: inset 0 0 0 2px var(--c); color: var(--text); }
.pick label:has(input:focus-visible) { outline: 3px solid var(--o400); outline-offset: 2px; }
.pick .tile { width: 36px; height: 36px; border-radius: 12px; }
.pick .tile .i { width: 18px; height: 18px; }
.pick .emo { font-size: 18px; line-height: 1; }
.menu-list { display: grid; gap: 6px; margin-top: 6px; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--surface-2); font: inherit; font-weight: 800; font-size: 15px; color: var(--text); text-align: left; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-3); }
.menu-list .i { color: var(--g500); }
.menu-list .count { margin-left: auto; padding: 2px 9px; border-radius: 99px; font-size: 12px; background: var(--surface-3); color: var(--text-2); }
.menu-list .danger .i { color: var(--r500); }

/* ── Vincular WhatsApp y pantallas sueltas ──────────────────────────────── */
.solo { min-height: 100vh; padding: 22px clamp(16px, 4vw, 40px) 20px; }
.solo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1100px; margin: 0 auto; }
.link-card { max-width: 780px; margin: clamp(24px, 6vh, 60px) auto 0; padding: clamp(24px, 4vw, 40px); border-radius: 32px; box-shadow: 0 40px 80px -40px rgba(2, 26, 19, .8); }
.link-card h2 { color: #fff; font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -.03em; }
.link-card p { margin-top: 10px; font-size: 15.5px; color: color-mix(in srgb, var(--mint-200) 85%, transparent); }
.link-card p strong, .link-card p b { color: #fff; }
.link-card .steps { display: grid; gap: 10px; margin: 24px 0; counter-reset: paso; }
.link-card .steps li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; font-size: 15px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.link-card .steps li::before { counter-increment: paso; content: counter(paso); display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; font-weight: 800; font-size: 14px; color: #1F1204; background: linear-gradient(135deg, var(--o400), var(--o600)); }
.code-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 22px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.code-box .code { font-size: clamp(26px, 5vw, 36px); font-weight: 800; letter-spacing: .14em; color: #fff; font-variant-numeric: tabular-nums; }
.link-card .when { font-size: 13px; }
.link-card .when .link { display: inline-block; padding: 6px 2px; font-size: inherit; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.link-card .when .link:disabled { opacity: .6; }
.link-card .acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.link-card .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); }
.link-card .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
/* Perfil sin WhatsApp (30/09): en la app, empezar ahí mismo o conectar WhatsApp. */
.link-card .empezar-app { margin-top: 22px; }
.link-card .empezar-app .muted { margin-top: 10px; font-size: 13.5px; }
.link-card .o-wa { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); }
.link-card .o-wa + .steps { margin-top: 16px; }
.link-card .ia-wa { margin-top: 6px; font-size: 12.5px; }
.link-card .ia-wa a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.conectar-wa { margin-bottom: clamp(14px, 2vw, 22px); }
.conectar-wa p { margin: 6px 0 14px; color: var(--text-2); }
.conectar-wa .acciones-fila { display: flex; flex-wrap: wrap; gap: 8px; }
/* Avisos del banco por Gmail (16/10) */
.gmail-card { margin-bottom: clamp(14px, 2vw, 22px); }
.gmail-card p { margin: 6px 0 14px; color: var(--text-2); }
.gmail-card .acciones-fila { display: flex; flex-wrap: wrap; gap: 8px; }
.gmail-card .gmail-priv { display: flex; align-items: flex-start; gap: 6px; margin: 14px 0 0; font-size: 12.5px; color: var(--text-3); }
.gmail-card .gmail-priv .i { flex: none; margin-top: 2px; }
.gmail-card .gmail-rota { display: flex; align-items: flex-start; gap: 6px; color: var(--r600); }
.gmail-card .gmail-rota .i { flex: none; margin-top: 2px; }
.solo .card { max-width: 640px; margin: 40px auto 0; }
.solo .card p { margin-top: 8px; color: var(--text-2); }
.solo .card .btn { margin-top: 18px; }

/* ── Barra superior y de pestañas en el celular ─────────────────────────── */
.m-bar { display: none; }
.tabbar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 60; display: none; }
.icon-btn.round { width: 46px; height: 46px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }

@media (max-width: 1099px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 14px 16px 118px; }
  .m-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
  .m-bar .brand { flex: 1; min-width: 0; }
  .m-bar .avatar { border: 0; cursor: pointer; }
  .topbar { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .topbar h1 { font-size: 26px; }
  .topbar .tools { flex-wrap: wrap; }
  .topbar .tools .solo-desk { display: none; }
  .topbar .seg { flex: 1 1 100%; }
  .seg button, .seg label { padding: 0 6px; font-size: 12.5px; }
  .tabbar { display: grid; }
  .grid, .g-hero, .g-2, .g-2b, .g-3, .g-mv, .g-half { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .sec-gap { margin-top: 14px; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 22px 20px 20px; border-radius: 26px; gap: 18px; }
  .hero .big { font-size: 44px; }
  .hero-chart .plotbox { min-height: 150px; }
  .summary, .totals { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .card { padding: 18px 18px 20px; border-radius: 24px; }
  .toast { bottom: 104px; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .g-3, .summary, .totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-half, .g-hero .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-hero .stack { display: grid; }
}
/* Celular: los totales de cada sección (Movimientos, Metas, Deudas, Fijos) van en filas compactas,
   etiqueta a la izquierda y cifra a la derecha, para llegar antes a la lista. */
@media (max-width: 699px) {
  .summary, .totals { gap: 8px; }
  .total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 12px; padding: 13px 16px; border-radius: 18px; }
  .total small { font-size: 11px; }
  .total .money { margin-top: 0; font-size: 21px; }
  .summary .total .note { flex-basis: 100%; margin-top: 2px; }
}
@media (max-width: 560px) {
  .cats { width: 100%; }
  .daily-plot { gap: 3px; height: 180px; padding-top: 30px; }
  .daily-x { gap: 3px; font-size: 10px; }
  .col .inc { width: 18px; height: 18px; }
  .col .inc .i { width: 11px; height: 11px; }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px; }
  .stat b { font-size: clamp(12.5px, 3.6vw, 14px); }
  /* «al día», «1 sep», «días»: debajo de la cifra para que no se salga de la tarjetita */
  .stat b small { display: block; margin-top: 1px; }
  .movs.wide .mov, .mov { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; margin: 0 -8px; padding: 10px 8px; }
  .mov .w { display: none; }
  .mov .acts { grid-column: 2 / -1; justify-content: flex-start; margin-top: -4px; }
  .pay-row { grid-template-columns: 48px minmax(0, 1fr); }
  .pay-row .end { grid-column: 2; justify-content: flex-start; }
  .goal { grid-template-columns: 64px minmax(0, 1fr); }
  .ring { width: 64px; height: 64px; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  dialog.dlg { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 28px 28px 0 0; max-height: 92dvh; }
  .dlg form { padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
  .amount-in input { font-size: 40px; }
  .tip-card { flex-direction: column; align-items: flex-start; }
  .card-head { flex-wrap: wrap; }
  /* «Cierras el mes en» no se parte en dos renglones: si no cabe, la comparación baja */
  .kpi .kh { flex-wrap: wrap; row-gap: 6px; }
}
@media (hover: none) {
  .mov .acts { opacity: 1; transform: none; }
  .card:hover { box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }
  .insight:hover { transform: none; }
}

/* ── Entrar y registro en pantallas angostas ────────────────────────────── */
.m-only { display: none; }
@media (max-width: 979px) {
  .auth { grid-template-columns: minmax(0, 1fr); background: var(--e900); }
  .auth-side { order: -1; margin: 0; padding: 22px 22px 78px; border-radius: 0; }
  .auth-side .stage, .auth-side .trust, .auth-side .sub { display: none; }
  .auth-side .hand { font-size: 25px; margin-top: 26px; }
  .auth-side h2 { font-size: 30px; max-width: 12ch; }
  .auth-form { position: relative; z-index: 2; margin-top: -52px; padding: 28px 22px 20px; border-radius: 30px 30px 0 0; background: var(--surface); box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, .5); animation: cq-sheet .8s .15s var(--ease) both; }
  .auth-form > .brand-row { display: none; }
  .auth-inner { margin: 0 auto; padding: 0; }
  .auth-inner h1 { font-size: 30px; }
  .auth-inner .lead { margin: 8px 0 22px; font-size: 15px; }
  .auth-foot { flex-direction: column; gap: 8px; text-align: center; }
  .m-only { display: block; }
  .m-float { position: absolute; right: 18px; bottom: 76px; width: 164px; padding: 12px 14px; animation: cq-float 6s var(--ease-io) infinite; }
  .m-float .money { display: block; font-size: 22px; font-weight: 800; color: #fff; }
}
@media (max-width: 380px) {
  .m-float { display: none; }
}

/* ── Campos: estados sin JavaScript ─────────────────────────────────────── */
.fld-box:focus-within { box-shadow: inset 0 0 0 2px var(--g500), 0 0 0 5px color-mix(in srgb, var(--g500) 16%, transparent); }
.fld-box:focus-within .fld-ico { color: var(--g500); }
.fld-box:has(input[aria-invalid='true']) { box-shadow: inset 0 0 0 2px var(--r500), 0 0 0 5px color-mix(in srgb, var(--r500) 14%, transparent); }
.fld input:focus ~ .fld-label, .fld input:not(:placeholder-shown) ~ .fld-label, .fld input:-webkit-autofill ~ .fld-label { top: 14px; transform: none; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--g500); }
.fld input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--surface) inset; -webkit-text-fill-color: var(--text); caret-color: var(--text); }
.fld .fld-ok { display: none; padding-right: 10px; }
.fld input[type='email']:valid:not(:placeholder-shown) ~ .fld-end .fld-ok { display: inline-flex; }
.pass-toggle .ico-ocultar { display: none; }
.pass-toggle[aria-pressed='true'] .ico-ver { display: none; }
.pass-toggle[aria-pressed='true'] .ico-ocultar { display: block; }
.btn-lg { min-height: 56px; font-size: 16px; }
.btn .spinner { display: none; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .spinner { display: block; }
.btn.is-busy .i-go { display: none; }
.demo-tag { position: absolute; top: -30px; right: 0; padding: 3px 10px; border-radius: 99px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--mint-200) 80%, transparent); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.layer.l1 { transform: translate3d(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -8px), 0); }
.layer.l2 { transform: translate3d(calc(var(--mx, 0) * 16px), calc(var(--my, 0) * 12px), 0); }
.layer.l3 { transform: translate3d(calc(var(--mx, 0) * 26px), calc(var(--my, 0) * 18px), 0); }
.auth-hint { margin-top: 14px; font-size: 12.5px; line-height: 1.45; color: var(--text-3); text-align: center; }
.auth-hint a { color: var(--g500); font-weight: 800; }

/* ═══ Producción: piezas que pinta panel.js ══════════════════════════════ */
.welcome { position: fixed; }
.topbar .tools .acc { display: contents; }
button.card-link { border: 0; background: none; padding: 0; }
.monedas { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 20px; }

/* Tarjeta principal sin gráfica (periodo «Hoy») y la curva medida en píxeles */
.hero.sin-grafica { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.hero-chart .xl span:last-child { text-align: right; }
.hero-chart .area.quieta, .sin-anim .hero-chart .area { opacity: 1; animation: none !important; }
.hero-chart .proy { animation: cq-fade .6s 1.5s var(--ease) both; }
.sin-anim .hero-chart .proy { animation: none; }
.hoy-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--acc); border: 3px solid var(--e900); animation: cq-pulse 2.2s infinite; pointer-events: none; }
.hoy-dot.fin { animation: none; }

/* Día por día: el promedio se mide sobre el área de las barras; el globo sigue a la barra */
.daily-plot { --pt: 34px; }
.daily-avg { bottom: calc((100% - var(--pt)) * var(--p, 0)); }
.tip { transition: left .18s var(--ease), top .18s var(--ease); }
.tip::after { left: var(--ax, 50%); }

/* Filtros de movimientos */
.fsel { min-height: 40px; max-width: 230px; padding: 0 34px 0 14px; border: 0; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--text-2); background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356695F' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px; box-shadow: inset 0 0 0 1.5px var(--line); -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis; }
.fsel:hover { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.mov:focus-within .acts { opacity: 1; transform: none; }
.solo-movil { display: none; }

/* Vacíos, botones y campos */
.empty .tile { margin-bottom: 2px; }
.empty p { max-width: 38ch; line-height: 1.45; }
.empty .btn { margin-top: 4px; }
.btn-danger { color: #fff; background: #D2432F; box-shadow: 0 10px 22px -12px rgba(184, 50, 31, .8); }
.btn-danger:hover { background: #B8321F; transform: translateY(-2px); }
.btn.is-busy > .i { display: none; }
.field input[type='number']::-webkit-inner-spin-button, .field input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type='number'] { -moz-appearance: textfield; }
dialog.dlg.dlg-sm { width: min(440px, calc(100vw - 24px)); }
.menu-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu-who h2 { font-size: 19px; }
.menu-who small { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-list .ico-sol, .menu-list .ico-luna { color: var(--o600); }
#vista.cargando > :not(.topbar) { opacity: .45; pointer-events: none; transition: opacity .25s var(--ease); }

/* Vistas de sección */
.g-pres { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.g-fijos { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.add-card-lg { flex-direction: column; min-height: 100%; padding: 32px 26px; text-align: center; }
.add-card-lg b { display: block; font-size: 17px; color: var(--text); }
.add-card-lg small { display: block; margin-top: 6px; font-weight: 600; color: var(--text-3); }
.cifra-media { display: block; font-size: 28px; font-weight: 800; color: var(--text); }
.cifra-grande { display: block; margin-top: 6px; font-size: 38px; font-weight: 800; color: var(--text); }
.acciones-card { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tip-card.top { align-items: flex-start; }
.meta-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 24px; align-items: center; padding: 26px; }
.meta-card .ring { width: 132px; height: 132px; }
.meta-card .ring circle { stroke-width: 12; }
.meta-card .ring .pc { font-size: 26px; }
.meta-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px -8px 0 0; }
.meta-card h2 { margin-top: 2px; font-size: 22px; font-weight: 600; }
.meta-amt { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--text-3); }
.meta-amt .money { font-size: 22px; font-weight: 800; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Vincular WhatsApp */
.link-card .hand { display: inline-block; margin-bottom: 6px; font-family: var(--f-hand); font-size: 28px; font-weight: 700; color: var(--o300); transform: rotate(-3deg); transform-origin: left; }
.link-card .alert { margin: 16px 0 0; }
.solo-head .tools { display: flex; align-items: center; gap: 10px; }

/* Cambio de tema con un círculo que se abre */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.sin-trans, .sin-trans * { transition: none !important; }

@media (max-width: 1099px) {
  .g-pres, .g-fijos { grid-template-columns: minmax(0, 1fr); }
  .monedas { margin: -4px 0 16px; }
}
@media (max-width: 560px) {
  .daily-plot { --pt: 30px; }
  .mov .solo-movil { display: inline; }
  .filters .search { flex-basis: 100%; min-width: 0; }
  .fsel { flex: 1; max-width: none; }
  .meta-card { grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 20px; }
  .meta-card .ring { width: 92px; height: 92px; }
  .meta-card .ring .pc { font-size: 19px; }
  .meta-card h2 { font-size: 19px; }
  .cifra-grande { font-size: 32px; }
  .card-head .card-link { margin-left: auto; }
  .solo-head .btn-sm { padding: 8px 12px; }
}

/* Movimientos: toda la fila abre «corregir»; en el celular, sin la fila de botones */
.mov[data-editar] { cursor: pointer; }
.mov .d small { flex-wrap: wrap; row-gap: 2px; }
.mov .d small > span { white-space: nowrap; }
.btn-borrar { margin-right: auto; color: var(--r600); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--r500) 35%, transparent); }
.btn-borrar:hover { background: var(--r100); }
.fld input:focus-visible { outline: none; }
@media (max-width: 560px) {
  .mov .acts { display: none; }
  .progress-line { flex-direction: column; align-items: stretch; gap: 8px; }
  .progress-line .bar { flex: none; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions .btn-borrar { order: 3; flex-basis: 100%; margin-right: 0; }
}
@media (min-width: 980px) {
  .auth-registro .auth-form { padding-top: 34px; }
  .auth-registro .auth-inner { padding: 10px 0; }
  .auth-registro .auth-inner .lead { margin-bottom: 22px; }
}
@media (max-width: 979px) {
  /* La tarjetita flotante va arriba a la derecha, al lado de la marca, sin tapar el titular */
  .m-float { top: 16px; right: 14px; bottom: auto; width: 150px; padding: 10px 14px; }
  .m-float .money { font-size: 20px; }
}
@media (max-width: 560px) {
  dialog.dlg.dlg-sm { width: 100%; }
  .stats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}
/* Monto grande: el foco se marca en toda la caja; categorías sin esconderse en escritorio */
.amount-in { transition: box-shadow .25s var(--ease), background-color .25s var(--ease); }
.amount-in:focus-within { background: var(--surface); box-shadow: inset 0 0 0 2px var(--g500), 0 0 0 5px color-mix(in srgb, var(--g500) 14%, transparent); }
.amount-in input:focus-visible { outline: none; }
.amount-in input::placeholder { color: var(--text-3); opacity: .45; }
@media (min-width: 561px) {
  .dlg .pick { grid-template-columns: repeat(5, minmax(0, 1fr)); max-height: none; }
}
@media (max-width: 560px) {
  .dlg .pick { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 262px; }
  .pick label { padding: 9px 2px; font-size: 11px; }
}

/* ── Plan para salir de deudas, tasa y cuota, "te deben" (24/09/2026) ─────── */
.plan-sec { margin-top: 22px; }
.plan-cta { min-height: 150px; }
.plan-cta .tile { --c: #4F46B8; }
.plan-card .card-head { flex-wrap: wrap; }
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.plan-main { min-width: 0; }
.plan-main .overline { display: block; margin-bottom: 6px; }
.plan-big { margin: 0 0 4px; font-family: var(--f-display); font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; color: var(--text); }
.plan-big.bad { color: var(--r600); }
.plan-main .progress-line { margin: 18px 0 0; }
.plan-side { min-width: 0; display: grid; gap: 10px; }
.plan-steps { display: grid; gap: 8px; margin: 2px 0 6px; padding: 0; list-style: none; }
.plan-step { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.plan-step .n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, #6D65D6, #4F46B8); }
.plan-step .what { min-width: 0; }
.plan-step .what b { display: block; font-size: 14.5px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-step .what small { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.plan-step .chip { white-space: nowrap; }
.note.terms { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.note-cobro { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.note-saldados { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-foot { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-foot p { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; color: var(--text-2); }
.card-foot b { color: var(--text); }
.link-btn { padding: 0; border: 0; background: none; font: inherit; font-weight: 800; color: var(--pos); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.radio-list { display: grid; gap: 8px; margin: 4px 0 14px; }
.radio-list label { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: box-shadow .2s var(--ease), background-color .2s var(--ease); }
.radio-list label:has(input:checked) { background: color-mix(in srgb, var(--mint) 10%, var(--surface)); box-shadow: inset 0 0 0 2px var(--g400); }
.radio-list input { margin-top: 3px; accent-color: #11804F; }
.radio-list b { display: block; font-size: 14px; font-weight: 800; color: var(--text); }
.radio-list small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
@media (max-width: 979px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 560px) {
  .plan-step { grid-template-columns: 28px minmax(0, 1fr); }
  .plan-step .n { width: 28px; height: 28px; font-size: 13px; }
  .plan-step .chip { grid-column: 2; justify-self: start; }
  .plan-card .card-head .sp { flex-basis: 100%; height: 0; }
}

/* ─── Categorías propias ─────────────────────────────────────────────────── */
.i-emoji { display: inline-grid; place-items: center; font-size: 20px; line-height: 1; font-style: normal; }
.tile-sm .i-emoji { font-size: 17px; }
.pick .tile .i-emoji { font-size: 18px; }
.pick .pick-new { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8.5px 4px; border-radius: 16px; background: transparent; border: 1.5px dashed color-mix(in srgb, var(--text-3) 45%, transparent); font: inherit; font-size: 11.5px; font-weight: 800; color: var(--text-2); cursor: pointer; transition: transform .25s var(--spring); }
.pick .pick-new:hover { transform: translateY(-2px); color: var(--text); }
.cat-list { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cat-row .what { flex: 1; min-width: 0; }
.cat-row .what b { display: block; font-size: 14.5px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row .what small { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.cat-row.sub { margin-left: 26px; background: transparent; }
.cat-branch { flex: none; margin-right: -4px; font-weight: 800; color: var(--text-3); }
.pick label small.pick-grp { display: block; margin-top: 1px; font-size: 10px; font-weight: 700; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cat-fijas { margin-top: 14px; font-size: 12.5px; line-height: 1.5; }
.radio-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.emoji-pick { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.emoji-pick legend { margin-bottom: 8px; font-size: 13px; font-weight: 800; color: var(--text-2); }
.emoji-pick > div { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.emoji-pick label { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 20px; cursor: pointer; transition: box-shadow .2s var(--ease), transform .2s var(--spring); }
.emoji-pick label:hover { transform: translateY(-1px); }
.emoji-pick label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--g400); background: color-mix(in srgb, var(--mint) 12%, var(--surface)); }
.emoji-pick input { position: absolute; opacity: 0; pointer-events: none; }
.emoji-pick label:has(input:focus-visible) { outline: 2px solid var(--g400); outline-offset: 2px; }
@media (max-width: 560px) {
  .emoji-pick > div { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
#cardIngresos .cat { cursor: default; }
#cardIngresos .cat:hover { background: transparent; }

/* ── Instalar la app (26/09): los botones empiezan ocultos y instalar.js decide ── */
[data-instalar][hidden], [data-instalar-caja][hidden] { display: none !important; }
.side-install { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 14px; font: inherit; font-weight: 800; font-size: 14px; color: var(--side-ink); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); cursor: pointer; transition: background-color .2s var(--ease); }
.side-install:hover { background: rgba(255, 255, 255, .11); }
.side-install .i { color: var(--acc); }
.inst-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 8px 12px 12px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }
.inst-banner img { width: 40px; height: 40px; flex: none; border-radius: 11px; box-shadow: 0 0 0 1px var(--line); }
.inst-banner .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.inst-banner b { font-size: 14.5px; line-height: 1.25; }
.inst-banner small { font-size: 12.5px; line-height: 1.35; color: var(--text-2); }
.inst-banner .btn { flex: none; }
.inst-banner .icon-btn { flex: none; width: 34px; height: 34px; }
@media (min-width: 1100px) { .inst-banner { display: none !important; } }

/* ── Ingresos (26/09): la sección y los pasos desde el resumen ───────────── */
.g-ing { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); align-items: start; }
.hero .status .chip.warm { background: rgba(255, 190, 122, .16); color: var(--o300); }
.flow-row.prev .track i { background: rgba(255, 255, 255, .34); }
.hero-foot { margin-top: 12px; font-size: 12.5px; font-weight: 700; color: color-mix(in srgb, var(--mint-200) 78%, transparent); }
.hero-foot b { color: #fff; font-weight: 800; }
.hero-note q { color: #fff; font-weight: 700; quotes: '«' '»'; }
.empty q { color: var(--text-2); font-weight: 700; quotes: '«' '»'; }

/* «Entró» del resumen lleva a Ingresos */
.flow-link { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.flow-link .track { display: block; }
.flow-link .i-flow { width: 14px; height: 14px; margin-left: 3px; vertical-align: -2px; opacity: .7; transition: transform .3s var(--spring), opacity .2s var(--ease); }
.flow-link:hover .i-flow { transform: translateX(3px); opacity: 1; }

/* Mes a mes, dentro de la tarjeta oscura */
.ing-chart { min-height: 250px; }
.mm { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; flex: 1; min-height: 150px; margin-top: 10px; }
.mm-col { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; cursor: pointer; }
.mm-col .plot { position: relative; flex: 1; min-height: 116px; }
.mm-col .bar { position: absolute; left: 50%; bottom: 0; width: min(100%, 38px); height: max(4px, var(--h)); translate: -50% 0; border-radius: 9px 9px 4px 4px; background: rgba(91, 227, 166, .30); transform-origin: bottom; animation: cq-grow-y .9s var(--ease) both; transition: background-color .25s var(--ease), box-shadow .25s var(--ease); }
.mm-col .v { position: absolute; left: -4px; right: -4px; bottom: calc(max(4px, var(--h)) + 5px); text-align: center; font-size: 10.5px; font-weight: 800; white-space: nowrap; color: color-mix(in srgb, var(--mint-200) 70%, transparent); animation: cq-fade .5s .7s var(--ease) both; }
.mm-col small { display: block; margin-top: 7px; text-align: center; font-size: 11px; font-weight: 800; color: color-mix(in srgb, var(--mint-200) 58%, transparent); }
.mm-col:hover .bar { background: rgba(91, 227, 166, .48); }
.mm-col[aria-pressed='true'] .bar { background: linear-gradient(180deg, #5BE3A6, #2FAE74); box-shadow: 0 10px 24px -10px rgba(91, 227, 166, .75); }
.mm-col[aria-pressed='true'] .v, .mm-col[aria-pressed='true'] small { color: #fff; }
.mm-col.curso .bar { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .16) 0 5px, transparent 5px 10px); }
.mm-col.curso[aria-pressed='true'] .bar { background-image: repeating-linear-gradient(135deg, rgba(4, 38, 28, .18) 0 5px, transparent 5px 10px), linear-gradient(180deg, #5BE3A6, #2FAE74); }
.mm-col.cero .bar { background: rgba(255, 255, 255, .12); box-shadow: none; }
.mm-det { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .09); font-size: 12.5px; font-weight: 700; color: color-mix(in srgb, var(--mint-200) 75%, transparent); }
.mm-det b { color: #fff; font-weight: 800; }
.mm-det .money { font-size: 14px; font-weight: 800; color: var(--mint); }
.mm-det .fts { flex-basis: 100%; }
.mm-ghost { position: relative; display: flex; flex: 1; flex-direction: column; }
.mm-ghost .mm-col { cursor: default; }
.mm-ghost .bar { background: rgba(255, 255, 255, .07); animation: none; }
.mm-ghost.cargando .bar { animation: cq-ghost 1.4s var(--ease-io) infinite alternate; }
.mm-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 0 14px; text-align: center; font-size: 13.5px; font-weight: 700; line-height: 1.45; color: color-mix(in srgb, var(--mint-200) 88%, transparent); }
.mm-msg p { max-width: 30ch; }
@keyframes cq-ghost { from { opacity: .45; } to { opacity: 1; } }
.quieto .mm-col .bar, .quieto .mm-col .v, .quieto .rise, .quieto .fuente .tr i,
.sin-anim .mm-col .bar, .sin-anim .mm-col .v, .sin-anim .fuente .tr i, .sin-anim .ing-mix i { animation: none !important; }

/* Próximo cobro y te deben */
.kpi .kh .kh-end { margin-left: auto; }
.kpi .val small { margin-left: 4px; font-size: 15px; font-weight: 700; color: var(--text-3); }
.kpi-hint { font-size: 13.5px; line-height: 1.5; font-weight: 600; color: var(--text-2); }
.kpi-hint q { font-weight: 700; color: var(--text); quotes: '«' '»'; }
.kpi .kpi-btn { align-self: flex-start; margin-top: 12px; }
.deben { display: grid; gap: 6px; margin-top: 10px; }
.deben li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.deben li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deben li .money { font-weight: 800; color: var(--text); }

/* ¿De dónde entra? */
.ing-mix { display: flex; gap: 3px; height: 12px; margin: -4px 0 14px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.ing-mix i { display: block; min-width: 4px; height: 100%; border-radius: 99px; transform-origin: left; animation: cq-grow-x 1s var(--ease) both; }
.fuentes { display: grid; gap: 2px; }
.fuente { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 16px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.fuentes > li > .fuente { margin: 0 -10px; width: calc(100% + 20px); }
.fuente:hover { background: var(--surface-2); }
.fuente[aria-pressed='true'] { background: color-mix(in srgb, var(--mint) 12%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--g400); }
.fuente .fx { min-width: 0; }
.fuente .fx b { display: block; font-size: 14.5px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuente .fx small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.fuente .fx .chip { padding: 1px 8px; font-size: 11px; }
.fuente > .money { font-size: 15px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.fuente .tr { grid-column: 2 / -1; display: block; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.fuente .tr i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: cq-grow-x 1s var(--ease) both; }
.fuente-subs { display: grid; margin: 0 0 6px 36px; padding-left: 10px; border-left: 2px solid var(--line); }
.fuente.sub { grid-template-columns: minmax(0, 1fr) auto; padding: 7px 10px; }
.fuente.sub .fx b { font-size: 13px; font-weight: 700; color: var(--text-2); }
.fuente.sub > .money { font-size: 13px; font-weight: 700; color: var(--text-2); }
.fuentes-nota { display: flex; align-items: center; gap: 6px; margin-top: 12px; }

/* La lista */
.ing-filtro { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -6px 0 12px; }
.ing-filtro .fchip .i { width: 14px; height: 14px; stroke-width: 2.4; }
.day-head .money.pos { color: var(--pos); }

/* Mes a mes por fuente */
.tabla-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.tabla-ing { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tabla-ing th, .tabla-ing td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-size: 13.5px; }
.tabla-ing thead th { vertical-align: bottom; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.tabla-ing thead th:first-child, .tabla-ing tbody th, .tabla-ing tfoot th { text-align: left; }
.tabla-ing thead th small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.tabla-ing .tn { display: flex; align-items: center; gap: 8px; max-width: 240px; }
.tabla-ing .tn span { overflow: hidden; text-overflow: ellipsis; }
.tabla-ing .dot { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.tabla-ing tbody th { font-weight: 800; color: var(--text); }
.tabla-ing td { font-weight: 700; color: var(--text-2); }
.tabla-ing td.cero { color: var(--text-3); opacity: .55; }
.tabla-ing tr.sub th { padding-left: 27px; font-weight: 700; color: var(--text-2); }
.tabla-ing tr.sub th, .tabla-ing tr.sub td { font-size: 12.5px; }
.tabla-ing tfoot th, .tabla-ing tfoot td { border-bottom: 0; font-weight: 800; color: var(--text); }
.tabla-ing .on { background: color-mix(in srgb, var(--mint) 9%, transparent); }
.tabla-ing thead .on { color: var(--pos); }
.solo-cel { display: none; margin-top: 10px; }

@media (max-width: 1099px) {
  .g-ing { grid-template-columns: minmax(0, 1fr); }
  .ing-chart { min-height: 230px; }
}
@media (max-width: 560px) {
  .tabla-ing .viejo { display: none; }
  .tabla-ing th, .tabla-ing td { padding: 8px 6px; font-size: 12.5px; }
  .tabla-ing .tn { max-width: 132px; }
  .tabla-ing tr.sub th { padding-left: 16px; }
  .solo-cel { display: block; }
  .fuente-subs { margin-left: 22px; }
}
.hero .status { max-width: 100%; }
.hero .status .chip { max-width: 100%; line-height: 1.3; }

/* ── Al día solo (26/09): avisos de lo que llega por WhatsApp ────────────── */
/* Con left: 50%, el aviso solo tenía media pantalla de ancho y se partía en cuatro líneas en el celular. */
.toast { width: max-content; line-height: 1.35; }

/* ═══ Cuartico Pro (28/09) ════════════════════════════════════════════════
   Con Cuartico Pro (y en la prueba, que trae Pro) el panel se viste de azul marino con cian,
   estilo NOVACONTROL. Solo cambia la MARCA: barra lateral, tarjetas oscuras, navegación activa
   y enlaces sobre oscuro (--e950…--e600, --mint-200 y los acentos --acc/--side-ink de arriba).
   Los verdes con significado se quedan: --pos (montos a favor), «al día», ingresos, medidores,
   «Te queda a favor» y los avisos de éxito; y los botones naranja también.
   html[data-plan="pro"] lo ponen panel.js (GET /api/resumen) y suscripcion.js (current_plan);
   un script en <head> recuerda el último plan para no parpadear en verde al abrir. */
.cq[data-plan='pro'] {
  --e950: var(--pro-950); --e900: var(--pro-900); --e850: var(--pro-850); --e800: var(--pro-800); --e700: var(--pro-700); --e600: var(--pro-600);
  --mint-200: var(--pro-ice);
  --acc: var(--pro-cyan); --acc-2: var(--pro-teal); --acc-soft: #DCEFF8; --side-ink: #D5E1EF;
  --bg: #F1F4F9; --bg-2: #E6EBF3; --surface-2: #F5F8FC; --surface-3: #ECF1F7;
  --line: rgba(9, 24, 52, .08); --line-2: rgba(9, 24, 52, .14);
  --text: #0A1526; --text-2: #34445B; --text-3: #56667C; --neg: #0A1526;
  --sh-1: 0 1px 1px rgba(9, 24, 52, .04), 0 2px 8px -3px rgba(9, 24, 52, .08);
  --sh-2: 0 1px 2px rgba(9, 24, 52, .05), 0 14px 34px -14px rgba(9, 24, 52, .24);
  --sh-3: 0 2px 6px rgba(9, 24, 52, .06), 0 34px 70px -24px rgba(9, 24, 52, .4);
}
.cq[data-plan='pro'][data-theme='oscuro'] {
  --bg: #050B16; --bg-2: #09111F; --surface: #0B1526; --surface-2: #0F1B30; --surface-3: #14233B;
  --line: rgba(205, 225, 255, .07); --line-2: rgba(205, 225, 255, .13);
  --text: #E6EEF8; --text-2: #B3C1D4; --text-3: #90A1B7; --neg: #E6EEF8;
  --acc-soft: color-mix(in srgb, var(--pro-cyan) 14%, transparent);
  --sh-1: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 2px 10px -4px rgba(0, 0, 0, .55);
  --sh-2: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 36px -16px rgba(0, 0, 0, .75);
  --sh-3: 0 30px 70px -24px rgba(0, 0, 0, .85);
}
.cq[data-plan='pro'] .side { background: radial-gradient(120% 50% at 0% 0%, rgba(45, 212, 191, .16), transparent 60%), radial-gradient(90% 40% at 100% 100%, rgba(61, 214, 245, .08), transparent 60%), linear-gradient(180deg, #0A1830 0%, #06101F 100%); }
.cq[data-plan='pro'][data-theme='oscuro'] .side { background: radial-gradient(120% 50% at 0% 0%, rgba(45, 212, 191, .12), transparent 60%), linear-gradient(180deg, #060E1C 0%, #030812 100%); }
.cq[data-plan='pro'] .aurora { background: radial-gradient(120% 90% at 100% 0%, rgba(45, 212, 191, .24) 0%, transparent 55%), linear-gradient(160deg, var(--pro-800) 0%, var(--pro-900) 48%, var(--pro-950) 100%); }
.cq[data-plan='pro'] .aurora .blob.b1 { background: radial-gradient(circle, var(--pro-cyan) 0%, rgba(61, 214, 245, 0) 70%); opacity: .4; }
.cq[data-plan='pro'] .aurora .blob.b3 { background: radial-gradient(circle, var(--pro-teal) 0%, rgba(45, 212, 191, 0) 70%); opacity: .3; }
.cq[data-plan='pro'] .aurora .grid-bg { background-image: radial-gradient(rgba(213, 227, 242, .14) 1px, transparent 1.2px); }
.cq[data-plan='pro'] :is(.hero, .link-card) { box-shadow: 0 30px 60px -30px rgba(4, 10, 22, .8); }
.cq[data-plan='pro'] .tip-card { background: radial-gradient(90% 140% at 100% 0%, rgba(45, 212, 191, .18), transparent 60%), linear-gradient(135deg, var(--pro-800), var(--pro-900)); }
/* Los íconos de las tarjetas oscuras traen su color en línea (tile('chat', '#5BE3A6')). */
.cq[data-plan='pro'] .tip-card .tile { --c: var(--acc) !important; }
.cq[data-plan='pro'] #gArea stop { stop-color: var(--pro-cyan); }
.cq[data-plan='pro'] .hero-chart .proy { stroke: var(--pro-cyan); }
.cq[data-plan='pro'] .hoy-dot { animation-name: cq-pulse-pro; }
@keyframes cq-pulse-pro { 0% { box-shadow: 0 0 0 0 rgba(61, 214, 245, .55); } 70% { box-shadow: 0 0 0 12px rgba(61, 214, 245, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 214, 245, 0); } }
/* «PRO» junto al nombre, en la barra lateral y en la barra del celular. */
.cq[data-plan='pro'] :is(.side, .m-bar) .brand-word b { display: inline-flex; align-items: center; gap: 8px; }
.cq[data-plan='pro'] :is(.side, .m-bar) .brand-word b::after { content: 'PRO'; padding: 3px 6px 2px; border-radius: 6px; font-family: var(--f-ui); font-size: 9.5px; font-weight: 800; letter-spacing: .14em; line-height: 1.2; color: var(--pro-900); background: linear-gradient(135deg, var(--pro-cyan), var(--pro-teal)); }

/* Insignia «PRO» (azul marino con cian) y el plan para salir de deudas bloqueado en Cuartico. */
.pro-badge { display: inline-flex; align-items: center; flex: none; padding: 3px 8px 2px; border-radius: 7px; font-family: var(--f-ui); font-size: 10.5px; font-weight: 800; letter-spacing: .14em; line-height: 1.3; color: #9CEBFA; background: var(--pro-800); box-shadow: inset 0 0 0 1px rgba(61, 214, 245, .35); }
.plan-locked .card-head { margin-bottom: 10px; }
.plan-locked-txt { max-width: 62ch; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.plan-locked-saved { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; color: var(--text-2); }
.plan-locked-saved .i { color: var(--pos); }
.plan-locked > .btn { margin-top: 16px; }
.card-foot p:has(.plan-locked-t) { flex-wrap: wrap; row-gap: 4px; }
.plan-locked-t { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.card-foot .link-btn { margin-left: auto; white-space: nowrap; }
#dlgPro .modal-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
