/* =====================================================================
   TuMi — "cartola viva"
   Un billete como protagonista, montos alineados como en una cartola,
   aurora de color detrás de tarjetas de vidrio y brillos de neón en lo
   que se puede tocar. Cada módulo define su tono (--module-h).
   ===================================================================== */

:root {
  --module-h: 160;

  /* Neutros claros tipo "slate" (blanco, gris azulado, tinta casi negra), como un panel SaaS limpio */
  --paper: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --glass: rgba(255, 255, 255, .8);
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #5b6a80;
  --line: rgba(0, 96, 190, .1);
  --line-strong: rgba(15, 23, 42, .18);

  /* Acento: azul eléctrico que se funde a violeta (en modo claro cada módulo cambia solo el tono, ver `hueLight`) */
  --brand: oklch(55% 0.21 var(--module-h));
  --brand-strong: oklch(46% 0.2 var(--module-h));
  --brand-soft: oklch(95% 0.03 var(--module-h));
  --on-brand: #ffffff;
  --grad-brand: linear-gradient(135deg, oklch(60% 0.22 calc(var(--module-h) - 8)) 0%, oklch(52% 0.25 min(calc(var(--module-h) + 42), 303)) 100%);
  --glow-brand: 0 10px 24px -10px oklch(60% 0.22 var(--module-h) / .6);
  --glow-brand-strong: 0 16px 36px -10px oklch(60% 0.22 var(--module-h) / .65), 0 0 0 1px oklch(70% 0.18 var(--module-h) / .5);
  --ring: 0 0 0 4px oklch(70% 0.16 var(--module-h) / .28);

  /* Coral claro para el lado "gasto" de los controles */
  --grad-expense: linear-gradient(135deg, #ffbfa6 0%, #ff9db5 100%);
  --on-expense: #4a1509;
  --glow-expense: 0 10px 22px -10px rgba(255, 130, 110, .9);

  /* Fondo: halos suaves de azul y violeta sobre casi blanco */
  --aurora-a: oklch(92% 0.06 var(--module-h) / .75);
  --aurora-b: oklch(94% 0.045 300 / .6);
  --aurora-c: oklch(95% 0.035 250 / .5);
  --aurora-d: oklch(96% 0.03 300 / .5);

  /* El billete: degradado azul → violeta intenso con texto blanco, como el bloque de llamada a la acción del panel */
  --note-a: oklch(58% 0.22 calc(var(--module-h) - 6));
  --note-b: oklch(50% 0.25 min(calc(var(--module-h) + 40), 303));
  --note-c: oklch(64% 0.19 calc(var(--module-h) + 12));
  /* Billete por país (core/banknotes.js): luminosidad de sus tres tonos y fuerza de la marca de agua */
  --note-l1: 58%; --note-l2: 49%; --note-l3: 66%; --note-c1: .22; --note-c2: .25; --note-c3: .19; --motif-opacity: .3;
  --motif-ink: #ffffff;
  --art-l: 80%; --art-o: .6; --snow-o: .8;
  --note-ink: #ffffff;
  --note-muted: rgba(255, 255, 255, .8);
  --note-track: rgba(255, 255, 255, .24);
  --note-frame: rgba(255, 255, 255, .28);
  --note-contrast: oklch(28% 0.14 var(--module-h));
  --note-guilloche: .2;
  --note-figure-shadow: 0 2px 14px rgba(20, 20, 120, .25);
  --note-fill: linear-gradient(90deg, #ffffff, #d9e6ff);
  --note-fill-warn: linear-gradient(90deg, #ffe08a, #ffb454);
  --note-fill-over: linear-gradient(90deg, #ffb09e, #ff7a8a);
  --note-glow: 0 24px 50px -22px oklch(50% 0.24 var(--module-h) / .75), 0 0 0 1px rgba(255, 255, 255, .5), 0 0 60px -18px oklch(65% 0.2 var(--module-h) / .6);
  --note-glow-hover: 0 30px 60px -22px oklch(50% 0.24 var(--module-h) / .85), 0 0 0 1px rgba(255, 255, 255, .7), 0 0 80px -16px oklch(65% 0.2 var(--module-h) / .75);
  --note-negative: #ffd2c8;
  --note-alert-bg: rgba(255, 255, 255, .2);
  --note-alert-ink: #ffffff;
  --holo-blend: screen;
  --holo-opacity: .45;

  /* Avisos flotantes */
  --toast-bg: rgba(255, 255, 255, .94);
  --toast-ink: #0f172a;

  /* Medidores */
  --meter-a: oklch(66% 0.2 var(--module-h));
  --meter-b: oklch(62% 0.22 min(calc(var(--module-h) + 45), 303));

  /* Semánticos */
  --positive: #15803d;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn-text: #8a5700;
  --warn-soft: #fdf3dc;
  --status-warn: #f5a524;
  --status-bad: #e5484d;

  /* Gráficos (paleta validada para daltonismo y contraste) */
  --series-income: #2a78d6;
  --series-expense: #eb6834;
  --series-muted: #8b938e;
  --grid: rgba(15, 23, 42, .07);
  --axis: rgba(15, 23, 42, .2);
  --delta-good: #15803d;
  --delta-bad: #b42318;

  /* Fichas de categoría: el tono viene de cada categoría, la luz del tema */
  --tile-l: 95%;
  --tile-c: 0.06;
  --tile-ink-l: 50%;
  --tile-ink-c: 0.14;

  /* Tipografía */
  --font-ui: "Archivo", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Chivo Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --wide: 118%;

  /* Forma y profundidad */
  --r-card: 16px;
  --r-ctrl: 10px;
  --r-tile: 11px;
  --shadow-card: 0 4px 24px rgba(0, 96, 255, .08);
  --shadow-pop: 0 24px 60px rgba(15, 23, 42, .18);
  --spring: cubic-bezier(.3, 1.4, .5, 1);
  --sidebar-w: 256px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a0e17;
    --surface: #111827;
    --surface-2: #161f30;
    --surface-3: #1e2a3f;
    --glass: rgba(17, 24, 39, .72);
    --ink: #f8fafc;
    --ink-2: #cbd5e1;
    --muted: #94a3b8;
    --line: rgba(255, 255, 255, .1);
    --line-strong: rgba(255, 255, 255, .2);
    --brand: oklch(76% 0.16 var(--module-h));
    --brand-strong: oklch(84% 0.13 var(--module-h));
    --brand-soft: oklch(30% 0.09 var(--module-h));
    --on-brand: #ffffff;
    --grad-brand: linear-gradient(135deg, oklch(60% 0.22 calc(var(--module-h) - 8)) 0%, oklch(52% 0.25 min(calc(var(--module-h) + 42), 303)) 100%);
    --glow-brand: 0 10px 24px -10px oklch(60% 0.22 var(--module-h) / .8), 0 0 18px -6px oklch(66% 0.2 var(--module-h) / .5);
    --glow-brand-strong: 0 16px 36px -10px oklch(60% 0.22 var(--module-h) / .85), 0 0 0 1px oklch(70% 0.18 var(--module-h) / .55), 0 0 26px -6px oklch(66% 0.2 var(--module-h) / .6);
    --ring: 0 0 0 4px oklch(70% 0.16 var(--module-h) / .32);
    --grad-expense: linear-gradient(135deg, #ffa98c 0%, #ff85a2 100%);
    --on-expense: #3d1208;
    --glow-expense: 0 8px 20px -12px rgba(255, 130, 110, .45);
    --aurora-a: oklch(40% 0.14 var(--module-h) / .38);
    --aurora-b: oklch(36% 0.13 300 / .4);
    --aurora-c: oklch(40% 0.1 220 / .2);
    --aurora-d: oklch(34% 0.1 300 / .24);
    --note-a: oklch(48% 0.21 calc(var(--module-h) - 6));
    --note-b: oklch(38% 0.22 min(calc(var(--module-h) + 40), 303));
    --note-c: oklch(54% 0.18 calc(var(--module-h) + 12));
    --note-l1: 48%; --note-l2: 38%; --note-l3: 54%; --note-c1: .21; --note-c2: .22; --note-c3: .18; --motif-opacity: .3;
    --motif-ink: #ffffff;
    --art-l: 76%; --art-o: .7; --snow-o: .75;
    --note-ink: #ffffff;
    --note-muted: rgba(255, 255, 255, .78);
    --note-track: rgba(255, 255, 255, .2);
    --note-frame: rgba(255, 255, 255, .2);
    --note-contrast: oklch(24% 0.12 var(--module-h));
    --note-guilloche: .18;
    --note-figure-shadow: 0 2px 16px rgba(60, 40, 255, .3);
    --note-fill: linear-gradient(90deg, #ffffff, #d9e6ff);
    --note-fill-warn: linear-gradient(90deg, #ffe08a, #ffb454);
    --note-fill-over: linear-gradient(90deg, #ffb09e, #ff7a8a);
    --note-glow: 0 30px 60px -28px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .14), 0 0 56px -16px oklch(58% 0.22 var(--module-h) / .6);
    --note-glow-hover: 0 36px 70px -28px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .22), 0 0 74px -14px oklch(62% 0.22 var(--module-h) / .75);
    --note-negative: #ffc9bd;
    --note-alert-bg: rgba(255, 138, 112, .22);
    --note-alert-ink: #ffd6cc;
    --holo-blend: screen;
    --holo-opacity: .4;
    --toast-bg: rgba(17, 24, 39, .96);
    --toast-ink: #f8fafc;
    --meter-a: oklch(72% 0.17 var(--module-h));
    --meter-b: oklch(66% 0.22 min(calc(var(--module-h) + 45), 303));
    --positive: #2ee59d;
    --danger: #ff6b78;
    --danger-soft: #3a1218;
    --warn-text: #f2bc55;
    --warn-soft: #34270d;
    --series-income: #3987e5;
    --series-expense: #d95926;
    --series-muted: #7f8896;
    --grid: rgba(255, 255, 255, .07);
    --axis: rgba(255, 255, 255, .2);
    --delta-good: #2ee59d;
    --delta-bad: #ff6b78;
    --tile-l: 32%;
    --tile-c: 0.08;
    --tile-ink-l: 87%;
    --tile-ink-c: 0.13;
    --shadow-card: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 36px -20px rgba(0, 0, 0, .75);
    --shadow-pop: 0 24px 60px rgba(0, 0, 0, .65);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0a0e17;
  --surface: #111827;
  --surface-2: #161f30;
  --surface-3: #1e2a3f;
  --glass: rgba(17, 24, 39, .72);
  --ink: #f8fafc;
  --ink-2: #cbd5e1;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .2);
  --brand: oklch(76% 0.16 var(--module-h));
  --brand-strong: oklch(84% 0.13 var(--module-h));
  --brand-soft: oklch(30% 0.09 var(--module-h));
  --on-brand: #ffffff;
  --grad-brand: linear-gradient(135deg, oklch(60% 0.22 calc(var(--module-h) - 8)) 0%, oklch(52% 0.25 min(calc(var(--module-h) + 42), 303)) 100%);
  --glow-brand: 0 10px 24px -10px oklch(60% 0.22 var(--module-h) / .8), 0 0 18px -6px oklch(66% 0.2 var(--module-h) / .5);
  --glow-brand-strong: 0 16px 36px -10px oklch(60% 0.22 var(--module-h) / .85), 0 0 0 1px oklch(70% 0.18 var(--module-h) / .55), 0 0 26px -6px oklch(66% 0.2 var(--module-h) / .6);
  --ring: 0 0 0 4px oklch(70% 0.16 var(--module-h) / .32);
  --grad-expense: linear-gradient(135deg, #ffa98c 0%, #ff85a2 100%);
  --on-expense: #3d1208;
  --glow-expense: 0 8px 20px -12px rgba(255, 130, 110, .45);
  --aurora-a: oklch(40% 0.14 var(--module-h) / .38);
  --aurora-b: oklch(36% 0.13 300 / .4);
  --aurora-c: oklch(40% 0.1 220 / .2);
  --aurora-d: oklch(34% 0.1 300 / .24);
  --note-a: oklch(48% 0.21 calc(var(--module-h) - 6));
  --note-b: oklch(38% 0.22 min(calc(var(--module-h) + 40), 303));
  --note-c: oklch(54% 0.18 calc(var(--module-h) + 12));
  --note-l1: 48%; --note-l2: 38%; --note-l3: 54%; --note-c1: .21; --note-c2: .22; --note-c3: .18; --motif-opacity: .3;
  --motif-ink: #ffffff;
  --art-l: 76%; --art-o: .7; --snow-o: .75;
  --note-ink: #ffffff;
  --note-muted: rgba(255, 255, 255, .78);
  --note-track: rgba(255, 255, 255, .2);
  --note-frame: rgba(255, 255, 255, .2);
  --note-contrast: oklch(24% 0.12 var(--module-h));
  --note-guilloche: .18;
  --note-figure-shadow: 0 2px 16px rgba(60, 40, 255, .3);
  --note-fill: linear-gradient(90deg, #ffffff, #d9e6ff);
  --note-fill-warn: linear-gradient(90deg, #ffe08a, #ffb454);
  --note-fill-over: linear-gradient(90deg, #ffb09e, #ff7a8a);
  --note-glow: 0 30px 60px -28px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .14), 0 0 56px -16px oklch(58% 0.22 var(--module-h) / .6);
  --note-glow-hover: 0 36px 70px -28px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .22), 0 0 74px -14px oklch(62% 0.22 var(--module-h) / .75);
  --note-negative: #ffc9bd;
  --note-alert-bg: rgba(255, 138, 112, .22);
  --note-alert-ink: #ffd6cc;
  --holo-blend: screen;
  --holo-opacity: .4;
  --toast-bg: rgba(17, 24, 39, .96);
  --toast-ink: #f8fafc;
  --meter-a: oklch(72% 0.17 var(--module-h));
  --meter-b: oklch(66% 0.22 min(calc(var(--module-h) + 45), 303));
  --positive: #2ee59d;
  --danger: #ff6b78;
  --danger-soft: #3a1218;
  --warn-text: #f2bc55;
  --warn-soft: #34270d;
  --series-income: #3987e5;
  --series-expense: #d95926;
  --series-muted: #7f8896;
  --grid: rgba(255, 255, 255, .07);
  --axis: rgba(255, 255, 255, .2);
  --delta-good: #2ee59d;
  --delta-bad: #ff6b78;
  --tile-l: 32%;
  --tile-c: 0.08;
  --tile-ink-l: 87%;
  --tile-ink-c: 0.13;
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 36px -20px rgba(0, 0, 0, .75);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, .65);
  color-scheme: dark;
}

/* ============ Base y fondo ============ */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Aurora: manchas de color muy difuminadas que se mueven lento detrás de todo */
body::before {
  content: ""; position: fixed; inset: -18vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 32vmax at 20% 14%, var(--aurora-a), transparent 70%),
    radial-gradient(34vmax 28vmax at 88% 10%, var(--aurora-b), transparent 70%),
    radial-gradient(40vmax 34vmax at 80% 92%, var(--aurora-c), transparent 70%),
    radial-gradient(30vmax 26vmax at 10% 88%, var(--aurora-d), transparent 70%);
  animation: aurora 36s ease-in-out infinite alternate;
}
@keyframes aurora { to { transform: translate3d(3vmax, -2vmax, 0) rotate(7deg) scale(1.06); } }

a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-size: 15.5px; font-weight: 700; font-stretch: 108%; letter-spacing: -.005em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon { flex: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 12px; }

/* Rótulo en mono, como la letra chica de una boleta */
.micro {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ============ Botones ============ */

button, .btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; line-height: 1.2; letter-spacing: .005em;
  border: 0; border-radius: var(--r-ctrl); padding: 10px 16px; cursor: pointer;
  background: none; color: inherit; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--spring), box-shadow .3s ease, background-color .2s ease, color .2s ease, filter .2s ease;
}
button:disabled { opacity: .38; cursor: default; }
button:active:not(:disabled) { transform: translateY(1px) scale(.97); }

/* Principal: degradado con brillo de neón y un destello que lo cruza */
.btn, button[type="submit"]:not(.danger-solid) {
  background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand);
}
.btn:hover, button[type="submit"]:not(.danger-solid):hover:not(:disabled) {
  transform: translateY(-2px); box-shadow: var(--glow-brand-strong); filter: saturate(1.2) brightness(1.05);
}
.btn::after, button[type="submit"]::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-130%); transition: transform .75s ease;
}
.btn:hover::after, button[type="submit"]:hover:not(:disabled)::after { transform: translateX(130%); }

button.secondary { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
button.secondary:hover:not(:disabled) {
  transform: translateY(-1px); color: var(--brand-strong);
  box-shadow: inset 0 0 0 1px var(--brand), 0 8px 20px -10px oklch(55% 0.16 var(--module-h) / .7);
}
button.danger { color: var(--danger); box-shadow: inset 0 0 0 1px currentColor; }
button.danger:hover:not(:disabled) { background: var(--danger-soft); box-shadow: inset 0 0 0 1px currentColor, 0 8px 22px -10px rgba(208, 59, 59, .7); }
button.danger-solid { background: linear-gradient(135deg, #e5484d, #c2305e); color: #fff; box-shadow: 0 10px 24px -10px rgba(208, 59, 59, .8); }
button.danger-solid:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(208, 59, 59, .95); }

.ghost-btn { color: var(--ink-2); padding: 6px 11px; font-size: 13px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.ghost-btn:hover:not(:disabled) {
  color: var(--brand-strong); background: var(--brand-soft); transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px oklch(60% 0.12 var(--module-h) / .5), 0 6px 18px -8px oklch(55% 0.16 var(--module-h) / .6);
}

.link-btn {
  color: var(--brand); padding: 4px 2px; font-size: 14px; border-radius: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .3s ease, color .2s ease;
}
.link-btn:hover:not(:disabled) { background-size: 100% 1.5px; }

.icon-btn { width: 38px; height: 38px; padding: 0; color: var(--ink-2); }
a.icon-btn { display: inline-grid; place-items: center; border-radius: var(--r-ctrl); text-decoration: none; transition: background-color .2s ease, color .2s ease, box-shadow .25s ease; }
.icon-btn:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand-strong); box-shadow: 0 0 18px -6px oklch(60% 0.16 var(--module-h) / .7); }
.icon-btn.bordered { background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-strong); }
.icon-btn.bordered:hover:not(:disabled) { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand), 0 0 18px -6px oklch(60% 0.16 var(--module-h) / .7); }
.icon-btn[data-action="month-prev"]:hover:not(:disabled) .icon { transform: translateX(-2px); }
.icon-btn[data-action="month-next"]:hover:not(:disabled) .icon { transform: translateX(2px); }
.icon-btn .icon { transition: transform .25s var(--spring); }

/* Onda al hacer clic (la crea core/fx.js) */
.ripple {
  position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .22; transform: scale(0); animation: ripple .6s ease-out forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ============ Campos ============ */

input, select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-ctrl); padding: 10px 12px; min-width: 0;
  transition: border-color .2s ease, box-shadow .25s ease;
}
input::placeholder { color: var(--muted); }
input:hover, select:hover { border-color: oklch(60% 0.08 var(--module-h) / .6); }
input:focus, select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: var(--ring), 0 0 24px -8px oklch(62% 0.16 var(--module-h) / .6);
}

.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select { font-size: 15px; font-weight: 400; width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ============ Control segmentado con indicador que se desliza ============ */

.segmented {
  --n: 2; --i: 0;
  position: relative; isolation: isolate;
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; margin: 0; border: 0; border-radius: 12px;
  background: var(--surface-3); box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
}
.segmented:has(> :nth-child(3)) { --n: 3; }
.segmented:has(> :nth-child(2)[aria-checked="true"]),
.segmented:has(> :nth-child(2) input:checked) { --i: 1; }
.segmented:has(> :nth-child(3)[aria-checked="true"]),
.segmented:has(> :nth-child(3) input:checked) { --i: 2; }
.segmented::before {
  content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px) / var(--n)); border-radius: 9px;
  background: var(--surface); box-shadow: 0 1px 3px rgba(15, 23, 42, .16), 0 0 0 1px var(--line);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform .42s var(--spring), background .3s ease, box-shadow .3s ease;
}
.segmented > button,
.segmented > label > span {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--ink-2); box-shadow: none; cursor: pointer; text-align: center;
  transition: color .25s ease;
}
.segmented > button:hover:not(:disabled) { color: var(--ink); transform: none; }
.segmented > button[aria-checked="true"],
.segmented input:checked + span { color: var(--ink); }
.segmented > label { position: relative; display: grid; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); }
.segmented.small > button { padding: 5px 11px; font-size: 12px; }
.segmented.wide { display: grid; width: 100%; }

/* Gasto / Ingreso: el indicador toma el color del tipo elegido */
.segmented.tone::before { background: var(--grad-expense); box-shadow: var(--glow-expense); }
.segmented.tone:has(> [data-value="income"][aria-checked="true"])::before,
.segmented.tone:has(input[value="income"]:checked)::before { background: var(--grad-brand); box-shadow: var(--glow-brand); }
.segmented.tone > [data-value="expense"][aria-checked="true"],
.segmented.tone input[value="expense"]:checked + span { color: var(--on-expense); }
.segmented.tone > [data-value="income"][aria-checked="true"],
.segmented.tone input[value="income"]:checked + span { color: var(--on-brand); }

/* ============ Armazón ============ */

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-w);
  display: flex; flex-direction: column; gap: 6px; padding: 22px 16px 16px;
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-right: 1px solid var(--line); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.brand-mark {
  display: block; width: 38px; height: 38px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 8px 22px -10px oklch(55% 0.24 var(--module-h) / .7);
  transition: transform .4s var(--spring);
}
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
/* El nombre es el logotipo oficial (tumi-wordmark.png), no una tipografía: se pinta con el color del texto de cada tema. */
.brand-name {
  display: block; width: 58px; height: 25px; background: var(--ink);
  -webkit-mask: url(tumi-wordmark.png) left center / contain no-repeat; mask: url(tumi-wordmark.png) left center / contain no-repeat;
}
/* El mismo logotipo dentro de una línea de texto: del color del texto que lo rodea. */
.brand-inline { display: inline-block; width: 36px; height: 15px; vertical-align: -3px; background: currentColor; }

.nav-label { margin: 0 10px 8px; color: var(--muted); }
.nav-label-system { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.nav { display: grid; gap: 4px; }
.nav-module-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px;
  color: var(--ink); font-weight: 650; text-decoration: none; transition: background-color .2s ease;
}
a.nav-module-link:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.module-icon {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: oklch(var(--tile-l) var(--tile-c) var(--mh)); color: oklch(var(--tile-ink-l) var(--tile-ink-c) var(--mh));
  box-shadow: 0 6px 14px -8px oklch(60% 0.16 var(--mh) / .8);
}
.nav-sections { list-style: none; margin: 4px 0 10px 24px; padding: 0 0 0 12px; display: grid; gap: 3px; border-left: 1px solid var(--line-strong); }
.nav-module:not(.is-active) .nav-sections { display: none; }
.nav-sections a {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 10px;
  color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; position: relative;
  transition: background-color .2s ease, color .2s ease, transform .25s var(--spring), box-shadow .3s ease;
}
.nav-sections a:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); transform: translateX(3px); }
.nav-sections a[aria-current="page"] {
  background: var(--grad-brand); color: var(--on-brand); font-weight: 650; box-shadow: var(--glow-brand);
}
.nav-sections a[aria-current="page"]:hover { transform: none; }
.nav-module.is-soon .nav-module-link { color: var(--muted); font-weight: 600; cursor: default; }
.soon { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: color-mix(in oklch, oklch(var(--tile-l) var(--tile-c) var(--mh)), transparent 10%); color: oklch(var(--tile-ink-l) var(--tile-ink-c) var(--mh)); font-size: 10px; }
.nav-module.is-soon { --mh: 160; }

.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.nav-foot-btn { width: 100%; justify-content: flex-start; gap: 10px; padding: 9px 10px; color: var(--ink-2); font-weight: 500; }
.nav-foot-btn:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand-strong); }
.nav-foot-btn:hover:not(:disabled) .icon { transform: rotate(-20deg); }
.nav-foot-btn .icon { transition: transform .4s var(--spring); }
/* Interruptor de encendido/apagado (modo oscuro, ocultar montos) */
.switch {
  position: relative; flex: none; width: 36px; height: 21px; margin-left: auto; border-radius: 999px;
  background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background .3s ease, box-shadow .3s ease;
}
.switch::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .35s var(--spring);
}
[aria-checked="true"] > .switch { background: var(--grad-brand); box-shadow: var(--glow-brand); }
[aria-checked="true"] > .switch::after { transform: translateX(15px); }

.main-col { margin-left: var(--sidebar-w); min-width: 0; }
.view {
  max-width: 1180px; margin: 0 auto; padding: 30px 36px 110px; /* abajo, espacio para el botón flotante */
  display: grid; gap: 18px; container-type: inline-size;
}
.mobile-bar, .bottom-nav, .scrim { display: none; }
/* Botón flotante "+" (registro rápido): siempre a mano, en todas las secciones */
.fab {
  position: fixed; right: 28px; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); z-index: 19;
  width: 60px; height: 60px; padding: 0; border-radius: 20px;
  background: var(--grad-brand); color: var(--on-brand);
  box-shadow: var(--glow-brand-strong), 0 12px 28px -10px rgba(0, 0, 0, .45);
  transition: transform .3s var(--spring), box-shadow .3s ease, border-radius .3s ease;
}
.fab:hover:not(:disabled) { transform: translateY(-3px) rotate(90deg); border-radius: 50%; }
.fab:active:not(:disabled) { transform: scale(.94); }
body.menu-open .fab { opacity: 0; pointer-events: none; }
.quick-sheet-input { width: 100%; font-size: 18px; padding: 14px 16px; }
.quick-sheet-preview { min-height: 22px; }
.quick-sheet-more { justify-content: space-between; }

@media (max-width: 899px) {
  .sidebar { background: var(--surface); transform: translateX(-100%); transition: transform .3s var(--spring); box-shadow: var(--shadow-pop); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(8, 14, 32, .5); animation: fade .25s ease; }
  .main-col { margin-left: 0; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; padding: 8px 10px;
    background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--line);
  }
  .mobile-title { display: flex; align-items: center; gap: 8px; font-weight: 750; font-stretch: 110%; }
  .view { padding: 18px 16px calc(150px + env(safe-area-inset-bottom, 0px)); }
  .fab { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(var(--n), 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-top: 1px solid var(--line);
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0;
    font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none;
  }
  .bottom-nav a .icon {
    width: 48px; height: 30px; padding: 4px 13px; border-radius: 999px; box-sizing: border-box;
    transition: background .25s ease, box-shadow .3s ease, transform .3s var(--spring);
  }
  .bottom-nav a[aria-current="page"] { color: var(--ink); }
  .bottom-nav a[aria-current="page"] .icon { background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand); transform: translateY(-2px); }
}
@keyframes fade { from { opacity: 0; } }

/* ============ Encabezado de página ============ */

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 18px; flex-wrap: wrap; }
.eyebrow { display: flex; gap: 10px; align-items: center; margin: 0 0 6px; color: var(--brand); }
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 0 oklch(65% 0.16 var(--module-h) / .6); animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 7px oklch(65% 0.16 var(--module-h) / 0); } 100% { box-shadow: 0 0 0 0 oklch(65% 0.16 var(--module-h) / 0); } }
.eyebrow-meta { color: var(--muted); }
.eyebrow-meta::before { content: "·"; margin-right: 10px; color: var(--line-strong); }
.page-head h1 {
  font-size: clamp(26px, 4.2cqi, 36px); font-weight: 800; font-stretch: var(--wide); letter-spacing: -.02em; line-height: 1.05;
  background: linear-gradient(100deg, var(--ink) 35%, var(--brand) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-sub { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============ Tarjetas de vidrio y composición ============ */

.card {
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.35); -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px; box-shadow: var(--shadow-card); min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.subhead { margin: 20px 0 6px; font-size: 14px; }

.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split.single { grid-template-columns: minmax(0, 1fr); }
@container (max-width: 880px) {
  .split, .split.even { grid-template-columns: minmax(0, 1fr); }
  .split > .first-when-stacked { order: -1; }
}

.note-box { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.note-box.warn { background: var(--warn-soft); color: var(--warn-text); }

.empty { display: grid; justify-items: center; gap: 8px; padding: 30px 12px; text-align: center; }
.empty-title { margin: 0; font-weight: 700; font-stretch: 108%; }
.empty .muted { margin: 0; max-width: 42ch; }

/* ============ El billete ============ */

.overview { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
@container (max-width: 760px) { .overview { grid-template-columns: minmax(0, 1fr); } }

.note {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-content: space-between; gap: 18px; min-height: 250px;
  padding: 22px 24px; border-radius: 20px; color: var(--note-ink);
  background:
    radial-gradient(90% 85% at 100% 0%, var(--note-c) 0%, transparent 62%),
    linear-gradient(135deg, var(--note-a) 0%, var(--note-b) 100%);
  box-shadow: var(--note-glow);
  transition: transform .5s var(--spring), box-shadow .4s ease;
}
.note:hover { transform: translateY(-3px); box-shadow: var(--note-glow-hover); }
/* Roseta guilloché (marca de agua) y marco interior, como en la impresión de seguridad */
.note::before {
  content: ""; position: absolute; z-index: -1; right: -130px; top: 50%; width: 460px; height: 460px;
  transform: translateY(-50%); background: var(--guilloche) center / contain no-repeat; opacity: var(--note-guilloche);
  animation: spin 160s linear infinite;
}
.note::after {
  content: ""; position: absolute; z-index: -1; inset: 8px; border-radius: 14px;
  border: 1px solid var(--note-frame); pointer-events: none;
}
/* Ventana holográfica, como la de los billetes de polímero */
.note-holo {
  position: absolute; z-index: -1; right: 64px; top: calc(50% - 38px); width: 76px; height: 76px; border-radius: 50%;
  background: conic-gradient(from 0deg, #7ef0c4, #7cc8ff, #c89bff, #ff9fd0, #ffd27a, #7ef0c4);
  opacity: var(--holo-opacity); mix-blend-mode: var(--holo-blend); filter: blur(.4px);
  box-shadow: 0 0 30px rgba(160, 240, 220, .35), inset 0 0 0 1px rgba(255, 255, 255, .6);
  animation: spin 14s linear infinite; transition: opacity .4s ease;
}
.note:hover .note-holo { opacity: calc(var(--holo-opacity) + .2); }

/* Billete del país (core/banknotes.js): paleta propia, marca de agua dibujada, hilo de seguridad y microtexto */
.note[data-country], .specimen[data-country] {
  --note-a: oklch(var(--note-l1) calc(var(--note-c1) * var(--nk)) var(--nh1));
  --note-b: oklch(var(--note-l2) calc(var(--note-c2) * var(--nk)) var(--nh2));
  --note-c: oklch(var(--note-l3) calc(var(--note-c3) * var(--nk)) var(--nh3));
  background:
    radial-gradient(90% 85% at 100% 0%, var(--note-c) 0%, transparent 62%),
    radial-gradient(70% 90% at 0% 100%, color-mix(in oklch, var(--note-b) 55%, transparent) 0%, transparent 70%),
    linear-gradient(135deg, var(--note-a) 0%, var(--note-b) 100%);
  transition: transform .5s var(--spring), box-shadow .4s ease, background .6s ease;
}
.note-motif {
  position: absolute; z-index: -1; right: 4%; bottom: 6px; width: min(62%, 360px); height: auto;
  color: var(--motif-ink, var(--note-ink)); pointer-events: none;
  /* Se desvanece hacia la izquierda para no competir con las cifras y los textos */
  -webkit-mask: linear-gradient(90deg, transparent, #000 34%);
          mask: linear-gradient(90deg, transparent, #000 34%);
}
/* Viñeta de grabado: tinta en tres planos, rayado, colores del país y detalles */
.note-motif .s1 { fill: currentColor; fill-opacity: calc(var(--motif-opacity) * .45); }
.note-motif .s2 { fill: currentColor; fill-opacity: calc(var(--motif-opacity) * .8); }
.note-motif .s3 { fill: currentColor; fill-opacity: calc(var(--motif-opacity) * 1.35); }
.note-motif .h { opacity: calc(var(--motif-opacity) * 2); }
.note-motif .a1 { fill: oklch(var(--art-l) calc(.15 * var(--nk)) var(--nh1)); fill-opacity: var(--art-o); }
.note-motif .a2 { fill: oklch(var(--art-l) calc(.15 * var(--nk)) var(--nh2)); fill-opacity: var(--art-o); }
.note-motif .a3 { fill: oklch(var(--art-l) calc(.15 * var(--nk)) var(--nh3)); fill-opacity: var(--art-o); }
.note-motif .gold { fill: oklch(calc(var(--art-l) + 8%) .15 85); fill-opacity: var(--art-o); }
.note-motif .leaf { fill: oklch(var(--art-l) .13 148); fill-opacity: var(--art-o); }
.note-motif .sea { fill: oklch(var(--art-l) .11 228); fill-opacity: var(--art-o); }
.note-motif .snow { fill: #fff; fill-opacity: var(--snow-o); }
.note-motif .ln { stroke: currentColor; stroke-opacity: calc(var(--motif-opacity) * 2.4); stroke-width: 1.1; fill: none; }
.note-motif .ln-gold { stroke: oklch(calc(var(--art-l) - 4%) .15 80); stroke-opacity: calc(var(--art-o) + .15); stroke-width: 1.4; fill: none; }
.note-motif .ln-a1 { stroke: oklch(calc(var(--art-l) - 10%) calc(.15 * var(--nk)) var(--nh1)); stroke-opacity: var(--art-o); stroke-width: 1.4; fill: none; }
.note-motif .ln-a3 { stroke: oklch(calc(var(--art-l) - 10%) calc(.15 * var(--nk)) var(--nh3)); stroke-opacity: var(--art-o); stroke-width: 1.4; fill: none; }
.note-motif .txt { fill: currentColor; fill-opacity: .45; font: 600 9px/1 var(--font-mono); letter-spacing: 1px; }
.note-motif .glow-in { stop-color: oklch(calc(var(--art-l) + 10%) .1 var(--nh3)); stop-opacity: .45; }
.note-motif .glow-out { stop-color: oklch(calc(var(--art-l) + 10%) .1 var(--nh3)); stop-opacity: 0; }
.specimen .note-motif { width: min(58%, 260px); right: 2%; bottom: 2px; }
.note-thread {
  position: absolute; z-index: -1; top: 14px; bottom: 14px; right: 13px; width: 5px; pointer-events: none;
  background: var(--thread); opacity: .55; border-radius: 3px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--note-ink) 12%, transparent);
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 26px, transparent 26px 34px);
          mask: repeating-linear-gradient(180deg, #000 0 26px, transparent 26px 34px);
}
.note-micro {
  position: absolute; z-index: -1; left: 16px; right: 16px; bottom: 11px; overflow: hidden; white-space: nowrap;
  font: 600 6.5px/1 var(--font-mono); letter-spacing: .14em; color: var(--note-ink); opacity: .32; pointer-events: none;
}
.specimen .note-micro { bottom: 8px; left: 12px; right: 12px; }
.specimen .note-thread { top: 10px; bottom: 10px; right: 10px; width: 4px; }
@keyframes spin { from { rotate: 0deg; } to { rotate: 360deg; } }

.note-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.note .micro { color: var(--note-muted); }
.note-figure {
  font-size: clamp(40px, 7.4cqi, 64px); font-weight: 800; font-stretch: 125%; line-height: .95;
  letter-spacing: -.03em; font-variant-numeric: lining-nums; text-shadow: var(--note-figure-shadow); white-space: nowrap;
}
.note-figure.negative { color: var(--note-negative); }
.note-caption { margin: 8px 0 0; color: var(--note-muted); font-size: 14px; max-width: 42ch; }
.note-caption strong { color: var(--note-ink); font-weight: 650; }
.note-alert {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--note-alert-bg); color: var(--note-alert-ink); font-weight: 600;
}
.note-link { color: var(--note-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.note-link .icon { transition: transform .3s var(--spring); }
.note-link:hover .icon { transform: translateX(4px); }
.note-meter { position: relative; height: 8px; border-radius: 999px; background: var(--note-track); }
.note-meter-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: inherit;
  background: var(--note-fill); box-shadow: 0 0 14px -2px oklch(70% 0.15 var(--module-h) / .7);
}
.note-meter-fill.warn { background: var(--note-fill-warn); box-shadow: 0 0 14px -2px rgba(245, 165, 36, .8); }
.note-meter-fill.over { background: var(--note-fill-over); box-shadow: 0 0 14px -2px rgba(240, 90, 110, .8); }
/* Marca del ritmo ideal: línea con contorno de contraste, visible sobre cualquier relleno */
.note-meter-pace {
  position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; border-radius: 2px;
  background: var(--note-ink); box-shadow: 0 0 0 1.5px var(--note-contrast);
}
.note-denom { display: flex; align-items: baseline; gap: 8px; }
.note-denom strong { font-size: 18px; font-weight: 800; font-stretch: 118%; }
.note-breakdown { justify-content: flex-start; gap: 6px 22px; }
.note-own {
  margin: 0; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px;
  padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--note-ink) 30%, transparent);
}
.note-own strong { font-size: 15px; font-weight: 750; }
.note-own strong.negative { color: var(--note-negative); }
.pace-key { display: inline-block; width: 3px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 1px; background: var(--note-ink); box-shadow: 0 0 0 1.5px var(--note-contrast); }

/* ============ Resumen tipo cartola ============ */

.ledger { display: grid; align-content: start; gap: 0; padding: 20px 22px; }
.ledger-title { margin-bottom: 8px; }
.ledger-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.ledger-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ledger-label { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink-2); }
.ledger-value { font-family: var(--font-mono); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.ledger-foot { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
/* Doble línea contable sobre el total */
.ledger-row.total { border-top: 3px double var(--line-strong); margin-top: -1px; }
.ledger-row.total .ledger-label { color: var(--ink); font-weight: 750; }
.ledger-row.total .ledger-value { font-size: 21px; font-weight: 700; }
.ledger-value.positive { color: var(--positive); }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; box-shadow: 0 0 10px -1px var(--c); }

/* ============ Tira de indicadores ============ */

/* Botón de cuenta (barra de celular y menú lateral): el punto dice si lo tuyo está guardado. */
.account-btn { position: relative; }
.account-avatar { position: relative; display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); }
.account-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--surface); box-sizing: border-box; }
.account-btn .account-dot { right: 5px; bottom: 5px; border-color: var(--bg, var(--surface)); }
.account-dot[data-dot="ok"] { background: var(--brand); }
.account-dot[data-dot="pending"] { background: var(--warn-text); }
.account-dot[data-dot="none"] { display: none; }
.account-foot { margin-bottom: 4px; align-items: center; text-align: left; }
.account-text { display: grid; min-width: 0; line-height: 1.25; }
.account-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.account-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; color: var(--muted); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 0; overflow: hidden; }
.strip .stat { padding: 18px 20px; border-left: 1px solid var(--line); transition: background-color .3s ease; }
.strip .stat:hover { background: color-mix(in srgb, var(--brand-soft) 50%, transparent); }
.strip .stat:first-child { border-left: 0; }
@container (max-width: 720px) {
  .strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip .stat:nth-child(odd) { border-left: 0; }
  .strip .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  /* Si quedan en número impar, la última ocupa toda la fila en vez de dejar un hueco. */
  .strip .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* Celulares muy angostos: una cifra por fila, para no achicarlas hasta que no se lean. */
@container (max-width: 300px) {
  .strip { grid-template-columns: minmax(0, 1fr); }
  .strip .stat { border-left: 0; }
  .strip .stat + .stat { border-top: 1px solid var(--line); }
}
.stat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-content: start; min-width: 0; }
.stat-label { font-size: 13px; font-weight: 500; color: var(--muted); }
/* Una cifra nunca se parte en dos líneas: si no cabe, core/fx.js (fitFigures) achica la letra. */
.stat-value { font-size: clamp(19px, 2.6cqi, 26px); font-weight: 750; font-stretch: 112%; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.stat-foot { font-size: 12.5px; color: var(--muted); }
.delta { font-weight: 650; }
.delta.good { color: var(--delta-good); }
.delta.bad { color: var(--delta-bad); }
.delta.flat { color: var(--muted); }

/* ============ Selector de mes ============ */

.month-nav { display: flex; align-items: center; gap: 6px; }
.month-label { min-width: 164px; text-align: center; font-weight: 700; font-stretch: 108%; }
@media (max-width: 560px) {
  .page-actions, .month-nav { width: 100%; }
  .month-label { min-width: 0; flex: 1; }
}

/* ============ Registro rápido ============ */

.composer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.composer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.composer-label { font-size: 15.5px; font-weight: 700; font-stretch: 108%; }
.composer-row { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
/* width: 0 para que el ancho propio del campo no empuje el botón fuera de la tarjeta en celulares angostos */
.composer-row input { flex: 1 1 0; width: 0; min-width: 0; font-size: 16px; padding: 12px 14px; }
.composer-row button[type="submit"] { flex: none; padding-inline: 18px; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
/* ---------- Tarjetas de crédito (js/modules/finanzas/cardface.js) ---------- */
/* Un plástico de verdad: relación 85,6 × 54 mm, degradado, brillo diagonal, chip dorado y el número con relieve.
   Los colores son los de la tarjeta, iguales en modo claro y oscuro (como en la app del banco). */
.credit-card {
  --cc-a: #0a78ff; --cc-b: #5b2bff; --cc-c: #7a1fff; --cc-ink: #fff;
  container-type: inline-size; position: relative; width: 100%; max-width: 380px; aspect-ratio: 1.586; border-radius: 5.2cqi; overflow: hidden;
  color: var(--cc-ink); isolation: isolate;
  background: linear-gradient(135deg, var(--cc-a) 0%, var(--cc-b) 58%, var(--cc-c) 100%);
  box-shadow: 0 22px 34px -22px rgba(10, 12, 40, .7), 0 6px 14px -6px rgba(10, 12, 40, .35), inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .5s var(--spring), box-shadow .4s ease;
}
@supports not (border-radius: 1cqi) { .credit-card { border-radius: 18px; } }
.credit-card:hover { transform: translateY(-3px) rotate(-.4deg); }
/* Brillo del plástico (sin dibujos de fondo: solo el reflejo de la luz) */
.credit-card::after {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .06) 34%, transparent 46%, rgba(255, 255, 255, .1) 70%, transparent 82%),
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .18), transparent 60%);
}
.cc-in { display: flex; flex-direction: column; height: 100%; padding: 6.4cqi 7cqi 5.6cqi; }
.cc-top { display: flex; align-items: center; justify-content: space-between; gap: 3cqi; }
.cc-bank { font-size: 4.2cqi; font-weight: 750; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-nfc { flex: none; width: 7.4cqi; height: 7.4cqi; opacity: .9; }
/* Chip a la izquierda y, si se sabe, lo que debes a la derecha (como en la app del banco) */
.cc-mid { display: flex; align-items: center; justify-content: space-between; gap: 4cqi; margin-top: 6cqi; }
.cc-balance { display: grid; justify-items: end; gap: .6cqi; text-align: right; min-width: 0; }
.cc-label { font-family: var(--font-mono); font-size: 2.7cqi; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.cc-amount { font-family: var(--font-mono); font-size: 7.2cqi; font-weight: 700; letter-spacing: -.01em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: 0 .3cqi 1.2cqi rgba(0, 0, 0, .3); }
.cc-avail { font-size: 3.1cqi; opacity: .88; white-space: nowrap; }
/* El chip: placa dorada con sus contactos */
.cc-chip {
  position: relative; flex: none; width: 13.5cqi; aspect-ratio: 1.3; border-radius: 1.8cqi;
  background: linear-gradient(135deg, #f6e7ae 0%, #d9b45c 45%, #f1d98b 70%, #b98f3c 100%);
  box-shadow: inset 0 0 0 .35cqi rgba(70, 45, 0, .35), 0 .6cqi 1.4cqi rgba(0, 0, 0, .25);
}
.cc-chip::before, .cc-chip::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cc-chip::before { background: linear-gradient(90deg, transparent 31%, rgba(70, 45, 0, .38) 31% 33%, transparent 33% 67%, rgba(70, 45, 0, .38) 67% 69%, transparent 69%); }
.cc-chip::after { background: linear-gradient(0deg, transparent 31%, rgba(70, 45, 0, .38) 31% 33%, transparent 33% 67%, rgba(70, 45, 0, .38) 67% 69%, transparent 69%); }
.cc-number {
  margin-top: auto; font-family: var(--font-mono); font-size: 6.1cqi; font-weight: 600; letter-spacing: .11em; white-space: nowrap;
  text-shadow: 0 .25cqi 0 rgba(0, 0, 0, .28), 0 -.2cqi 0 rgba(255, 255, 255, .22);
}
.cc-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 3cqi; margin-top: 3.4cqi; min-height: 8cqi; }
.cc-holder { font-size: 3.7cqi; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Redes: logos dibujados */
.cc-net { flex: none; line-height: 1; }
.cc-visa { font: italic 900 7.4cqi/1 "Segoe UI", system-ui, sans-serif; letter-spacing: -.02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.cc-mc { display: inline-flex; align-items: center; }
.cc-mc i { width: 7.6cqi; aspect-ratio: 1; border-radius: 50%; background: #eb001b; opacity: .95; }
.cc-mc i + i { margin-left: -3.2cqi; background: #f79e1b; mix-blend-mode: screen; opacity: .95; }
.cc-amex { font: 800 2.7cqi/1.15 "Segoe UI", system-ui, sans-serif; letter-spacing: .06em; text-align: center; padding: 1.2cqi 1.6cqi; border: .4cqi solid currentColor; border-radius: .9cqi; }
/* Colores */
.cc-azul { --cc-a: #1a8cff; --cc-b: #3b3cff; --cc-c: #7a1fff; }
.cc-noche { --cc-a: #1e2c63; --cc-b: #0f1735; --cc-c: #0a0e23; }
.cc-grafito { --cc-a: #5a6170; --cc-b: #353a45; --cc-c: #1f232b; }
.cc-violeta { --cc-a: #b050ff; --cc-b: #7a2ff0; --cc-c: #4a1fb8; }
.cc-esmeralda { --cc-a: #1fd0a0; --cc-b: #0d9b78; --cc-c: #06654f; }
.cc-coral { --cc-a: #ff8a5c; --cc-b: #ff4d7d; --cc-c: #c93072; }
@media (prefers-reduced-motion: reduce) { .credit-card, .credit-card:hover { transition: none; transform: none; } }
.debt.is-card .credit-card { margin: 2px 0 6px; }
/* Lo que debes ya se ve dentro de la tarjeta: debajo solo queda el aviso de vencimiento, si hay. */
.debt.is-card .debt-left { display: none; }
.debt.is-card .debt-figures:not(:has(.status)) { display: none; }
.card-preview { display: grid; justify-items: center; }
.card-preview .credit-card { max-width: 320px; }
.style-picks { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.style-pick { position: relative; cursor: pointer; }
.style-pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.style-pick span {
  display: block; width: 34px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--cc-a), var(--cc-c));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 2px 6px -2px rgba(0, 0, 0, .4); transition: transform .2s var(--spring);
}
.style-pick input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); transform: scale(1.08); }
.style-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }

/* "Pagado con": tu dinero o una tarjeta de crédito (lo de la tarjeta no baja el balance). */
.pay-with[hidden], .card-fields[hidden] { display: none; }
.composer .pay-with { max-width: 280px; margin: 2px 0 0; }
.card-fields { display: grid; gap: 10px; }

/* Vista previa como línea de boleta, con puntos guía hasta el monto */
.receipt { margin: 0; flex: 1 1 320px; min-width: 0; font-size: 13px; color: var(--muted); }
.receipt-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); animation: slide-in .3s var(--spring); }
.receipt-kind { flex: none; padding: 1px 8px; border-radius: 6px; background: var(--grad-expense); color: var(--on-expense); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; box-shadow: var(--glow-expense); }
.receipt-kind.income { background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand); }
.receipt-desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-leader { flex: 1; min-width: 16px; border-bottom: 1.5px dotted var(--line-strong); transform: translateY(-3px); }
.receipt-amount { flex: none; font-weight: 600; color: var(--ink); }
.receipt-amount.positive { color: var(--positive); }
@keyframes slide-in { from { opacity: .3; transform: translateY(3px); } }

/* Primeros pasos (Inicio, mientras no hay movimientos) */
.steps { list-style: none; margin: 0; padding: 0; }
.step {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step > div { display: grid; gap: 2px; }
.step strong { font-weight: 650; }
.step-n {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font: 700 13px/1 var(--font-mono); color: var(--brand-strong); background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px oklch(60% 0.12 var(--module-h) / .35);
}
.step.done .step-n { background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand); }
.step.done strong { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--ink-2); }
.step-text { font-size: 13px; color: var(--muted); }
.step-text em { font-style: normal; font-family: var(--font-mono); color: var(--ink-2); }
.welcome-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong);
}

/* ============ Movimientos ============ */

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.search { position: relative; flex: 1 1 200px; display: flex; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; transition: color .2s ease; }
.search:focus-within .icon { color: var(--brand); }
.search input { width: 100%; padding-left: 36px; }
.chips { display: flex; gap: 6px; margin: 8px 0 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 4px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-strong); font-size: 13px;
  box-shadow: inset 0 0 0 1px oklch(65% 0.1 var(--module-h) / .35), 0 0 16px -6px oklch(60% 0.16 var(--module-h) / .6);
  animation: slide-in .3s var(--spring);
}
.chip:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--brand), 0 0 20px -4px oklch(60% 0.16 var(--module-h) / .7); }

.day + .day { margin-top: 4px; }
.day-head {
  display: flex; align-items: baseline; gap: 10px; padding: 16px 0 6px;
  border-bottom: 1px solid var(--line); font: 500 11px/1.3 var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.day-name { color: var(--ink); font-weight: 600; }
.day-net { margin-left: auto; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.tx-list { list-style: none; margin: 0; padding: 0; }
.tx {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: calc(100% + 16px); margin: 0 -8px; padding: 9px 8px; border-radius: 12px;
  font-weight: 400; text-align: left;
}
.tx:hover:not(:disabled) {
  background: linear-gradient(90deg, oklch(var(--tile-l) calc(var(--tile-c) * var(--c, 1)) var(--h, 160) / .8), transparent 85%);
  transform: translateX(3px);
}
.tx:active:not(:disabled) { transform: translateX(3px) scale(.99); }
.tx-main { display: grid; min-width: 0; }
.tx-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amount { font-family: var(--font-mono); font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount.positive { color: var(--positive); }
.more { display: flex; justify-content: center; margin-top: 14px; }

/* Fichas de categoría: el tono sale de cada categoría y brillan al pasar el mouse */
.tile {
  --c: 1;
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: var(--r-tile);
  background: oklch(var(--tile-l) calc(var(--tile-c) * var(--c)) var(--h, 160));
  color: oklch(var(--tile-ink-l) calc(var(--tile-ink-c) * var(--c)) var(--h, 160));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .4s var(--spring), box-shadow .3s ease;
}
.tile.sm { width: 26px; height: 26px; border-radius: 8px; }
.tx:hover .tile, .bar-row:hover .tile, .budget-row:hover .tile, .integration:hover .tile {
  transform: scale(1.1) rotate(-6deg);
  box-shadow: 0 8px 20px -6px oklch(60% 0.17 var(--h, 160) / calc(.8 * var(--c))), 0 0 0 1px oklch(75% 0.12 var(--h, 160) / calc(.45 * var(--c)));
}

/* ============ Gráficos ============ */

.chart { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 16px; font-size: 13px; color: var(--ink-2); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.key { display: inline-block; flex: none; }
.key-rect { width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px -1px var(--c); }
.key-line { width: 16px; border-top: 2px solid var(--c); border-radius: 2px; }
.key-dash { width: 16px; border-top: 2px dashed var(--c); }

.plot { position: relative; margin-left: 68px; }
.gridline { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--grid); }
.gridline.baseline { border-top-color: var(--axis); }
.tick {
  position: absolute; right: calc(100% + 10px); top: -.7em;
  font: 500 11px/1.3 var(--font-mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.xaxis { display: flex; margin: 9px 0 0 68px; }
.xaxis span { flex: 1; min-width: 0; text-align: center; font: 500 11px/1.3 var(--font-mono); color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.xaxis-abs { position: relative; height: 16px; margin: 9px 0 0 68px; }
.xaxis-abs span { position: absolute; transform: translateX(-50%); font: 500 11px/1.3 var(--font-mono); color: var(--muted); }

.cols { position: absolute; inset: 0; display: flex; }
.col-group { flex: 1; display: flex; min-width: 0; border-radius: 10px; transition: background-color .2s ease; }
.col-group:hover, .col-group:focus-visible { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.col-group:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.col-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; height: 100%; padding: 0 16%; }
.col-bar {
  flex: 0 1 24px; min-width: 3px; border-radius: 4px 4px 0 0; transform-origin: bottom;
  background: linear-gradient(180deg, color-mix(in oklch, var(--bar), white 22%), var(--bar));
  transition: box-shadow .3s ease, filter .3s ease;
}
.col-bar.has-value { min-height: 2px; }
.col-group:hover .col-bar { box-shadow: 0 0 18px -2px var(--bar); filter: saturate(1.2); }

.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.end-dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 2px var(--surface), 0 0 14px 2px var(--c); transform: translate(-50%, 50%); pointer-events: none;
  animation: beacon 2.4s ease-in-out infinite;
}
@keyframes beacon { 50% { box-shadow: 0 0 0 2px var(--surface), 0 0 22px 5px var(--c); } }
.end-label {
  position: absolute; transform: translate(12px, 50%); padding: 2px 7px; border-radius: 7px;
  background: var(--surface); font: 600 12px/1.4 var(--font-mono); white-space: nowrap; pointer-events: none;
  box-shadow: 0 0 0 1px var(--line-strong), 0 6px 16px -8px rgba(15, 23, 42, .4);
}
.end-label.to-left { transform: translate(calc(-100% - 12px), 50%); }
.crosshair { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--axis); pointer-events: none; }
.hit-layer { position: absolute; inset: 0; cursor: crosshair; border-radius: 4px; }

.chart-tip {
  position: fixed; z-index: 100; min-width: 160px; padding: 9px 11px; pointer-events: none;
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: var(--shadow-pop), 0 0 24px -10px oklch(60% 0.16 var(--module-h) / .6); font-size: 12px;
}
.tip-title { margin-bottom: 5px; font: 500 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tip-row { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.tip-row strong { font: 600 13px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }
.tip-label { color: var(--ink-2); }

.chart-table-wrap { max-height: 340px; overflow: auto; }
.chart-table, .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.chart-table th, .chart-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.chart-table td { font-family: var(--font-mono); }
.chart-table th[scope="row"], .chart-table thead th:first-child { text-align: left; }
.chart-table thead th { color: var(--muted); font-weight: 600; }

.data-table th { padding: 0 0 8px; font: 500 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line); }
.data-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.data-table tbody tr { transition: background-color .2s ease; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; padding-left: 12px; }

@media (max-width: 560px) {
  .plot, .xaxis, .xaxis-abs { margin-left: 56px; }
  .xaxis.dense span:nth-child(even) { visibility: hidden; }
}

/* Barras horizontales de una serie: nombre y valor arriba, barra debajo */
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bar-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 3.8em; gap: 6px 12px; align-items: center;
  width: 100%; padding: 8px 10px; border-radius: 12px; font-weight: 400; text-align: left;
}
button.bar-row:hover:not(:disabled) { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); transform: translateX(2px); }
.bar-label { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 500; }
.bar-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { font: 600 13px/1.3 var(--font-mono); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.bar-share { font: 500 12px/1.3 var(--font-mono); color: var(--muted); text-align: right; }
.bar-row .delta { font-size: 12px; text-align: right; white-space: nowrap; }
.bar-track { grid-column: 1 / -1; height: 8px; margin-left: 36px; }
.bar-fill {
  display: block; height: 100%; min-width: 3px; border-radius: 0 4px 4px 0; transform-origin: left;
  background: linear-gradient(90deg, var(--bar), color-mix(in oklch, var(--bar), white 25%));
  transition: box-shadow .3s ease;
}
.bar-row:hover .bar-fill { box-shadow: 0 0 16px -2px var(--bar); }

/* ============ Presupuestos ============ */

.budget-figures { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.figure { font-size: clamp(30px, 5cqi, 42px); font-weight: 800; font-stretch: var(--wide); letter-spacing: -.025em; line-height: 1; }
.figure-of { margin-left: 8px; color: var(--muted); font-family: var(--font-mono); font-size: 14px; }

.meter {
  --fill: var(--meter-a);
  --fill-2: var(--meter-b);
  position: relative; height: 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--fill) 18%, transparent);
}
.meter.lg { height: 14px; }
.meter.warn { --fill: #fbbf24; --fill-2: #fb923c; }
.meter.over { --fill: #fb7185; --fill-2: #f43f5e; }
.meter-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: inherit; transform-origin: left;
  background: linear-gradient(90deg, var(--fill), var(--fill-2));
  box-shadow: 0 0 16px -2px color-mix(in srgb, var(--fill-2) 75%, transparent);
}
.meter-pace { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.pace-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.pace-note .pace-key { background: var(--ink); margin-right: 0; box-shadow: none; }

.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px;
  border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap;
}
.status-glyph { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 800; }
.status.ok { background: var(--brand-soft); color: var(--brand-strong); }
.status.ok .status-glyph { background: var(--grad-brand); color: var(--on-brand); box-shadow: 0 0 10px oklch(65% 0.16 var(--module-h) / .7); }
.status.warn { background: var(--warn-soft); color: var(--warn-text); }
.status.warn .status-glyph { background: linear-gradient(135deg, #ffc53d, #f08c1e); color: #3a2600; box-shadow: 0 0 10px rgba(240, 150, 30, .7); }
.status.over { background: var(--danger-soft); color: var(--danger); }
.status.over .status-glyph { background: linear-gradient(135deg, #f0625f, #cf2f63); color: #ffffff; box-shadow: 0 0 10px rgba(225, 60, 80, .7); }

/* Datos clave separados por reglas, sin cajas */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 20px 0 0; border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; align-content: start; min-width: 0; padding: 16px 18px 0; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact dt { font-size: 13px; color: var(--muted); }
.fact dd { margin: 0; }
.fact-value { font: 600 19px/1.3 var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fact-foot { font-size: 12.5px; color: var(--muted); }
@container (max-width: 560px) {
  .fact { border-left: 0; padding-left: 0; }
  .facts .fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.budget-list, .plain-list { list-style: none; margin: 0; padding: 0; }
.budget-row {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.budget-row:first-child { padding-top: 0; }
.budget-row:last-child { border-bottom: 0; padding-bottom: 0; }
.budget-main { display: grid; gap: 9px; min-width: 0; }
.budget-top, .budget-bottom { display: flex; justify-content: space-between; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.budget-name { font-weight: 650; }
.budget-nums { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.budget-nums strong { color: var(--ink); font-weight: 600; }
.budget-bottom { font-size: 13px; }
.plain-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plain-row:first-child { padding-top: 0; }
.plain-row:last-child { border-bottom: 0; padding-bottom: 0; }
.plain-row .amount { display: block; font-size: 13px; color: var(--muted); }

/* ============ Ajustes ============ */

.integrations { list-style: none; margin: 0; padding: 0; }
.integration {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.integration:first-child { padding-top: 0; }
.integration:last-child { border-bottom: 0; padding-bottom: 0; }
.integration .tile { width: 40px; height: 40px; }
.integration-main { display: grid; gap: 2px; min-width: 0; }
.integration-main strong { font-weight: 650; }
.integration-main span { font-size: 13px; color: var(--muted); }
.integration-side { display: grid; gap: 4px; justify-items: end; }
.pair-code { margin: 6px 0 0; text-align: center; font: 700 clamp(30px, 9vw, 40px)/1.1 var(--font-mono); letter-spacing: .12em; color: var(--ink); user-select: all; }
.pair-status { margin: 0; text-align: center; font-variant-numeric: tabular-nums; }
/* Foto de la boleta */
.receipt-field { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.receipt-field.has-photo { padding: 10px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.receipt-field-text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.receipt-note { color: var(--ink-2); }
.receipt-thumb { flex: none; width: 64px; height: 84px; padding: 0; border-radius: 8px; overflow: hidden; background: var(--surface-3); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .4); }
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-viewer { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(6, 10, 14, .88); cursor: zoom-out; }
.img-viewer img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.img-viewer .icon-btn { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; color: #fff; background: rgba(255, 255, 255, .12); }
.scan { display: grid; gap: 10px; justify-items: center; }
.scan-img { max-width: 100%; max-height: 38vh; border-radius: 10px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5); }
.scan-bar { width: 100%; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.scan-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width .3s ease; }
.scan-status { margin: 0; }
.review-card { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; }
.review-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-item:first-child { padding-top: 0; }
.review-item:last-child { border-bottom: 0; padding-bottom: 0; }
.review-main { flex: 1 1 260px; min-width: 0; display: grid; gap: 3px; }
.review-what { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.review-what .amount { margin-left: auto; }
.review-kind { padding: 1px 8px; border-radius: 6px; font: 600 11px/1.6 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; background: var(--grad-expense); color: var(--on-expense); }
.review-kind.income { background: var(--grad-brand); color: var(--on-brand); }
.review-kind.none { background: var(--surface-3); color: var(--muted); }
.review-raw { margin: 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.review-raw span { color: var(--ink-2); font-weight: 600; }
.review-when { margin: 0; color: var(--muted); }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dup-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--status-warn) 45%, var(--line)); }
.dup-card .grow { display: grid; gap: 4px; min-width: 220px; }
.dup-card p { margin: 0; }
.dup-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--warn-text); background: var(--warn-soft); flex: none; }
.phone-checks li { align-items: flex-start; }
.phone-checks .icon { flex: none; margin-top: 2px; color: var(--brand); }
.phone-checks .grow { gap: 2px; }
.app-toggle .grow { gap: 1px; }
.switch-btn { padding: 6px; border-radius: 999px; }
.switch-btn .switch { margin: 0; }
@media (max-width: 560px) {
  .integration { grid-template-columns: 40px minmax(0, 1fr); }
  .integration-side { grid-column: 2; justify-items: start; }
}

/* Apariencia: tarjetas con miniatura de cada tema (colores fijos: muestran el otro tema) */
.theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.theme-option {
  display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; align-items: start;
  gap: 6px; align-content: start; padding: 10px 10px 12px; border-radius: 14px;
  background: var(--surface); color: var(--ink); text-align: left; white-space: normal; font-weight: 400;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.theme-option:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--brand), 0 14px 28px -14px oklch(60% 0.16 var(--module-h) / .7);
}
.theme-option[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--brand), var(--glow-brand); }
.theme-name { display: flex; align-items: center; gap: 6px; font-weight: 650; }
.theme-hint { font-size: 12px; line-height: 1.35; color: var(--muted); }
.theme-preview { position: relative; display: block; height: 76px; margin-bottom: 4px; border-radius: 10px; overflow: hidden; }
.theme-preview.light { background: linear-gradient(160deg, #f8fafc, #e3ecff); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08); }
.theme-preview.dark { background: linear-gradient(160deg, #111827, #0a0e17); }
.theme-preview.system { background: linear-gradient(120deg, #f8fafc 0 50%, #0a0e17 50% 100%); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08); }
.tp-note { position: absolute; left: 10px; top: 11px; width: 58%; height: 28px; border-radius: 7px; }
.light .tp-note { background: linear-gradient(135deg, #3b8cff, #7a3fff); box-shadow: 0 6px 14px -6px rgba(60, 100, 255, .7); }
.dark .tp-note { background: linear-gradient(135deg, #2f6fe0, #5b2fc9); box-shadow: 0 0 16px -2px rgba(90, 130, 255, .7); }
.system .tp-note { background: linear-gradient(120deg, #3b8cff 0 50%, #5b2fc9 50% 100%); }
.tp-btn { position: absolute; right: 10px; top: 15px; width: 20px; height: 20px; border-radius: 6px; }
.light .tp-btn { background: linear-gradient(135deg, #0a78ff, #7a1fff); box-shadow: 0 4px 10px -3px rgba(60, 100, 255, .7); }
.dark .tp-btn { background: linear-gradient(135deg, #0a78ff, #7a1fff); box-shadow: 0 0 12px rgba(80, 130, 255, .8); }
.system .tp-btn { background: linear-gradient(135deg, #0a78ff, #7a1fff); box-shadow: 0 0 10px rgba(80, 130, 255, .7); }
.tp-line { position: absolute; left: 10px; bottom: 21px; width: 70%; height: 5px; border-radius: 3px; }
.tp-line.short { bottom: 11px; width: 42%; }
.light .tp-line { background: rgba(15, 23, 42, .13); }
.dark .tp-line { background: rgba(228, 237, 232, .16); }
.system .tp-line { background: rgba(128, 140, 135, .45); }
.theme-option[aria-checked="true"] .theme-preview::after {
  content: "✓"; position: absolute; right: 7px; bottom: 7px; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800;
  background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand);
  animation: pop .35s var(--spring);
}
@container (max-width: 480px) {
  .theme-options { gap: 8px; }
  .theme-hint { display: none; }
  .theme-preview { height: 60px; }
}

/* País y moneda: un "billete de muestra" (como los que llevan el timbre MUESTRA) con el formato elegido */
.specimen {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; gap: 10px; margin: 16px 0 0; padding: 16px 20px 18px; border-radius: 16px; color: var(--note-ink);
  background:
    radial-gradient(90% 85% at 100% 0%, var(--note-c) 0%, transparent 62%),
    linear-gradient(135deg, var(--note-a) 0%, var(--note-b) 100%);
  box-shadow: var(--note-glow);
}
.specimen::before {
  content: ""; position: absolute; z-index: -1; right: -90px; top: 50%; width: 300px; height: 300px;
  transform: translateY(-50%); background: var(--guilloche) center / contain no-repeat; opacity: var(--note-guilloche);
}
.specimen::after {
  content: ""; position: absolute; z-index: -1; inset: 6px; border-radius: 11px;
  border: 1px solid var(--note-frame); pointer-events: none;
}
.specimen-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.specimen .micro { color: var(--note-muted); }
.specimen-stamp {
  padding: 2px 8px; border: 1.5px solid currentColor; border-radius: 6px; rotate: -6deg;
  font: 700 11px/1.4 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--note-negative); opacity: .8;
}
.specimen-figure {
  font-size: clamp(24px, 5.4cqi, 38px); font-weight: 800; font-stretch: 125%; line-height: 1.05;
  letter-spacing: -.02em; font-variant-numeric: lining-nums; text-shadow: var(--note-figure-shadow); white-space: nowrap;
}
.specimen-figure.is-new { animation: slide-in .4s var(--spring); }
.specimen-row { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; color: var(--note-muted); }
.specimen-row b { margin-left: 4px; font-family: var(--font-mono); font-weight: 600; color: var(--note-ink); white-space: nowrap; }

/* Cambio de tema: el nuevo se revela en un círculo que crece desde el clic */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-reveal .7s cubic-bezier(.4, 0, .2, 1); }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 50%)); }
  to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 50%)); }
}

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--muted);
}
.badge.ok { background: var(--brand-soft); color: var(--brand-strong); box-shadow: 0 0 14px -6px oklch(60% 0.16 var(--module-h) / .7); }
.badge.warn { background: var(--warn-soft); color: var(--warn-text); box-shadow: 0 0 14px -6px rgba(240, 150, 30, .7); }

.capture { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; animation: slide-in .35s var(--spring); }
.capture:last-child { border-bottom: 0; }
.capture code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-family: var(--font-mono); font-size: 12px; word-break: break-word; }

/* ============ Diálogo ============ */

.modal {
  width: min(500px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px;
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-pop), 0 0 60px -20px oklch(60% 0.16 var(--module-h) / .55);
}
.modal::backdrop { background: rgba(8, 14, 32, .45); backdrop-filter: blur(4px); animation: fade .25s ease; }
.modal[open] { animation: pop .32s var(--spring); }
.modal-card { display: grid; gap: 18px; padding: 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h2 { font-size: 19px; font-weight: 800; font-stretch: var(--wide); }
.modal-body { display: grid; gap: 14px; }
.modal-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.spacer { flex: 1; }
.form-error { margin: 0; font-size: 13px; color: var(--danger); animation: shake .35s ease; }
.form-error:empty { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ============ Avisos flotantes ============ */

.toasts {
  position: fixed; z-index: 200; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: center; pointer-events: none;
  width: max-content; max-width: calc(100vw - 32px);
}
@media (max-width: 899px) { .toasts { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }
.toast {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 9px 16px 9px 10px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--toast-bg); color: var(--toast-ink);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 14px 34px -14px rgba(10, 40, 30, .35), 0 0 0 1px oklch(80% 0.1 var(--module-h) / .45), 0 0 34px -8px oklch(78% 0.16 var(--module-h) / .75);
  animation: toast-in .5s var(--spring) both;
}
.toast > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-undo {
  flex: none; margin-left: 2px; padding: 5px 12px; border-radius: 999px; pointer-events: auto;
  font-size: 13px; font-weight: 700; color: var(--toast-ink); box-shadow: inset 0 0 0 1.5px currentColor;
}
.toast-undo:hover:not(:disabled) { background: color-mix(in srgb, var(--toast-ink) 12%, transparent); }
.toast.leaving { animation: toast-out .3s ease-in forwards; }
.toast-dot {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad-brand); color: #fff; box-shadow: var(--glow-brand);
}
.toast.warn .toast-dot { background: linear-gradient(135deg, #ffd27a, #f5973a); box-shadow: 0 0 14px rgba(255, 190, 90, .8); }
.toast.bad .toast-dot { background: linear-gradient(135deg, #ffb09e, #ff6b86); box-shadow: 0 0 14px rgba(255, 120, 130, .8); }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.96); } }

@media (max-width: 560px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .ledger { padding: 16px 18px; }
  .note { padding: 20px; min-height: 230px; }
  .note-holo { right: 20px; top: 62px; width: 58px; height: 58px; }
}

/* ============ Entrada a una sección ============ */

@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes rise { from { opacity: .15; transform: translateY(16px); } }

.view.entering > * { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.view.entering > :nth-child(2) { animation-delay: .06s; }
.view.entering > :nth-child(3) { animation-delay: .12s; }
.view.entering > :nth-child(4) { animation-delay: .18s; }
.view.entering > :nth-child(5) { animation-delay: .24s; }
.view.entering > :nth-child(n + 6) { animation-delay: .3s; }
.view.entering .meter-fill,
.view.entering .note-meter-fill,
.view.entering .bar-fill { animation: grow-x .9s cubic-bezier(.2, .7, .2, 1) .15s both; }
.view.entering .col-bar { animation: grow-y .8s cubic-bezier(.2, .7, .2, 1) .15s both; }

/* =====================================================================
   Funciones destacadas
   ===================================================================== */

:root {
  /* Mapa de calor: una sola tonalidad (naranja del gasto), de claro a oscuro */
  --heat-0: rgba(15, 23, 42, .06);
  --heat-1: oklch(92% 0.05 55);
  --heat-2: oklch(84% 0.1 50);
  --heat-3: oklch(74% 0.14 45);
  --heat-4: oklch(63% 0.17 40);
  --note-glass: rgba(255, 255, 255, .2);
  --wb-bg: linear-gradient(120deg, #ffe0ea 0%, #ddd8ff 48%, #cff5e8 100%);
  --wb-ink: #1d1236;
  --jar-inside: oklch(97% 0.015 var(--h, 160));
  --jar-pct: oklch(28% 0.06 var(--h, 160));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --heat-0: rgba(233, 237, 242, .06);
    --heat-1: oklch(36% 0.07 45);
    --heat-2: oklch(47% 0.11 45);
    --heat-3: oklch(60% 0.15 45);
    --heat-4: oklch(73% 0.17 50);
    --note-glass: rgba(255, 255, 255, .12);
    --wb-bg: linear-gradient(120deg, #262a3f 0%, #1d2536 50%, #1a2b28 100%);
    --wb-ink: #f3eefe;
    --jar-inside: oklch(24% 0.02 var(--h, 160));
    --jar-pct: #ffffff;
  }
}
:root[data-theme="dark"] {
  --heat-0: rgba(233, 237, 242, .06);
  --heat-1: oklch(36% 0.07 45);
  --heat-2: oklch(47% 0.11 45);
  --heat-3: oklch(60% 0.15 45);
  --heat-4: oklch(73% 0.17 50);
  --note-glass: rgba(255, 255, 255, .12);
  --wb-bg: linear-gradient(120deg, #262a3f 0%, #1d2536 50%, #1a2b28 100%);
  --wb-ink: #f3eefe;
  --jar-inside: oklch(24% 0.02 var(--h, 160));
  --jar-pct: #ffffff;
}

.btn-sm { padding: 7px 13px; font-size: 13px; }

/* ---------- Modo privacidad: montos difuminados ---------- */
:root[data-private] :is(.money, .amount, .ledger-value, .note-figure, .note-denom strong, .note-caption strong,
  .stat-value, .fact-value, .figure, .figure-of, .bar-value, .budget-nums, .receipt-amount, .day-net, .tick,
  .end-label, .tip-row strong, .chart-table td, .data-table .num, .goal-amounts strong) {
  filter: blur(7px);
  user-select: none;
}

/* ---------- Barra inferior: "Más" ---------- */
@media (max-width: 899px) {
  .bottom-nav .bottom-more {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; border-radius: 0;
    font-size: 11px; font-weight: 600; color: var(--muted); background: none; box-shadow: none;
  }
  .bottom-nav .bottom-more .icon {
    width: 48px; height: 30px; padding: 4px 13px; border-radius: 999px; box-sizing: border-box;
    transition: background .25s ease, box-shadow .3s ease, transform .3s var(--spring);
  }
  .bottom-nav .bottom-more[aria-current="page"] { color: var(--ink); }
  .bottom-nav .bottom-more[aria-current="page"] .icon { background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand); transform: translateY(-2px); }
}

/* ---------- Billete: acciones ---------- */
.note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.note-cta {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--note-ink);
  background: var(--note-glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 6px 18px -10px rgba(0, 40, 30, .6);
}
.note-cta:hover:not(:disabled) { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 0 26px -4px rgba(255, 255, 255, .75); }
.note-cta .icon { transition: transform .5s var(--spring); }
.note-cta:hover .icon { transform: rotate(90deg) scale(1.15); }
.note-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: #4a1d00;
  background: linear-gradient(135deg, #ffd27a, #ff9f5a); box-shadow: 0 0 18px -4px rgba(255, 160, 70, .85);
}

/* ---------- Insights ---------- */
.insights {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; scrollbar-width: none;
}
.insights::-webkit-scrollbar { display: none; }
.insights.grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); overflow: visible; }
.insight {
  --tone: oklch(70% 0.12 240);
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; scroll-snap-align: start;
  background: linear-gradient(135deg, color-mix(in oklch, var(--tone) 13%, var(--surface)) 0%, var(--glass) 65%);
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
  transition: transform .3s var(--spring), box-shadow .3s ease;
}
.insight:hover { transform: translateY(-2px); box-shadow: var(--shadow-card), 0 12px 30px -16px var(--tone); }
.insight.warn { --tone: #f5a524; }
.insight.good { --tone: oklch(72% 0.16 155); }
.insight-icon {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px;
  background: color-mix(in oklch, var(--tone) 24%, var(--surface)); color: color-mix(in oklch, var(--tone) 65%, var(--ink));
  box-shadow: 0 6px 16px -8px var(--tone);
}
.insight h3 { margin: 0 0 3px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.insight p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-list .grow { display: grid; }
a.link-btn { text-decoration: none; }

/* ---------- ¿Me lo compro? ---------- */
.afford-result { min-height: 110px; }
.afford-hint { margin: 0; padding: 18px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; text-align: center; }
.verdict { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); animation: slide-in .35s var(--spring); }
.verdict.go { background: color-mix(in oklch, oklch(80% 0.15 150) 24%, var(--surface)); }
.verdict.tight { background: color-mix(in oklch, #f5a524 20%, var(--surface)); }
.verdict.wait { background: color-mix(in oklch, #f25f5c 18%, var(--surface)); }
.lights { display: grid; gap: 5px; flex: none; padding: 7px 6px; border-radius: 12px; background: #15201c; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); }
.lights .light { width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, .12); transition: background .3s ease, box-shadow .3s ease; }
.verdict.go .light.go { background: #3ee08f; box-shadow: 0 0 12px #3ee08f; }
.verdict.tight .light.tight { background: #ffc53d; box-shadow: 0 0 12px #ffc53d; }
.verdict.wait .light.wait { background: #ff5c6c; box-shadow: 0 0 12px #ff5c6c; }
.verdict-title { margin: 0; font-size: 18px; font-weight: 800; font-stretch: 112%; }
.verdict-text { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.afford-meter { display: grid; gap: 6px; margin-top: 14px; }
.afford-meter p { margin: 0; }
.meter-extra {
  position: absolute; top: 0; bottom: 0; border-radius: 0 999px 999px 0;
  background: repeating-linear-gradient(-45deg, var(--fill-2) 0 5px, color-mix(in srgb, var(--fill-2) 40%, transparent) 5px 10px);
  background-size: 14px 14px; animation: stripes .9s linear infinite;
}
@keyframes stripes { to { background-position: 14px 0; } }
.afford-facts { list-style: none; margin: 12px 0 0; padding: 0; }
.afford-facts li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line-strong); font-size: 13.5px; }
.afford-facts li:last-child { border-bottom: 0; }
.afford-facts li > span:first-child { color: var(--muted); }
.afford-facts strong { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.afford-facts small { color: var(--muted); }

/* ---------- Tu mes en resumen: acceso ---------- */
.wrapped-banner {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: 20px; color: var(--wb-ink); background: var(--wb-bg);
  box-shadow: 0 20px 44px -26px rgba(120, 90, 200, .7), inset 0 0 0 1px rgba(255, 255, 255, .45);
}
.wb-text h2 { margin: 4px 0; font-size: clamp(20px, 3cqi, 26px); font-weight: 800; font-stretch: 118%; }
.wb-text p { margin: 0; max-width: 54ch; opacity: .82; }
.wb-text .micro { opacity: .75; }
.wb-orb { position: absolute; z-index: -1; border-radius: 50%; animation: float 9s ease-in-out infinite alternate; }
.wb-orb.a { width: 170px; height: 170px; right: 20%; top: -70px; background: radial-gradient(circle at 30% 30%, #fff, #ff9db5 55%, transparent 70%); opacity: .75; }
.wb-orb.b { width: 120px; height: 120px; right: -34px; bottom: -44px; background: radial-gradient(circle at 30% 30%, #fff, #7cc8ff 55%, transparent 70%); opacity: .75; animation-delay: -3s; }
.wb-orb.c { width: 76px; height: 76px; left: 46%; bottom: -34px; background: radial-gradient(circle at 30% 30%, #fff, #ffd27a 55%, transparent 70%); opacity: .85; animation-delay: -6s; }
@keyframes float { to { transform: translate(-14px, 12px) scale(1.08); } }

/* ---------- Tu mes en resumen: historias ---------- */
body.story-open { overflow: hidden; }
.story {
  position: fixed; inset: 0; z-index: 250; display: grid; place-items: center;
  background: rgba(6, 10, 9, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .25s ease;
}
.story.closing { animation: fade-out .25s ease forwards; }
@keyframes fade-out { to { opacity: 0; } }
.story-frame { position: relative; width: min(420px, 100vw); height: min(760px, 100dvh); border-radius: 26px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
@media (max-width: 480px) { .story-frame { border-radius: 0; height: 100dvh; } }
.story-progress { position: absolute; z-index: 5; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; }
.story-progress span { flex: 1; height: 3px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, .35); }
.story-progress i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.story-progress .done i { transform: scaleX(1); }
.story-progress .active i { animation: story-bar var(--dur) linear forwards; }
.story.paused .story-progress .active i { animation-play-state: paused; }
@keyframes story-bar { to { transform: scaleX(1); } }
.story-top { position: absolute; z-index: 5; top: 26px; left: 16px; right: 12px; display: flex; justify-content: space-between; align-items: center; color: rgba(255, 255, 255, .92); }
.story-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .2); backdrop-filter: blur(6px); }
.story-btn:hover:not(:disabled) { background: rgba(0, 0, 0, .34); }
.story-stage { position: absolute; inset: 0; }
.story-nav { position: absolute; z-index: 3; top: 70px; bottom: 0; padding: 0; border-radius: 0; background: transparent; color: #fff; }
.story-nav.prev { left: 0; width: 35%; }
.story-nav.next { right: 0; width: 65%; }
.story-nav:active:not(:disabled) { transform: none; }
.slide {
  position: absolute; inset: 0; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: 90px 30px 56px; color: #fff; background: var(--s-bg); animation: slide-pop .5s var(--spring);
}
@keyframes slide-pop { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.slide::before, .slide::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(34px); opacity: .7; animation: float 7s ease-in-out infinite alternate; }
.slide::before { width: 260px; height: 260px; top: -70px; right: -90px; background: var(--s-orb1); }
.slide::after { width: 220px; height: 220px; bottom: -60px; left: -70px; background: var(--s-orb2); animation-delay: -3s; }
.theme-mint { --s-bg: linear-gradient(160deg, #0f766e, #10b981 55%, #34d399); --s-orb1: #a7f3d0; --s-orb2: #22d3ee; }
.theme-coral { --s-bg: linear-gradient(160deg, #be123c, #f43f5e 50%, #fb923c); --s-orb1: #fecdd3; --s-orb2: #fde68a; }
.theme-violet { --s-bg: linear-gradient(160deg, #4c1d95, #7c3aed 55%, #c084fc); --s-orb1: #f0abfc; --s-orb2: #93c5fd; }
.theme-sky { --s-bg: linear-gradient(160deg, #1e3a8a, #2563eb 50%, #22d3ee); --s-orb1: #bae6fd; --s-orb2: #a5f3fc; }
.theme-amber { --s-bg: linear-gradient(160deg, #9a3412, #ea580c 50%, #fbbf24); --s-orb1: #fde68a; --s-orb2: #fecaca; }
.slide-kicker { margin: 0; font: 600 13px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; opacity: .88; }
.slide-huge { margin: 0; font-size: clamp(54px, 16vw, 84px); font-weight: 900; font-stretch: 125%; line-height: .92; letter-spacing: -.03em; white-space: nowrap; }
.slide-figure { margin: 0; font-size: clamp(40px, 12vw, 60px); font-weight: 900; font-stretch: 125%; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.slide-title { margin: 0; font-size: clamp(28px, 8vw, 40px); font-weight: 800; font-stretch: 118%; line-height: 1.05; }
.slide-title.big { font-size: clamp(36px, 11vw, 56px); }
.slide-sub { margin: 0; max-width: 32ch; font-size: 16px; line-height: 1.45; opacity: .92; }
.slide-pill { align-self: flex-start; margin: 0; padding: 6px 12px; border-radius: 999px; font-weight: 700; background: rgba(255, 255, 255, .2); }
.slide-hint { position: absolute; left: 30px; bottom: 26px; margin: 0; font-size: 13px; opacity: .72; }
.slide-tile .tile { width: 72px; height: 72px; border-radius: 22px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); }
.slide-tile .tile svg { width: 36px; height: 36px; }
.slide-bars { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; }
.slide-bars li { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; font-size: 14px; }
.slide-bars i { grid-column: 1 / -1; width: var(--w); height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .92); transform-origin: left; animation: grow-x .9s cubic-bezier(.2, .7, .2, 1) .2s both; }
.slide-bars b { font-family: var(--font-mono); font-weight: 600; }
.slide-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.slide-badge {
  display: grid; justify-items: center; gap: 6px; width: 92px; padding: 12px 6px; border-radius: 16px;
  background: rgba(255, 255, 255, .16); font-size: 11.5px; line-height: 1.2; text-align: center;
  animation: slide-pop .5s var(--spring) both;
}
.slide-badge svg { filter: drop-shadow(0 0 8px rgba(255, 255, 255, .7)); }
.slide-badge:nth-child(2) { animation-delay: .08s; }
.slide-badge:nth-child(3) { animation-delay: .16s; }
.slide-badge:nth-child(4) { animation-delay: .24s; }
.slide-badge:nth-child(5) { animation-delay: .32s; }
.slide-badge:nth-child(6) { animation-delay: .4s; }
.slide-actions { position: relative; z-index: 4; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.slide-cta { padding: 12px 18px; border-radius: 999px; color: #0f3b31; background: #fff; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.slide-cta:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .6), 0 0 24px rgba(255, 255, 255, .6); }
.slide-ghost { padding: 12px 16px; border-radius: 999px; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.slide-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }

/* ---------- Mapa de calor ---------- */
.heatmap { --cell: 15px; --gap: 4px; --months-h: 12px; margin: 0; }
/* Los nombres de los días quedan fijos a la izquierda; solo las semanas se desplazan. */
.heatmap-frame { display: flex; gap: 8px; }
.heatmap-scroll {
  flex: 1; min-width: 0; overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.heatmap-inner { display: grid; gap: 6px; width: max-content; }
.heatmap-months {
  display: grid; grid-template-columns: repeat(var(--weeks), var(--cell)); column-gap: var(--gap); height: var(--months-h);
  font: 500 10.5px/1 var(--font-mono); text-transform: uppercase; color: var(--muted);
}
.heatmap-months span { white-space: nowrap; }
.heatmap-days {
  display: grid; flex: none; grid-template-rows: repeat(7, var(--cell)); row-gap: var(--gap); width: 28px;
  margin-top: calc(4px + var(--months-h) + 6px); font: 500 10.5px/var(--cell) var(--font-mono); color: var(--muted);
}
.heatmap-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, var(--cell)); grid-auto-columns: var(--cell); gap: var(--gap); }
.heat-cell { display: inline-block; width: var(--cell); height: var(--cell); border-radius: 4px; background: var(--heat-0); transition: transform .2s var(--spring), box-shadow .2s ease; }
.heat-cell.l1 { background: var(--heat-1); }
.heat-cell.l2 { background: var(--heat-2); }
.heat-cell.l3 { background: var(--heat-3); }
.heat-cell.l4 { background: var(--heat-4); }
.heat-cell.future { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.heatmap-grid .heat-cell:not(.future):hover { position: relative; z-index: 1; transform: scale(1.35); box-shadow: 0 0 12px -2px var(--heat-4); }
.heatmap-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.heatmap-legend .heat-cell { width: 12px; height: 12px; border-radius: 3px; }

/* ---------- Rachas y logros ---------- */
.streak-panel {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(120deg, color-mix(in oklch, #ffb347 20%, var(--surface)), var(--surface-2));
}
.streak-flame { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 16px; color: var(--muted); background: var(--surface-3); }
.streak-flame.lit { color: #fff; background: linear-gradient(160deg, #ffcf6b, #ff7a45); box-shadow: 0 0 26px -4px rgba(255, 140, 60, .9); animation: flicker 2.2s ease-in-out infinite; }
@keyframes flicker { 50% { box-shadow: 0 0 36px -2px rgba(255, 160, 70, 1); transform: scale(1.05) rotate(-3deg); } }
.streak-number { margin: 0; font-size: 26px; font-weight: 800; font-stretch: 118%; line-height: 1.1; }
.streak-number span { font-size: 14px; font-weight: 600; font-stretch: 100%; color: var(--ink-2); }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.badge-item {
  display: grid; justify-items: center; gap: 6px; padding: 14px 10px; border-radius: 14px; text-align: center;
  background: var(--surface-2); transition: transform .3s var(--spring), box-shadow .3s ease;
}
.badge-item strong { font-size: 13.5px; }
.badge-item .small { line-height: 1.35; }
.medal { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; }
.badge-item.on .medal {
  color: #fff; background: radial-gradient(circle at 30% 25%, oklch(88% 0.12 var(--h)), oklch(62% 0.17 var(--h)) 70%);
  box-shadow: 0 0 0 3px oklch(80% 0.12 var(--h) / .35), 0 8px 22px -6px oklch(60% 0.18 var(--h) / .9);
}
.badge-item.on:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px oklch(60% 0.18 var(--h) / .9); }
.badge-item.on:hover .medal { animation: wiggle .5s ease; }
@keyframes wiggle { 30% { transform: rotate(-10deg) scale(1.08); } 60% { transform: rotate(8deg); } }
.badge-item.off { opacity: .78; }
.badge-item.off .medal { color: var(--muted); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------- Metas: alcancías ---------- */
.goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 18px; }
.goal { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; overflow: hidden; }
.goal::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle at 14% 45%, oklch(88% 0.09 var(--h) / .55), transparent 55%); pointer-events: none; }
.goal.is-done { box-shadow: var(--shadow-card), 0 0 0 1px oklch(75% 0.12 var(--h) / .5), 0 0 44px -14px oklch(70% 0.16 var(--h) / .85); }
.jar-wrap { position: relative; width: 120px; }
.jar { display: block; width: 120px; height: 140px; overflow: visible; filter: drop-shadow(0 12px 18px oklch(55% 0.12 var(--h) / .35)); }
.jar-inside { fill: var(--jar-inside); }
.jar-liquid { transform: translateY(134px); transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.jar-wave { animation: wave 3.4s linear infinite; }
.jar-wave.back { opacity: .6; animation-duration: 5.2s; animation-direction: reverse; }
@keyframes wave { to { transform: translateX(60px); } }
.jar-glass { fill: none; stroke: oklch(55% 0.08 var(--h) / .55); stroke-width: 2.5; }
.jar-shine { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 3; stroke-linecap: round; }
.jar-lid { fill: oklch(72% 0.12 var(--h)); stroke: oklch(52% 0.12 var(--h)); stroke-width: 1.5; }
.jar-pct { position: absolute; left: 0; right: 0; top: 56%; font: 800 20px/1 var(--font-ui); font-stretch: 118%; text-align: center; color: var(--jar-pct); text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.coin {
  position: absolute; left: 50%; top: -16px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%;
  display: grid; place-items: center; font: 800 14px/1 var(--font-ui); color: #6b4a00;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd24a 55%, #e0a100); box-shadow: 0 0 14px rgba(255, 200, 60, .9);
  animation: coin-drop 1s cubic-bezier(.5, 0, .8, 1) forwards;
}
@keyframes coin-drop {
  0% { transform: translateY(-30px) rotateY(0); opacity: 0; }
  15% { opacity: 1; }
  80% { transform: translateY(78px) rotateY(540deg); opacity: 1; }
  100% { transform: translateY(92px) rotateY(720deg); opacity: 0; }
}
.goal-main { display: grid; gap: 8px; min-width: 0; }
.goal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.goal-head h2 { font-size: 17px; }
.goal-amounts { margin: 0; font-size: 14px; }
.goal-amounts strong { font-family: var(--font-mono); font-size: 18px; }
.goal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.goal-advice { margin: 0; font-size: 13px; color: var(--ink-2); }
.goal .meter:not(.warn) { --fill: oklch(70% 0.15 var(--h)); --fill-2: oklch(74% 0.13 calc(var(--h) + 35)); }
.status.neutral { background: var(--surface-3); color: var(--muted); }
.status.neutral .status-glyph { background: var(--line-strong); color: var(--ink); }
@container (max-width: 440px) {
  .goal { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .jar-wrap, .jar { width: 96px; }
  .jar { height: 112px; }
  .jar-pct { font-size: 17px; }
}
.swatches { display: flex; gap: 12px; margin: 0; padding: 0; border: 0; }
.swatches label {
  position: relative; width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, oklch(82% 0.13 var(--h)), oklch(62% 0.15 calc(var(--h) + 35)));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); transition: transform .2s var(--spring), box-shadow .2s ease;
}
.swatches label:hover { transform: scale(1.12); }
.swatches input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatches label:has(input:checked) { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px oklch(65% 0.15 var(--h)), 0 0 18px oklch(65% 0.16 var(--h) / .8); }
.swatches label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 5px; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--brand-strong); background: var(--brand-soft); box-shadow: inset 0 0 0 1px oklch(65% 0.1 var(--module-h) / .4); }
.chip-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--brand), var(--glow-brand); }
.chip-btn[aria-pressed="true"] { background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand); }

/* ---------- Pagos: calendario ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.tl-item { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 10px 0; }
.tl-item::before { content: ""; position: absolute; left: 25px; top: 62px; bottom: -10px; width: 2px; background: linear-gradient(var(--line-strong), transparent); }
.tl-item:last-child::before { display: none; }
.tl-date {
  display: grid; justify-items: center; align-content: center; width: 52px; height: 52px; border-radius: 15px;
  background: oklch(var(--tile-l) var(--tile-c) var(--h)); color: oklch(var(--tile-ink-l) var(--tile-ink-c) var(--h));
  box-shadow: 0 8px 18px -10px oklch(60% 0.16 var(--h) / .9); transition: transform .3s var(--spring);
}
.tl-item:hover .tl-date { transform: scale(1.06) rotate(-3deg); }
.tl-date b { font-size: 20px; font-weight: 800; font-stretch: 118%; line-height: 1; }
.tl-date span { font: 600 10px/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.tl-item.overdue .tl-date { outline: 2px solid #f5a524; outline-offset: 2px; }
.tl-body { display: grid; gap: 6px; align-content: center; min-width: 0; }
.tl-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.due-chip { padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; color: var(--brand-strong); background: var(--brand-soft); }
.due-chip.warn { color: var(--warn-text); background: var(--warn-soft); }
.tl-after { font-size: 12px; color: var(--muted); }
.recurring-row .grow { display: grid; gap: 2px; }
.recurring-row .badge { justify-self: start; margin-top: 3px; }
.recurring-amounts { display: grid; justify-items: end; gap: 1px; text-align: right; }
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; }
.alert.warn {
  color: var(--warn-text); background: var(--warn-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #f5a524 40%, transparent), 0 0 30px -14px rgba(245, 165, 36, .7);
}
.alert > div { display: grid; gap: 2px; }
.alert span { font-size: 13.5px; color: var(--ink-2); }
.alert .icon { flex: none; transform-origin: top center; animation: ring 2.6s ease-in-out infinite; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 80% { transform: rotate(-11deg); } 86% { transform: rotate(6deg); } }

/* ---------- Compartidos ---------- */
.avatar {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  font: 750 13px/1 var(--font-ui); color: oklch(30% 0.08 var(--h));
  background: linear-gradient(145deg, oklch(91% 0.08 var(--h)), oklch(80% 0.12 var(--h)));
  box-shadow: 0 0 0 2px var(--surface), 0 6px 14px -8px oklch(55% 0.15 var(--h) / .9);
}
.avatar.me { background: var(--grad-brand); color: var(--on-brand); }
.person-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.person-row:first-child { padding-top: 0; }
.person-row:last-child { border-bottom: 0; padding-bottom: 0; }
.person-row .grow { display: grid; gap: 1px; }
.reminder-note { display: inline-flex; align-items: center; gap: 4px; width: fit-content; font-size: 12px; color: var(--muted); text-decoration: none; }
.reminder-note:hover { color: var(--brand); text-decoration: underline; }
.owe { font-size: 13px; }
.owe.in { color: var(--positive); }
.owe.out { color: var(--danger); }
.owe strong { font-family: var(--font-mono); }
.stat-value.owe-in { color: var(--positive); }
.stat-value.owe-out { color: var(--danger); }
.faces { display: flex; flex: none; }
.faces .avatar { width: 28px; height: 28px; margin-left: -8px; font-size: 11px; }
.faces .avatar:first-child { margin-left: 0; }
.faces .avatar.more { background: var(--surface-3); color: var(--ink-2); box-shadow: 0 0 0 2px var(--surface); }
/* Historial: las caras ocupan siempre el mismo ancho, así los títulos quedan alineados. */
.split-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto; column-gap: 12px; }
.split-row .grow { display: grid; gap: 2px; }
@container (max-width: 480px) {
  .split-row { grid-template-columns: 76px minmax(0, 1fr) auto; grid-template-areas: "faces main close" "faces amounts close"; row-gap: 6px; }
  .split-row .faces { grid-area: faces; }
  .split-row .grow { grid-area: main; }
  .split-row .recurring-amounts { grid-area: amounts; justify-items: start; text-align: left; }
  .split-row .icon-btn { grid-area: close; }
}
.participants { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.participants legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.people-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.person-check {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px;
  font-size: 14px; font-weight: 600; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer;
  transition: box-shadow .2s ease, background-color .2s ease;
}
.person-check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.person-check .avatar { width: 28px; height: 28px; font-size: 11px; box-shadow: none; }
.person-check:has(input:checked) { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 16px -6px oklch(60% 0.16 var(--module-h) / .7); }
.person-check:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.add-person { display: flex; gap: 8px; }
.add-person input { flex: 1; min-width: 0; }
.split-preview { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); }
.check { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

/* Cuenta y sincronización (Ajustes) */
.account-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.account-row .grow { display: grid; gap: 2px; }
.account-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-status { margin: 0; font-size: 13px; color: var(--muted); }
.cloud-status::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; vertical-align: 1px;
  background: var(--muted);
}
.cloud-status[data-state="synced"]::before { background: var(--positive); box-shadow: 0 0 8px var(--positive); }
.cloud-status[data-state="syncing"]::before { background: #f5a524; animation: blink 1s ease-in-out infinite; }
.cloud-status[data-state="error"]::before { background: var(--danger); }
@keyframes blink { 50% { opacity: .3; } }

/* "Se repite" en el formulario de movimientos */
.repeat { display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.repeat-custom { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.repeat-custom[hidden], .t-place-when[hidden], .t-routine[hidden], .t-fromdone[hidden], .t-alert[hidden], .t-schedule[hidden] { display: none; }
.repeat-custom input { width: 5.5em; text-align: center; }
.repeat-custom select { flex: 1; min-width: 0; }
.repeat-hint { margin: 0; font-size: 13px; color: var(--muted); }
.repeat-hint:empty { display: none; }
.repeat-hint strong { color: var(--ink); font-weight: 650; }
.repeat .check { align-self: start; padding: 0; }

textarea {
  font: inherit; color: var(--ink); background: var(--surface); width: 100%; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctrl); padding: 10px 12px;
  transition: border-color .2s ease, box-shadow .25s ease;
}
textarea::placeholder { color: var(--muted); }
textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field textarea { font-size: 15px; font-weight: 400; }

/* ============ Tareas ============ */

/* Colores de prioridad: legibles en claro y en oscuro */
.task, .t-prio label { --pc: var(--line-strong); }
.task.p1, .t-prio .p1 { --pc: oklch(66% 0.13 250); }
.task.p2, .t-prio .p2 { --pc: oklch(74% 0.15 70); }
.task.p3, .t-prio .p3 { --pc: oklch(65% 0.19 25); }

.t-list { list-style: none; margin: 0; padding: 0; }
.task {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: start; column-gap: 6px;
  padding: 2px 0; border-bottom: 1px solid var(--line);
}
.t-list > .task:last-child { border-bottom: 0; }
.t-check {
  width: 22px; height: 22px; margin-top: 10px; padding: 0; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 2px var(--pc); color: transparent; background: color-mix(in srgb, var(--pc) 10%, transparent);
}
.task.p0 .t-check { --pc: var(--muted); background: transparent; }
.t-check .icon { transform: scale(.4); opacity: 0; transition: transform .3s var(--spring), opacity .2s ease; }
.t-check:hover:not(:disabled) { color: var(--pc); }
.t-check:hover .icon { transform: scale(.85); opacity: .7; }
.t-check[aria-checked="true"] { background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand); }
.t-check[aria-checked="true"] .icon { transform: none; opacity: 1; }
.t-check.sm { width: 18px; height: 18px; margin-top: 0; }
.task.completing .t-check { background: var(--grad-brand); color: var(--on-brand); }
.task.completing .t-check .icon { transform: none; opacity: 1; }
.task.completing { animation: t-done .3s ease forwards .1s; }
@keyframes t-done { to { opacity: .35; transform: translateX(8px); } }

.t-body {
  display: grid; justify-content: stretch; justify-items: start; gap: 3px; width: 100%; padding: 8px 8px; border-radius: 10px;
  white-space: normal; text-align: left; font-weight: 400;
}
.t-body:hover:not(:disabled) { background: color-mix(in srgb, var(--surface-2) 80%, transparent); }
.t-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.task.is-done .t-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.t-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.t-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.6; color: var(--muted); background: var(--surface-2); white-space: nowrap;
}
.t-chip.late { color: var(--danger); background: var(--danger-soft); }
.t-chip.today { color: var(--brand-strong); background: var(--brand-soft); }
.t-chip.ok { color: var(--positive); }
.t-tag {
  display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6;
  color: oklch(var(--tile-ink-l) var(--tile-ink-c) var(--h)); background: oklch(var(--tile-l) var(--tile-c) var(--h));
}
button.t-tag { padding: 4px 11px; font-size: 13px; }
button.t-tag[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px currentColor, 0 0 14px -4px oklch(60% 0.15 var(--h) / .7); }
.t-expand { width: 34px; height: 34px; margin-top: 4px; }
.t-expand .icon { transition: transform .3s var(--spring); }
.t-expand[aria-expanded="true"] .icon { transform: rotate(180deg); }
.t-subs { grid-column: 2 / -1; padding: 0 8px 10px; }
.t-subs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.t-subs li { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }
.t-subs li.is-done span { color: var(--muted); text-decoration: line-through; }
.t-inline-add { display: flex; gap: 6px; margin-top: 8px; min-width: 0; }
.t-inline-add input { flex: 1 1 0; width: 0; font-size: 14px; padding: 8px 11px; }
.t-inline-add select { font-size: 13px; padding: 8px; max-width: 46%; }
.t-subs .t-inline-add input { background: transparent; border-style: dashed; }

/* Captura rápida: lo que se entendió, como fichas */
.t-preview { font-size: 13px; color: var(--muted); }
.t-preview em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.t-preview-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; animation: slide-in .3s var(--spring); }
.t-preview-title { font-weight: 650; color: var(--ink); margin-right: 2px; }

/* Resumen del día */
.t-hero { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 20px; align-items: center; }
.t-ring, .t-ring-label { grid-column: 1; grid-row: 1; }
.t-ring { width: 104px; height: 104px; transform: rotate(-90deg); }
.t-ring circle { fill: none; stroke-width: 9; }
.t-ring-track { stroke: var(--surface-3); }
.t-ring-fill { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .9s var(--spring); filter: drop-shadow(0 0 6px oklch(65% 0.16 var(--module-h) / .45)); }
.t-ring-label { display: grid; place-content: center; text-align: center; line-height: 1; }
.t-ring-label strong { font-size: 30px; font-weight: 800; font-stretch: var(--wide); }
.t-ring-label span { font-size: 12px; color: var(--muted); margin-top: 3px; }
.t-hero-text { display: grid; gap: 4px; min-width: 0; }
.t-hero-text .micro { margin: 0; color: var(--muted); }
.t-hero h2 { font-size: clamp(20px, 3.4cqi, 26px); font-weight: 800; font-stretch: var(--wide); letter-spacing: -.015em; }
.t-hero-text p.muted { margin: 0; }
.t-late-text { color: var(--danger); }
.t-gap { margin-top: 22px; }
.t-done-list .icon { color: var(--positive); flex: none; }

/* Próximas: la semana de un vistazo */
.t-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px; }
.t-week-day {
  display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px;
  color: var(--ink); text-decoration: none; transition: background-color .2s ease, transform .25s var(--spring);
}
.t-week-day:hover { background: var(--surface-2); transform: translateY(-2px); }
.t-week-day .micro { color: var(--muted); font-size: 10px; }
.t-week-day strong { font-size: 18px; font-weight: 750; font-stretch: var(--wide); }
.t-week-day.is-today { background: var(--brand-soft); }
.t-week-day.is-today .micro { color: var(--brand-strong); }
.t-week-bar { display: flex; align-items: flex-end; width: 8px; height: 30px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.t-week-bar span { display: block; width: 100%; border-radius: 4px; background: var(--brand); }
.t-week-n { font: 600 12px/1 var(--font-mono); color: var(--muted); }
.t-week-day.is-free { opacity: .6; }

/* Lugares */
.t-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 18px; align-items: start; }
.t-place { --h: 265; }
.t-place.is-here {
  border-color: oklch(70% 0.13 var(--h) / .55);
  box-shadow: var(--shadow-card), 0 0 0 1px oklch(70% 0.13 var(--h) / .25), 0 18px 40px -26px oklch(60% 0.16 var(--h) / .8);
}
.t-place-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.t-place-head .grow { display: grid; gap: 2px; }
.t-place-head h2 { font-size: 16.5px; }
.t-place-head .card-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 0; }
.t-geo-chip {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; color: var(--brand-strong); background: var(--brand-soft);
}
/* Avisos al llegar por ubicación: sección del formulario y tarjeta de estado en Lugares */
.t-geo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; margin: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 14px; }
.t-geo legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.t-geo [hidden] { display: none; }
.t-geo .quick-chips { align-items: center; }
.t-geo-now { margin: 0; display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; }
.t-geo-now > .icon { flex: none; margin-top: 2px; color: var(--brand-strong); }
.t-geo-now .grow { display: grid; gap: 2px; min-width: 0; }
.t-geo-now .grow a { width: fit-content; }
.t-geo-now a { color: var(--brand-strong); }
/* Mapa para elegir dónde queda un lugar (core/map.js, Leaflet + OpenStreetMap) */
.map-search { position: relative; display: flex; align-items: center; gap: 8px; }
.map-search > .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.map-search input { flex: 1; min-width: 0; padding-left: 36px; }
.map-results { display: grid; gap: 2px; margin: 0; padding: 4px; list-style: none; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.map-results > li.muted { padding: 8px 10px; }
.map-results[hidden] { display: none; }
.map-result {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; text-align: left;
  font-weight: 400; color: var(--ink); background: none; box-shadow: none;
}
.map-result:hover:not(:disabled) { background: var(--brand-soft); transform: none; box-shadow: none; }
.map-result .grow { display: grid; gap: 1px; min-width: 0; }
.map-result .icon { flex: none; color: var(--brand-strong); }
.map-picker {
  position: relative; z-index: 0; height: 240px; border-radius: 12px; overflow: hidden;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.map-picker .leaflet-container, .map-picker.leaflet-container { font: inherit; background: var(--surface-2); }
.map-fallback { display: grid; place-items: center; height: 100%; margin: 0; padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.map-pin span {
  position: absolute; left: 3px; top: 0; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--grad-brand); box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px rgba(0, 0, 0, .55);
}
.map-pin span::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.map-pin { cursor: grab; }
path.map-radius { fill: oklch(65% 0.15 var(--module-h)); fill-opacity: .16; stroke: oklch(55% 0.16 var(--module-h)); stroke-width: 2; }
/* En modo oscuro el mapa también se oscurece (los mosaicos de OpenStreetMap son claros) */
:root[data-theme="dark"] .map-picker .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) brightness(.95) contrast(.9) saturate(.7); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map-picker .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) brightness(.95) contrast(.9) saturate(.7); }
}
.t-geo-card { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; }
.t-geo-card .grow { flex: 1; min-width: min(220px, 100%); }
.t-geo-card p { margin: 2px 0 0; }
.t-geo-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-strong); }
.t-geo-card.warn .t-geo-icon { background: var(--warn-soft); color: var(--warn-text); }
.t-geo-card.ok .t-geo-icon { background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand); }
.t-live { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 0 color-mix(in srgb, var(--positive) 60%, transparent); animation: t-live 2.2s ease-out infinite; }
@keyframes t-live { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.t-progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.t-progress span { display: block; height: 100%; border-radius: inherit; background: oklch(70% 0.14 var(--h)); transition: width .6s var(--spring); }
.t-progress-label { margin: 6px 0 0; color: var(--muted); }
.t-group { display: flex; align-items: center; gap: 6px; margin: 16px 0 2px; font: 600 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.t-place-add { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.t-how .mini-list li { align-items: flex-start; }
.t-how .mini-list .icon { color: var(--brand); margin-top: 2px; flex: none; }
.t-how .grow { gap: 2px; }

/* "¿Dónde llegaste?" */
.t-arrive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.t-arrive {
  width: 100%; justify-content: flex-start; gap: 12px; padding: 12px; border-radius: 14px; white-space: normal; text-align: left;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.t-arrive .grow { display: grid; gap: 2px; }
.t-arrive > .icon { color: var(--muted); transition: transform .25s var(--spring), color .2s ease; }
.t-arrive:hover:not(:disabled) { background: oklch(var(--tile-l) var(--tile-c) var(--h) / .6); transform: translateX(3px); }
.t-arrive:hover > .icon { color: var(--ink); transform: translateX(3px); }

/* Formularios de tarea y lugar */
.t-prio-field, .t-days, .t-icons { border: 0; padding: 0; margin: 0; min-width: 0; }
.t-prio-field legend, .t-icons legend { padding: 0; margin-bottom: 6px; }
.t-prio, .t-icons > div, .t-days { display: flex; flex-wrap: wrap; gap: 6px; }
.t-prio label, .t-icons label, .t-days label { position: relative; }
.t-prio input, .t-icons input, .t-days input { position: absolute; opacity: 0; pointer-events: none; }
.t-prio span {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.t-prio span .icon { color: var(--pc); }
.t-prio input:checked + span { color: var(--ink); background: color-mix(in srgb, var(--pc) 18%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--pc); }
.t-prio .p0 input:checked + span { box-shadow: inset 0 0 0 1.5px var(--brand); background: var(--brand-soft); }
.t-prio input:focus-visible + span, .t-icons input:focus-visible + span, .t-days input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.t-edit-subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.t-edit-sub { display: flex; align-items: center; gap: 8px; }
.t-edit-sub input[name="subTitle"] { flex: 1 1 0; width: 0; font-size: 15px; font-weight: 400; }
.t-edit-sub input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.t-add-sub { justify-self: start; }
.t-tag-picks { margin-top: -6px; }
.t-days span, .t-icons span {
  display: grid; place-items: center; cursor: pointer; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink-2); transition: background-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.t-days span { width: 38px; height: 38px; border-radius: 50%; font-weight: 700; font-size: 13px; }
.t-icons span { width: 44px; height: 44px; border-radius: 12px; }
.t-days input:checked + span { background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand); }
.t-icons input:checked + span { background: var(--brand-soft); color: var(--brand-strong); box-shadow: inset 0 0 0 1.5px var(--brand); }
.t-schedule { display: grid; gap: 12px; }
.t-has-schedule { align-self: start; padding: 0; }
.t-demo-note { margin: 0; text-align: center; }
/* Resumen del día y clima, lado a lado en pantallas anchas */
.t-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.t-top.single { grid-template-columns: minmax(0, 1fr); }
@container (max-width: 680px) { .t-top { grid-template-columns: minmax(0, 1fr); } }

/* Clima */
.t-weather { display: grid; gap: 12px; align-content: start; }
.t-weather-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.t-weather-place { max-width: 60%; }
.t-weather-place span { overflow: hidden; text-overflow: ellipsis; }
.t-weather-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.t-weather-icon { display: grid; place-items: center; color: var(--brand); filter: drop-shadow(0 4px 12px oklch(65% 0.14 var(--module-h) / .35)); }
.t-weather-now { display: grid; line-height: 1.1; }
.t-weather-temp { font-size: 40px; font-weight: 800; font-stretch: var(--wide); letter-spacing: -.03em; }
.t-weather-now span { color: var(--ink-2); font-size: 14px; }
.t-weather-facts { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 14px; margin: 0 0 0 auto; }
.t-weather-facts div { display: grid; gap: 1px; }
.t-weather-facts dt { font: 500 10.5px/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.t-weather-facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-hours {
  list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(36px, 1fr); gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.t-hours li { display: grid; justify-items: center; gap: 4px; padding: 4px 0; }
.t-hours .micro { font-size: 10px; color: var(--muted); letter-spacing: .02em; }
.t-hours .icon { color: var(--ink-2); }
.t-hours strong { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.t-hour-rain { font: 600 11px/1 var(--font-mono); color: var(--muted); }
.t-hour-rain.is-wet { color: oklch(62% 0.14 245); }
.t-weather-tip {
  display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 11px; border-radius: 10px;
  font-size: 13px; color: var(--ink-2); background: var(--surface-2);
}
.t-weather-tip .icon { flex: none; margin-top: 1px; color: var(--brand); }
.t-weather-stale { margin: 0; color: var(--muted); }
.t-weather-skeleton { display: grid; gap: 10px; }
.t-weather-skeleton span { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: t-shimmer 1.4s ease-in-out infinite; }
.t-weather-skeleton span:first-child { height: 40px; width: 55%; }
.t-weather-skeleton span:last-child { width: 80%; }
@keyframes t-shimmer { to { background-position: -200% 0; } }
.t-gps { width: 100%; }
.t-city-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.t-city {
  width: 100%; justify-content: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; white-space: normal; text-align: left;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.t-city .grow { display: grid; gap: 1px; }
.t-city:hover:not(:disabled) { background: var(--brand-soft); transform: translateX(3px); }
@container (max-width: 420px) {
  .t-weather-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; width: 100%; }
}

@container (max-width: 520px) {
  .t-hero { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
  .t-ring { width: 84px; height: 84px; }
  .t-ring-label strong { font-size: 24px; }
}

/* ---------- Finanzas › Deudas ---------- */
.stat-link { color: inherit; text-decoration: none; }
.notices { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.notices summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.notices .mini-list { margin-top: 8px; }
.notice-row { align-items: flex-start; }
.notice-row .grow { display: grid; gap: 3px; min-width: 0; }
.notice-text { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.notice-result { width: fit-content; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.notice-result.ok { background: var(--brand-soft); color: var(--brand-strong); }
.notice-result.warn { background: var(--warn-soft); color: var(--warn-text); }
.debts-aside { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: inherit; text-decoration: none; }
.debts-aside .grow { display: grid; gap: 2px; min-width: 0; }
.debts-aside > .icon { flex: none; color: var(--muted); }
.debts-aside:hover > .icon { color: var(--ink); }
.debt { position: relative; display: grid; gap: 10px; align-content: start; overflow: hidden; }
.debt::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 0% 0%, oklch(88% 0.08 var(--h) / .45), transparent 45%);
}
.debt.is-done { opacity: .85; }
.debt-head { display: flex; align-items: center; gap: 12px; }
.debt-head h2 { font-size: 17px; }
.debt-head p { margin: 2px 0 0; }
.debt-figures { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.debt-left { margin: 0; font-size: 14px; }
.debt-left strong { font: 650 22px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.debt .meter:not(.warn) { --fill: oklch(70% 0.15 var(--h)); --fill-2: oklch(74% 0.13 calc(var(--h) + 35)); }
.debt-progress { margin: 0; }
.debt-facts { margin-top: 4px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.debt-facts .fact { padding-top: 12px; }
.debt-facts .fact-value { font-size: 16px; }
.debt .note-box { margin: 0; }
.reminder-add { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: 13px; }
.debt-history { border-top: 1px solid var(--line); padding-top: 10px; }
.debt-history summary, .paid-debts summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.debt-history .plain-list { margin-top: 8px; }
.debt-entry { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.debt-entry:last-child { border-bottom: 0; }
.debt-entry .grow { display: grid; gap: 1px; font-size: 13.5px; }
.paid-debts { display: grid; gap: 14px; }
.paid-debts summary { font-size: 15px; }
.paid-debts[open] summary { margin-bottom: 4px; }
/* Tipo de deuda: fichas con ícono para elegir */
.kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.kind-grid legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kind-option {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .2s ease, background .2s ease;
}
.kind-option .tile { width: 28px; height: 28px; border-radius: 8px; }
.kind-option input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.kind-option:hover { background: color-mix(in oklch, oklch(80% 0.08 var(--h)) 18%, var(--surface-2)); }
.kind-option:has(input:checked) { color: var(--ink); background: color-mix(in oklch, oklch(80% 0.1 var(--h)) 22%, var(--surface)); box-shadow: inset 0 0 0 2px oklch(62% 0.14 var(--h)); }
.kind-option:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.rate-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.rate-row select { width: auto; }

/* ---------- Ayuda de IA: asistente, resumen, presupuesto sugerido, plan de deudas y plan del día ---------- */
.ai-chat { display: grid; gap: 12px; align-content: start; }
.ai-messages { display: grid; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 2px 2px 6px; scroll-behavior: smooth; }
.ai-msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; }
.ai-msg p { margin: 0; }
.ai-msg p + p, .ai-msg ul + p, .ai-msg p + ul { margin-top: 6px; }
.ai-msg ul { margin: 4px 0 0; padding-left: 18px; }
.ai-msg.user { justify-self: end; background: var(--brand-soft); color: var(--brand-strong); border-bottom-right-radius: 6px; }
.ai-msg.assistant { justify-self: start; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); border-bottom-left-radius: 6px; }
.ai-headline { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.ai-list { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.ai-budget { list-style: none; margin: 0; padding: 0; display: grid; }
.ai-budget li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ai-budget li:last-child { border-bottom: 0; }
.ai-budget .grow { display: grid; gap: 1px; min-width: 0; }
.ai-option { align-items: center; gap: 12px; }
.ai-option .grow { display: grid; gap: 2px; }
.t-plan-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 4px; counter-reset: plan; }
.t-plan-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.t-plan-row:last-child { border-bottom: 0; }
.t-plan-row .grow { display: grid; gap: 1px; min-width: 0; }
.t-plan-n { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand-strong); }
.t-plan-time { padding: 0; white-space: nowrap; }

/* ---------- Confeti ---------- */
.confetti { position: fixed; inset: 0; z-index: 300; width: 100vw; height: 100vh; pointer-events: none; }

/* ---------- Bloqueo de la app (core/lock.js) ---------- */
/* Mientras está bloqueada no se ve nada de la app, ni siquiera un instante al abrirla (boot.js pone data-locked). */
html[data-locked] #app, html[data-locked] dialog.modal, html[data-locked] .toasts, html[data-locked] .confetti { visibility: hidden; }
.lock-screen {
  inset: 0; width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border: 0;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  color: var(--ink); background:
    radial-gradient(60% 40% at 20% 10%, var(--aurora-a), transparent 70%),
    radial-gradient(50% 40% at 85% 85%, var(--aurora-b), transparent 70%), var(--paper);
}
.lock-screen[open] { display: grid; place-items: center; overflow-y: auto; }
.lock-screen::backdrop { background: var(--paper); }
.lock-inner { display: grid; justify-items: center; gap: 12px; width: min(330px, 100%); text-align: center; animation: pop .35s var(--spring); }
.lock-logo { border-radius: 18px; box-shadow: var(--glow-brand); }
.lock-title { margin: 4px 0 0; font-size: 22px; font-weight: 800; font-stretch: var(--wide); text-wrap: balance; }
.lock-hint { margin: 0; min-height: 1.45em; font-size: 14px; color: var(--muted); text-wrap: balance; }
.lock-hint.bad { color: var(--danger); }
.lock-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); text-align: left; }
.pin-dots { display: flex; gap: 14px; margin: 6px 0 12px; }
.pin-dots.shake { animation: shake .4s ease; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-strong); transition: transform .15s var(--spring), background .15s ease; }
.pin-dot.on { background: var(--grad-brand); box-shadow: var(--glow-brand); transform: scale(1.12); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px 22px; }
.pin-pad.is-waiting { opacity: .45; }
.pin-key {
  width: 72px; height: 72px; padding: 0; border-radius: 50%;
  font: 600 26px/1 var(--font-mono); color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.pin-key:hover:not(:disabled) { background: var(--brand-soft); }
.pin-key.pin-aux { background: none; box-shadow: none; color: var(--ink-2); }
.lock-forgot { margin-top: 4px; }
.lock-forgot-view { gap: 14px; }
.lock-forgot-view .btn, .lock-forgot-view .danger, .lock-forgot-view .danger-solid { width: 100%; white-space: normal; }

/* ---------- Ajustes › Seguridad ---------- */
.sec-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sec-row:first-of-type { border-top: 0; padding-top: 0; }
.sec-row .grow { display: grid; gap: 2px; min-width: 0; }
.sec-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--ink-2); }
.sec-badge.ok { background: color-mix(in srgb, var(--positive) 14%, transparent); color: var(--positive); }
.totp-setup { display: grid; gap: 12px; justify-items: center; text-align: center; }
.totp-qr { width: 196px; height: 196px; padding: 10px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
.totp-secret { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.totp-secret code { padding: 6px 10px; border-radius: 8px; background: var(--surface-3); font: 600 13px/1.4 var(--font-mono); letter-spacing: .06em; overflow-wrap: anywhere; }
.code-input { font: 600 22px/1 var(--font-mono); letter-spacing: .3em; text-align: center; }
.session-list { list-style: none; margin: 0; padding: 0; }
.session-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.session-list li:first-child { border-top: 0; padding-top: 0; }
.session-list .grow { display: grid; gap: 2px; min-width: 0; }
.session-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-3); color: var(--ink-2); }
.session-list li.is-current .session-icon { background: var(--brand-soft); color: var(--brand-strong); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- TuMi Plus (core/plan.js) ---------- */
.plus-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--on-brand); background: var(--grad-brand); box-shadow: var(--glow-brand);
}
.plus-chip .icon { width: 12px; height: 12px; }
.plus-upsell { display: grid; justify-items: start; gap: 10px; background:
  radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--brand-soft) 70%, transparent), transparent 60%), var(--surface); }
.plus-upsell h2 { margin: 0; font-size: 19px; font-weight: 800; font-stretch: var(--wide); text-wrap: balance; }
.plus-inline { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--ink-2); font-size: 13px; }
.plus-inline > .icon { flex: none; color: var(--brand-strong); }
.plus-inline .grow { min-width: 0; }
a.link-btn { white-space: nowrap; }
.nav-plus { margin-left: auto; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--on-brand); background: var(--grad-brand); }
.plus-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plus-features li { display: flex; gap: 12px; align-items: flex-start; }
.plus-features .session-icon { background: var(--brand-soft); color: var(--brand-strong); }
.plus-prices { display: flex; flex-wrap: wrap; gap: 10px; }
.plus-price { flex: 1 1 140px; padding: 12px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.plus-price strong { display: block; font: 700 18px/1.2 var(--font-mono); }
.plus-price.best { box-shadow: inset 0 0 0 2px var(--brand); background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }

/* ---------- iPhone: registro automático con Atajos (modules/ajustes/iphone.js) ---------- */
.ios-steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; line-height: 1.5; }
.ios-steps .totp-secret { margin-top: 6px; }
.ios-steps code, .ios-fields code { font-family: var(--font-mono); font-size: 12.5px; }
.ios-fields { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }

/* ---------- Legal: aceptación y reportes (core/legal.js, aipanels.js) ---------- */
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.check-row input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.ai-report { margin-top: 4px; font-size: 12px; color: var(--muted); }
.ai-report .icon { width: 13px; height: 13px; }

/* ============ Categorías: detalle, administrador y editor ============ */

.cat-hero { display: flex; align-items: center; gap: 14px; }
.cat-hero .tile { width: 52px; height: 52px; border-radius: 16px; }
.cat-total { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.1; }
.cat-hero p { margin: 0; }
.cat-versus { margin: 0; color: var(--ink-2); }
.cat-budget { display: grid; gap: 8px; }
.cat-budget .row { justify-content: space-between; }
.cat-txs, .cat-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; }

.cat-tx, .cat-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 4px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; color: var(--ink); font: inherit;
}
.cat-tx .grow, .cat-row .grow { display: grid; min-width: 0; }
.cat-tx:hover:not(:disabled), .cat-row:hover:not(:disabled) { background: var(--surface-2); transform: none; }

.badge-soft { padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; }
.cat-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.pick-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; display: grid; cursor: pointer; }
.pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pick > span {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.pick input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.pick.hue > span, .pick.hue input:checked + span { border-color: transparent; background: oklch(78% calc(.13 * var(--c, 1)) var(--h, 160)); }
.pick.hue input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.cat-budget .bar-track { display: block; margin: 0; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.cat-budget .bar-fill { border-radius: 4px; }
