/* Mi Panel — "noir y oro champaña". Sin estilos en línea (CSP). */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens: noir (por defecto) ---------- */
:root {
  color-scheme: dark;
  --fondo: #0B0B0D;
  --fondo-luz: rgba(201, 168, 106, .055);
  --superficie: #141417;
  --superficie-2: #1B1B1F;
  --superficie-3: #232328;
  --borde: rgba(255, 255, 255, .06);
  --borde-2: rgba(255, 255, 255, .11);
  --oro: #C9A86A;
  --oro-brillo: #E4CFA0;
  --oro-texto: #D4B67C;
  --oro-suave: rgba(201, 168, 106, .12);
  --oro-linea: rgba(228, 207, 160, .38);
  --sobre-oro: #17130B;
  --texto: #F4EFE6;
  --texto-2: #9A958C;
  --texto-3: #6A665F;
  --salvia: #7FB69A;
  --ambar: #E0A458;
  --rubi: #D16A6A;
  --rubi-suave: rgba(209, 106, 106, .10);
  --neutro-1: #6E685F;
  --neutro-2: #4D4943;
  --neutro-3: #36332F;
  --barra: rgba(20, 20, 23, .72);
  --sombra: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 48px -24px rgba(0, 0, 0, .7);
  --grano-opacidad: .05;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radio: 20px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-cajon: cubic-bezier(0.32, 0.72, 0, 1);
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
  --seguro-arriba: env(safe-area-inset-top, 0px);
}

/* ---------- marfil (modo claro) ---------- */
@media (prefers-color-scheme: light) {
  :root:not([data-tema="noir"]) {
    color-scheme: light;
    --fondo: #F7F3EC;
    --fondo-luz: rgba(201, 168, 106, .10);
    --superficie: #FFFDF9;
    --superficie-2: #F3EEE5;
    --superficie-3: #EAE3D7;
    --borde: rgba(26, 26, 26, .07);
    --borde-2: rgba(26, 26, 26, .13);
    --oro-texto: #92733A;
    --oro-suave: rgba(201, 168, 106, .16);
    --oro-linea: rgba(201, 168, 106, .55);
    --texto: #1A1A1A;
    --texto-2: #6E685F;
    --texto-3: #9C958A;
    --salvia: #4E8C6C;
    --ambar: #B87A2C;
    --rubi: #B44C4C;
    --rubi-suave: rgba(180, 76, 76, .08);
    --neutro-1: #B9B0A2;
    --neutro-2: #D2CABD;
    --neutro-3: #E2DBCF;
    --barra: rgba(255, 253, 249, .74);
    --sombra: 0 1px 2px rgba(60, 45, 20, .04), 0 18px 40px -22px rgba(60, 45, 20, .22);
    --grano-opacidad: .035;
  }
}
:root[data-tema="marfil"] {
  color-scheme: light;
  --fondo: #F7F3EC;
  --fondo-luz: rgba(201, 168, 106, .10);
  --superficie: #FFFDF9;
  --superficie-2: #F3EEE5;
  --superficie-3: #EAE3D7;
  --borde: rgba(26, 26, 26, .07);
  --borde-2: rgba(26, 26, 26, .13);
  --oro-texto: #92733A;
  --oro-suave: rgba(201, 168, 106, .16);
  --oro-linea: rgba(201, 168, 106, .55);
  --texto: #1A1A1A;
  --texto-2: #6E685F;
  --texto-3: #9C958A;
  --salvia: #4E8C6C;
  --ambar: #B87A2C;
  --rubi: #B44C4C;
  --rubi-suave: rgba(180, 76, 76, .08);
  --neutro-1: #B9B0A2;
  --neutro-2: #D2CABD;
  --neutro-3: #E2DBCF;
  --barra: rgba(255, 253, 249, .74);
  --sombra: 0 1px 2px rgba(60, 45, 20, .04), 0 18px 40px -22px rgba(60, 45, 20, .22);
  --grano-opacidad: .035;
}

/* ---------- base y plataforma (mobile-native) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  background: var(--fondo);
}
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 70% at 50% -10%, var(--fondo-luz), transparent 60%),
    var(--fondo);
  background-attachment: fixed;
  color: var(--texto);
  font: 400 15px/1.5 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* grano casi invisible */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grano-opacidad);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, select { font-size: 16px; }
button, a, [role="button"], label.interruptor, .segmento label {
  touch-action: manipulation;
}
button, [role="button"], .tab, .chip, .boton, .nav a, .segmento label {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; border-radius: 6px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .monto, td.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11"; }

/* ---------- tipografía ---------- */
.serif { font-family: var(--serif); }
h1, h2, h3 { margin: 0; font-weight: 400; }
.titulo {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 380;
  font-size: clamp(34px, 9vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.titulo em { font-style: italic; color: var(--oro-texto); font-weight: 340; }
.versalita {
  font-size: 11px;
  font-weight: 560;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--texto-2);
}
.seccion-titulo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 36px 4px 12px;
}
.seccion-titulo h2 { font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: -0.01em; }
.seccion-titulo .versalita { white-space: nowrap; }
.secundario { color: var(--texto-2); }
.terciario { color: var(--texto-3); }

/* montos: centavos más pequeños y en tono secundario */
.monto { white-space: nowrap; font-weight: 500; letter-spacing: -0.01em; }
.monto__cent { font-size: .72em; color: var(--texto-2); font-weight: 400; letter-spacing: 0; }
.monto__moneda { font-size: .62em; color: var(--texto-2); margin-left: .35em; letter-spacing: .08em; font-weight: 500; }
.monto--grande {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(40px, 12vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144;
}
.monto--grande .monto__cent { font-size: .42em; vertical-align: .9em; margin-left: .04em; }
.monto--nulo { color: var(--texto-3); }

/* ---------- estructura ---------- */
.app {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--seguro-arriba) + 20px) 16px calc(var(--seguro-abajo) + 108px);
}
.cabecera {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 4px 24px;
}
.cabecera__texto { min-width: 0; }
.cabecera .versalita { display: block; margin-bottom: 10px; }
.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 500 13px/1 var(--sans);
  letter-spacing: .04em;
  color: var(--oro-texto);
  background: var(--superficie);
  border: 1px solid var(--oro-linea);
  transition: transform 160ms var(--ease-out);
}
.avatar:active { transform: scale(0.95); }
.marca { display: none; }

/* ---------- tarjetas ---------- */
.tarjeta {
  position: relative;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 22px;
}
.tarjeta::before { /* brillo dorado sutil en el borde superior */
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro-linea), transparent);
  pointer-events: none;
}
.tarjeta + .tarjeta { margin-top: 14px; }
.tarjeta--plana { box-shadow: none; }
.tarjeta--rubi::before { background: linear-gradient(90deg, transparent, rgba(209, 106, 106, .5), transparent); }
.separador { height: 1px; background: var(--borde); margin: 18px 0; border: 0; }

/* entradas suaves (@starting-style, < 250 ms) */
.entra {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
@starting-style {
  .entra { opacity: 0; transform: translateY(8px); }
}
.entra:nth-child(2) { transition-delay: 40ms; }
.entra:nth-child(3) { transition-delay: 80ms; }
.entra:nth-child(4) { transition-delay: 120ms; }
.entra:nth-child(n+5) { transition-delay: 160ms; }

/* ---------- héroe de Hoy ---------- */
.heroe { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 26px 22px 22px; }
.heroe__anillo { position: relative; width: min(232px, 64vw); margin: 4px auto 0; aspect-ratio: 1; }
.heroe__centro {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
  pointer-events: none;
}
.heroe__centro .monto--grande { font-size: clamp(34px, 10vw, 44px); }
.heroe__pie { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--borde); border-radius: 14px; overflow: hidden; }
.heroe__dato { background: var(--superficie); padding: 12px 4px 2px; }
.heroe__dato .monto { font-size: 18px; }
.punto { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 2px; background: var(--neutro-1); }
.punto--oro { background: var(--oro); }
.punto--rubi { background: var(--rubi); }
.punto--salvia { background: var(--salvia); }
.punto--ambar { background: var(--ambar); }

.anillo__pista { stroke: var(--superficie-3); }
.g-stop-oro { stop-color: var(--oro); }
.g-stop-brillo { stop-color: var(--oro-brillo); }
.g-stop-area { stop-color: var(--oro); stop-opacity: .22; }
.g-stop-transparente { stop-color: var(--oro); stop-opacity: 0; }

/* gráficas */
.g-oro { fill: var(--oro); stroke: var(--oro); }
.g-neutro { fill: var(--neutro-2); stroke: var(--neutro-2); }
.g-neutro-1 { stroke: var(--neutro-1); }
.g-neutro-2 { stroke: var(--neutro-2); }
.g-neutro-3 { stroke: var(--neutro-3); }
path.barra { stroke: none; }
.g-toque { fill: transparent; cursor: default; }
.g-toque:focus-visible { outline: none; fill: var(--oro-suave); }
.g-eje { fill: var(--texto-3); font: 500 10px var(--sans); letter-spacing: .06em; }
.g-eje--actual { fill: var(--oro-texto); }
.g-eje--promedio { fill: var(--texto-2); font-size: 10px; letter-spacing: .02em; }
.g-promedio { stroke: var(--texto-3); stroke-width: 1; }
.g-base { stroke: var(--borde-2); stroke-width: 1; }
.g-guia { stroke: var(--borde-2); stroke-width: 1; }
.g-etq { fill: var(--texto); font: 500 12px var(--sans); }
.g-etq--oro { fill: var(--oro-texto); }
.g-etq-sub { fill: var(--texto-2); font: 400 11px var(--sans); font-variant-numeric: tabular-nums; }
.g-centro { fill: var(--texto); font: 360 22px var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.g-centro-sub { fill: var(--texto-3); font: 500 9px var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.dona__arco { transition: opacity 160ms ease; }
.dona__arco.g-oro { fill: none; }
.mini-barras, .barras-meses, .dona { width: 100%; height: auto; overflow: visible; }
.mini-barras path.barra:focus-visible, .dona__arco:focus-visible { outline: none; opacity: .75; }
.spark { width: 100%; height: 72px; overflow: visible; }
.spark__linea { stroke: var(--oro); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark__punto { fill: var(--superficie); stroke: var(--oro); stroke-width: 1.2; }
.spark__punto--ultimo { fill: var(--oro); }
@media (prefers-reduced-motion: no-preference) {
  .barras-meses path.barra, .mini-barras path.barra {
    transform-box: fill-box;
    transform-origin: bottom;
    animation: barra-crece 600ms var(--ease-out) both;
  }
  @keyframes barra-crece { from { transform: scaleY(0.04); opacity: 0; } }
}

/* tooltip elegante */
.tip {
  position: fixed;
  z-index: 60;
  left: 0;
  top: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(28, 27, 31, .94);
  color: #F4EFE6;
  border: 1px solid rgba(228, 207, 160, .22);
  font: 500 12px/1.3 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.97);
  transform-origin: bottom center;
  transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
}
.tip.visible { opacity: 1; transform: translateY(0) scale(1); }
.tip.instantaneo { transition-duration: 0ms; }

/* ---------- listas de vencimientos ---------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista > li + li { border-top: 1px solid var(--borde); }
.venc {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 320ms var(--ease-in-out), opacity 200ms ease;
}
.venc__dentro {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 12px;
  padding: 16px 0;
}
.tarjeta > .lista { margin: -8px 0; }
.icono-redondo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--oro-texto);
  background: var(--superficie-2);
  border: 1px solid var(--borde);
}
.icono-redondo svg { width: 20px; height: 20px; }
.venc--vencido .icono-redondo { color: var(--rubi); background: var(--rubi-suave); }
.venc__info { min-width: 0; }
.venc__nombre {
  display: block;
  font-weight: 500;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.venc__meta { display: block; font-size: 13px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.venc__meta .rubi { color: var(--rubi); }
.venc__meta .ambar { color: var(--ambar); }
.venc__monto { text-align: right; font-size: 16px; }
.venc__accion { grid-column: 2 / -1; display: flex; gap: 8px; }
.venc__accion .boton { flex: 1; }
.etiqueta-personal { display: inline-flex; align-items: center; gap: 3px; color: var(--texto-3); }
.etiqueta-personal svg { width: 11px; height: 11px; }

/* "Marcar pagado": la fila se desliza y aparece un ✓ dorado */
.venc__pagado {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--oro-texto);
  font-weight: 500;
}
.venc--pagado .venc__pagado { display: flex; }
.check-oro {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--oro-brillo), var(--oro));
  color: var(--sobre-oro);
}
.check-oro svg { width: 16px; height: 16px; }
.venc--pagado .venc__dentro { grid-template-columns: minmax(0, 1fr) auto; }
@media (prefers-reduced-motion: no-preference) {
  .venc--pagado .venc__pagado { animation: desliza-entra 260ms var(--ease-out) both; }
  .venc--pagado .check-oro { animation: check-entra 320ms var(--ease-out) 80ms both; }
  .venc--pagado .check-oro path { stroke-dasharray: 24; animation: trazo 300ms var(--ease-out) 180ms both; }
  @keyframes desliza-entra { from { transform: translateX(-24px); opacity: 0; } }
  @keyframes check-entra { from { transform: scale(0.6); opacity: 0; } }
  @keyframes trazo { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
}
.venc--saliendo { grid-template-rows: 0fr; opacity: 0; }
.venc--saliendo .venc__dentro { padding-block: 0; }

/* ---------- botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--borde-2);
  background: var(--superficie-2);
  color: var(--texto);
  font: 500 15px/1 var(--sans);
  letter-spacing: .005em;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
}
.boton svg { width: 18px; height: 18px; flex: none; }
.boton:active { transform: scale(0.97); }
.boton--oro {
  border-color: transparent;
  background: linear-gradient(180deg, var(--oro-brillo) -60%, var(--oro) 70%);
  color: var(--sobre-oro);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 10px 24px -14px rgba(201, 168, 106, .8);
  font-weight: 600;
}
.boton--grande { min-height: 52px; border-radius: 16px; font-size: 16px; width: 100%; }
.boton--fantasma { background: transparent; border-color: var(--borde-2); }
.boton--texto { background: none; border: 0; min-height: 36px; padding: 0 6px; color: var(--oro-texto); }
.boton--peligro { color: var(--rubi); background: transparent; border-color: rgba(209, 106, 106, .3); }
.boton--chico { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.boton[disabled], .boton.htmx-request { opacity: .6; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .boton:hover { border-color: var(--oro-linea); }
  .boton--oro:hover { background: linear-gradient(180deg, var(--oro-brillo) -30%, var(--oro) 80%); }
  .fila-enlace:hover { background: var(--superficie-2); }
  .nav a:hover { color: var(--texto); }
  .tile:hover { border-color: var(--oro-linea); }
  .dia-cal:hover { background: var(--superficie-2); }
}
.acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.acciones form { display: contents; }

/* ---------- navegación: barra inferior translúcida ---------- */
.nav {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 8px calc(var(--seguro-abajo) + 6px);
  background: var(--barra);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  backdrop-filter: saturate(160%) blur(22px);
  border-top: 1px solid var(--borde);
}
.nav a {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 0 4px;
  color: var(--texto-3);
  font: 500 10.5px/1 var(--sans);
  letter-spacing: .05em;
  transition: color 160ms ease, transform 140ms var(--ease-out);
}
.nav a svg { width: 24px; height: 24px; }
.nav a:active { transform: scale(0.94); }
.nav a[aria-current="page"] { color: var(--oro-texto); }
.nav__marca { display: none; }

/* ---------- filas y detalles ---------- */
.fila-enlace {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 10px;
  margin: 0 -10px;
  border-radius: 14px;
  transition: background-color 160ms ease;
}
.fila-enlace:active { background: var(--superficie-2); }
.fila-enlace__der { text-align: right; display: grid; gap: 2px; justify-items: end; }
.fila-enlace__der small { font-size: 12px; color: var(--texto-2); white-space: nowrap; }
.detalles { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0; margin: 0; }
.detalles dt, .detalles dd { padding: 13px 0; border-top: 1px solid var(--borde); margin: 0; }
.detalles dt { color: var(--texto-2); font-size: 13px; padding-right: 16px; }
.detalles dd { text-align: right; overflow-wrap: anywhere; }
.detalles dt:first-of-type, .detalles dt:first-of-type + dd { border-top: 0; }
.estado { font-size: 12px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.estado--pagado { color: var(--salvia); }
.estado--vencido { color: var(--rubi); }
.estado--pendiente { color: var(--ambar); }
.estado--omitido { color: var(--texto-3); }

/* chips / filtros */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 8px; padding: 2px 16px 6px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  scroll-snap-align: start;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--borde-2);
  font-size: 13px;
  color: var(--texto-2);
  transition: transform 140ms var(--ease-out), color 160ms ease, border-color 160ms ease;
}
.chip:active { transform: scale(0.96); }
.chip[aria-current="true"] { color: var(--sobre-oro); background: var(--oro); border-color: var(--oro); font-weight: 600; }

/* ---------- formularios ---------- */
.campo { display: grid; gap: 8px; margin-bottom: 18px; }
.campo > label, .campo > .etq { font-size: 12px; font-weight: 560; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-2); }
.campo small { color: var(--texto-3); font-size: 12.5px; }
.entrada, select.entrada, textarea.entrada {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--borde-2);
  background: var(--superficie-2);
  color: var(--texto);
  font-size: 16px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  -webkit-appearance: none;
  appearance: none;
}
textarea.entrada { min-height: 96px; resize: vertical; line-height: 1.5; }
select.entrada {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23C9A86A' stroke-width='1.4'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.entrada:focus { border-color: var(--oro); box-shadow: 0 0 0 4px var(--oro-suave); }
.entrada::placeholder { color: var(--texto-3); }
.entrada--monto { font: 380 30px/1.1 var(--serif); letter-spacing: -0.02em; padding: 12px 14px 12px 34px; font-variant-numeric: tabular-nums; }
.con-prefijo { position: relative; }
.con-prefijo::before { content: "$"; position: absolute; left: 15px; top: 50%; transform: translateY(-52%); font: 380 24px var(--serif); color: var(--texto-2); pointer-events: none; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dos > .campo { min-width: 0; }
input[type="date"].entrada, input[type="time"].entrada { min-width: 0; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
.grupo { border: 0; padding: 0; margin: 0; min-width: 0; }
.grupo + .grupo { margin-top: 10px; }
.grupo legend { padding: 0; margin: 0 0 14px; font-family: var(--serif); font-size: 20px; }
.ayuda { font-size: 13px; color: var(--texto-2); margin: -6px 0 18px; }
.error {
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--rubi-suave);
  border: 1px solid rgba(209, 106, 106, .25);
  color: var(--rubi);
  margin-bottom: 18px;
  font-size: 14px;
}
/* interruptor */
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }
.interruptor input { position: absolute; opacity: 0; pointer-events: none; }
.interruptor__riel {
  flex: none;
  width: 48px;
  height: 30px;
  border-radius: 999px;
  background: var(--superficie-3);
  border: 1px solid var(--borde-2);
  position: relative;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.interruptor__riel::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--texto);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  transition: transform 220ms var(--ease-out);
}
.interruptor input:checked + .interruptor__riel { background: var(--oro); border-color: var(--oro); }
.interruptor input:checked + .interruptor__riel::after { transform: translateX(18px); background: #FFFDF8; }
.interruptor input:focus-visible + .interruptor__riel { outline: 2px solid var(--oro); outline-offset: 2px; }
.interruptor small { display: block; color: var(--texto-3); font-size: 12.5px; }
/* segmentado */
.segmento { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 13px; background: var(--superficie-2); border: 1px solid var(--borde); }
.segmento input { position: absolute; opacity: 0; pointer-events: none; }
.segmento label { text-align: center; padding: 10px 6px; border-radius: 10px; font-size: 14px; color: var(--texto-2); cursor: pointer; transition: background-color 180ms ease, color 180ms ease; }
.segmento input:checked + label { background: var(--superficie); color: var(--texto); box-shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 0 0 1px var(--borde-2); }
.segmento input:focus-visible + label { outline: 2px solid var(--oro); }
.solo-si { display: none; }
.solo-si.visible { display: block; }

/* ---------- hoja inferior (dialog) ---------- */
dialog.hoja {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  padding: 0;
  border: 1px solid var(--borde-2);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: var(--superficie);
  color: var(--texto);
  overflow: hidden;
  overscroll-behavior: contain;
  opacity: 1;
  transform: translateY(0);
  transition: transform 300ms var(--ease-cajon), opacity 200ms ease, overlay 300ms allow-discrete, display 300ms allow-discrete;
}
dialog.hoja:not([open]) { transform: translateY(100%); opacity: 1; }
@starting-style { dialog.hoja[open] { transform: translateY(100%); } }
dialog.hoja::backdrop {
  background: rgba(5, 5, 7, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 1;
  transition: opacity 260ms ease, overlay 300ms allow-discrete, display 300ms allow-discrete;
}
dialog.hoja:not([open])::backdrop { opacity: 0; }
@starting-style { dialog.hoja[open]::backdrop { opacity: 0; } }
.hoja__contenido { padding: 10px 22px calc(var(--seguro-abajo) + 22px); overflow-y: auto; max-height: 92dvh; overscroll-behavior: contain; }
.hoja__asa { width: 38px; height: 5px; border-radius: 3px; background: var(--borde-2); margin: 0 auto 18px; }
.hoja__titulo { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.hoja__titulo h2 { font-family: var(--serif); font-size: 24px; letter-spacing: -0.01em; line-height: 1.15; }
.hoja__cerrar { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--borde-2); background: var(--superficie-2); display: grid; place-items: center; cursor: pointer; transition: transform 140ms var(--ease-out); }
.hoja__cerrar:active { transform: scale(0.94); }
.hoja__cerrar svg { width: 16px; height: 16px; }
@media (min-width: 700px) {
  dialog.hoja { inset: 0; margin: auto; border-radius: 24px; border-bottom: 1px solid var(--borde-2); max-height: 86dvh; transform: scale(1); }
  dialog.hoja:not([open]) { transform: scale(0.96); opacity: 0; }
  @starting-style { dialog.hoja[open] { transform: scale(0.96); opacity: 0; } }
  .hoja__asa { display: none; }
}
.subir {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed var(--borde-2);
  color: var(--texto-2);
  cursor: pointer;
  font-size: 14px;
}
.subir svg { width: 20px; height: 20px; color: var(--oro-texto); flex: none; }
.subir input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.subir span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- vacíos con clase ---------- */
.vacio { text-align: center; padding: 34px 20px 30px; }
.vacio svg { width: 120px; height: 72px; margin: 0 auto 18px; color: var(--oro); }
.vacio p { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 360; letter-spacing: -0.01em; }
.vacio small { display: block; margin-top: 8px; color: var(--texto-2); font-size: 14px; }
.vacio .boton { margin-top: 22px; }

/* ---------- aviso (toast) ---------- */
.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: calc(var(--seguro-arriba) + 14px);
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(28, 27, 31, .94);
  color: #F4EFE6;
  border: 1px solid rgba(228, 207, 160, .25);
  font-size: 14px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: translate(-50%, 0);
  opacity: 1;
  transition: transform 260ms var(--ease-out), opacity 200ms ease;
}
@starting-style { .toast { transform: translate(-50%, -120%); opacity: 0; } }
.toast.fuera { transform: translate(-50%, -120%); opacity: 0; transition-duration: 200ms; }

/* ---------- plantillas ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
.tile {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  padding: 18px 8px 14px;
  border-radius: 18px;
  border: 1px solid var(--borde);
  background: var(--superficie);
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
  transition: transform 140ms var(--ease-out), border-color 160ms ease;
}
.tile:active { transform: scale(0.97); }
.tile svg { width: 26px; height: 26px; color: var(--oro-texto); }
.tile small { color: var(--texto-3); font-size: 11px; }

/* ---------- calendario ---------- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-nav h2 { font-family: var(--serif); font-size: 24px; text-transform: capitalize; }
.cal-nav a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--borde-2); transition: transform 140ms var(--ease-out); }
.cal-nav a:active { transform: scale(0.95); }
.cal-nav svg { width: 18px; height: 18px; }
.cal { width: 100%; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal__dsem { text-align: center; padding: 4px 0 10px; font-size: 10.5px; letter-spacing: .12em; color: var(--texto-3); font-weight: 560; }
.dia-cal {
  position: relative;
  aspect-ratio: 1 / 1.08;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  padding: 6px 0 7px;
  border-radius: 12px;
  border: 0;
  background: none;
  cursor: pointer;
  transition: background-color 160ms ease, transform 140ms var(--ease-out);
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.dia-cal:active { transform: scale(0.94); }
.dia-cal__n { font-size: 15px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.dia-cal--fuera { color: var(--texto-3); opacity: .45; }
.dia-cal--hoy .dia-cal__n { border: 1px solid var(--oro); color: var(--oro-texto); }
.dia-cal--sel { background: var(--superficie-2); }
.dia-cal__puntos { display: flex; gap: 3px; height: 5px; }
.dia-cal__puntos i { width: 5px; height: 5px; border-radius: 50%; background: var(--oro); }
.dia-cal__puntos i.p-vencido { background: var(--rubi); }
.dia-cal__puntos i.p-pagado { background: var(--salvia); }
.dia-cal__puntos i.p-omitido { background: var(--texto-3); }
.dia-cal__puntos i.p-recordatorio { background: transparent; box-shadow: inset 0 0 0 1px var(--texto-2); }
.leyenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--texto-2); }
.agenda-dia { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--borde); }
.agenda-dia:first-child { border-top: 0; }
.agenda-dia__fecha { text-align: center; }
.agenda-dia__fecha b { display: block; font: 360 28px/1 var(--serif); font-variant-numeric: tabular-nums; }
.agenda-dia__fecha span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-2); }
.agenda-dia--hoy .agenda-dia__fecha b { color: var(--oro-texto); }
.evento { display: flex; align-items: center; gap: 10px; padding: 6px 0; min-width: 0; }
.evento__barra { width: 3px; align-self: stretch; border-radius: 2px; background: var(--oro); flex: none; min-height: 34px; }
.evento--vencido .evento__barra { background: var(--rubi); }
.evento--pagado .evento__barra { background: var(--salvia); }
.evento--omitido .evento__barra { background: var(--texto-3); }
.evento--recordatorio .evento__barra { background: var(--texto-2); }
.evento__txt { min-width: 0; flex: 1; }
.evento__txt b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evento__txt span { font-size: 12.5px; color: var(--texto-2); }
.evento--pagado .evento__txt b { color: var(--texto-2); }

/* ---------- gastos ---------- */
.comparativo { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; border: 1px solid var(--borde-2); font-variant-numeric: tabular-nums; }
.comparativo svg { width: 14px; height: 14px; }
.comparativo--sube { color: var(--ambar); }
.comparativo--baja { color: var(--salvia); }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-3); font-weight: 560; padding: 0 0 10px; }
.tabla td { padding: 12px 0; border-top: 1px solid var(--borde); vertical-align: top; }
.tabla td + td, .tabla th + th { padding-left: 12px; }
.tabla .der { text-align: right; }
.tabla td.trunca { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desplaza { overflow-x: auto; }

/* ---------- login ---------- */
.acceso { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--seguro-arriba) + 24px) 16px calc(var(--seguro-abajo) + 24px); }
.acceso__caja { width: 100%; max-width: 400px; }
.monograma { width: 64px; height: 64px; margin: 0 auto 22px; color: var(--oro); }
.acceso h1 { text-align: center; font-family: var(--serif); font-size: 38px; font-weight: 360; letter-spacing: -0.02em; }
.acceso h1 em { color: var(--oro-texto); }
.acceso .bajada { text-align: center; color: var(--texto-2); margin: 10px 0 30px; }
.acceso .tarjeta { padding: 26px 22px 22px; }
.qr { background: #FFFDF8; padding: 14px; border-radius: 16px; width: 200px; margin: 0 auto 16px; }
.qr svg { width: 100%; height: auto; }
.qr path { fill: #111; }
.codigo-secreto { font: 500 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; word-break: break-all; text-align: center; color: var(--texto-2); padding: 12px; border-radius: 12px; background: var(--superficie-2); user-select: all; -webkit-user-select: all; }
.entrada--codigo { text-align: center; font: 400 30px/1 var(--serif); letter-spacing: .35em; padding-left: .35em; font-variant-numeric: tabular-nums; }
.enlace-copiar { font: 13px/1.5 ui-monospace, Menlo, monospace; word-break: break-all; padding: 14px; border-radius: 14px; background: var(--superficie-2); border: 1px solid var(--borde-2); user-select: all; -webkit-user-select: all; }

/* ---------- servicio ---------- */
.ficha-cabeza { display: flex; gap: 16px; align-items: center; margin: 4px 4px 24px; }
.ficha-cabeza .icono-redondo { width: 56px; height: 56px; border-radius: 16px; }
.ficha-cabeza .icono-redondo svg { width: 26px; height: 26px; }
.ficha-cabeza h1 { font-family: var(--serif); font-size: clamp(26px, 7vw, 34px); line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; font-weight: 380; }
.volver { display: inline-flex; align-items: center; gap: 6px; color: var(--texto-2); font-size: 14px; margin: 0 4px 14px; min-height: 36px; }
.volver svg { width: 16px; height: 16px; }
.proximo { display: grid; gap: 6px; }
.proximo .monto--grande { font-size: clamp(38px, 11vw, 50px); }
.variacion { font-size: 13px; color: var(--texto-2); }
.variacion b { font-weight: 500; }
.variacion .sube { color: var(--ambar); }
.variacion .baja { color: var(--salvia); }
.bitwarden { display: flex; align-items: center; gap: 14px; }
.bitwarden svg { width: 20px; height: 20px; color: var(--oro-texto); }
.archivo { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--borde); }
.archivo:first-child { border-top: 0; }
.archivo a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archivo svg { width: 18px; height: 18px; color: var(--texto-2); flex: none; }
.archivo small { color: var(--texto-3); white-space: nowrap; }

/* perfil */
.perfil-cabeza { display: flex; gap: 16px; align-items: center; margin: 8px 4px 26px; }
.perfil-cabeza .avatar { width: 64px; height: 64px; font-size: 20px; }
.perfil-cabeza h1 { font-family: var(--serif); font-size: 30px; font-weight: 380; overflow-wrap: anywhere; }
.menu-lista a, .menu-lista button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 0; border: 0; border-top: 1px solid var(--borde); background: none; text-align: left; cursor: pointer; font-size: 15px; }
.menu-lista > :first-child { border-top: 0; }
.menu-lista svg { width: 20px; height: 20px; color: var(--oro-texto); flex: none; }
.menu-lista .flecha { margin-left: auto; color: var(--texto-3); width: 16px; height: 16px; }
.pildora { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 560; letter-spacing: .06em; border: 1px solid var(--borde-2); color: var(--texto-2); white-space: nowrap; }
.pildora--oro { color: var(--oro-texto); border-color: var(--oro-linea); }
.pildora--rubi { color: var(--rubi); border-color: rgba(209, 106, 106, .35); }
.pildora--salvia { color: var(--salvia); border-color: rgba(127, 182, 154, .35); }

/* FAB para agregar */
.fab {
  position: fixed;
  z-index: 41;
  right: 18px;
  bottom: calc(var(--seguro-abajo) + 84px);
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--oro-brillo) -60%, var(--oro) 70%);
  color: var(--sobre-oro);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 16px 30px -12px rgba(201, 168, 106, .7);
  transition: transform 140ms var(--ease-out);
}
.fab svg { width: 24px; height: 24px; }
.fab:active { transform: scale(0.94); }

/* ---------- escritorio ---------- */
@media (min-width: 960px) {
  body { font-size: 15px; }
  .app { max-width: 1240px; margin: 0 0 0 248px; padding: 52px 64px 96px; }
  .nav {
    top: 0;
    right: auto;
    width: 248px;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 2px;
    padding: 40px 18px;
    border-top: 0;
    border-right: 1px solid var(--borde);
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav__marca { display: flex; align-items: center; gap: 10px; padding: 0 14px 34px; font: 380 24px var(--serif); color: var(--texto); letter-spacing: -0.01em; }
  .nav__marca svg { width: 28px; height: 28px; color: var(--oro); }
  .nav__marca em { color: var(--oro-texto); }
  .nav a { grid-template-columns: 22px 1fr; justify-items: start; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; letter-spacing: .01em; }
  .nav a svg { width: 20px; height: 20px; }
  .nav a[aria-current="page"] { background: var(--superficie); box-shadow: inset 0 0 0 1px var(--borde); }
  .cabecera { margin-bottom: 32px; }
  .titulo { font-size: 52px; }
  .rejilla { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .rejilla > * { min-width: 0; }
  .rejilla .seccion-titulo:first-child { margin-top: 0; }
  .heroe { grid-template-columns: 260px minmax(0, 1fr); align-items: center; padding: 34px 40px; gap: 56px; }
  #resumen { margin-bottom: 8px; }
  .heroe__anillo { width: 260px; margin: 0; }
  .fab { right: 48px; bottom: 48px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .formulario { max-width: 640px; }
}

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 120ms !important; transition-delay: 0ms !important; }
  .entra, dialog.hoja, .toast { transform: none !important; }
}
span.solo-si.visible { display: inline; }
.ficha-cabeza__texto { min-width: 0; }
.ic--chico { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.venc__dentro--solo { grid-template-columns: 1fr; padding: 18px 0 4px; }
.lista--sola { margin: 0; }
.notas { white-space: pre-line; overflow-wrap: anywhere; margin: 0; }
.con-margen { margin-top: 14px; }
.tabla form { display: inline; }
.tabla .boton--texto { min-height: 28px; font-size: 12px; padding: 0; }
.ayuda--centro { text-align: center; margin: 14px 0 0; }
.segmento--vista { margin-bottom: 14px; max-width: 280px; }
.segmento--vista a { text-align: center; padding: 9px 6px; border-radius: 10px; font-size: 14px; color: var(--texto-2); transition: background-color 180ms ease, color 180ms ease; }
.segmento--vista a[aria-selected="true"] { background: var(--superficie); color: var(--texto); box-shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 0 0 1px var(--borde-2); }
.punto--anillo { background: transparent; box-shadow: inset 0 0 0 1px var(--texto-2); }
.seccion-titulo--dentro { margin: 0 0 8px; }
.seccion-titulo--dentro h2 { font-size: 19px; }
.sin-eventos { margin: 6px 0 2px; font-size: 14px; }
.evento .monto { font-size: 14px; }
.ayuda--lista { margin: 14px 4px 0; }
.gasto-cifra { margin: 10px 0 14px; }
.leyenda--graf { margin: 10px 0 0; }
.linea-punteada { display: inline-block; width: 14px; height: 0; border-top: 1px dashed var(--texto-3); vertical-align: 3px; margin-right: 6px; }
.sesion { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--borde); }
.sesion:first-child { border-top: 0; }
.sesion svg { width: 20px; height: 20px; color: var(--texto-3); flex: none; }
.segmento--tema { margin-bottom: 14px; }
.plegable summary { cursor: pointer; font-family: var(--serif); font-size: 19px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.plegable summary::-webkit-details-marker { display: none; }
.plegable summary::after { content: "+"; color: var(--oro-texto); font: 300 24px/1 var(--sans); transition: transform 200ms var(--ease-out); }
.plegable[open] summary::after { transform: rotate(45deg); }
.plegable[open] summary { margin-bottom: 18px; }
.avatar--chico { width: 36px; height: 36px; font-size: 12px; }
.menu-usuario { position: relative; margin-left: auto; }
.menu-usuario summary { list-style: none; }
.menu-usuario summary::-webkit-details-marker { display: none; }
.menu-usuario__caja { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 190px; padding: 8px 14px; border-radius: 14px; background: var(--superficie-2); border: 1px solid var(--borde-2); box-shadow: var(--sombra); display: grid; transform-origin: top right; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }
@starting-style { .menu-usuario[open] .menu-usuario__caja { opacity: 0; transform: scale(0.96); } }
.menu-usuario__caja .boton--texto { justify-content: flex-start; width: 100%; }
.nowrap { white-space: nowrap; }
code { font: 13px ui-monospace, Menlo, monospace; color: var(--oro-texto); }
.campo > label.subir { font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--texto-2); }
.venc--compacto .venc__dentro { grid-template-columns: 40px minmax(0, 1fr) auto 40px; }
.boton-redondo { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--borde-2); background: transparent; color: var(--oro-texto); cursor: pointer; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.boton-redondo svg { width: 18px; height: 18px; }
.boton-redondo:active { transform: scale(0.94); background: var(--oro-suave); }
@media (hover: hover) and (pointer: fine) { .boton-redondo:hover { border-color: var(--oro-linea); background: var(--oro-suave); } }
.centrado { text-align: center; }
.bitwarden__ir { margin-left: auto; color: var(--texto-3); }
.subir-fila { display: flex; gap: 10px; align-items: stretch; }
.subir-fila .subir { flex: 1; min-width: 0; }
.app { padding-bottom: calc(var(--seguro-abajo) + 164px); }
@media (min-width: 960px) { .app { padding-bottom: 96px; } }
.g-eje--promedio-v { fill: var(--texto-2); font: 500 10px var(--sans); font-variant-numeric: tabular-nums; }

/* mini barras (HTML) */
.mini-barras { display: flex; gap: 12px; margin-top: 14px; }
.mb { flex: 1; display: grid; gap: 8px; min-width: 0; }
.mb__riel { height: 64px; display: flex; align-items: flex-end; }
.mb__barra { width: 100%; min-height: 3px; border-radius: 4px 4px 1px 1px; background: var(--neutro-2); outline-offset: 2px; }
.mb__barra--oro { background: linear-gradient(180deg, var(--oro-brillo) -40%, var(--oro)); }
.mb__etq { font: 500 10px var(--sans); letter-spacing: .06em; color: var(--texto-3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alto-0 { height: 3px; }
.alto-1 { height: 5%; }
.alto-2 { height: 10%; }
.alto-3 { height: 15%; }
.alto-4 { height: 20%; }
.alto-5 { height: 25%; }
.alto-6 { height: 30%; }
.alto-7 { height: 35%; }
.alto-8 { height: 40%; }
.alto-9 { height: 45%; }
.alto-10 { height: 50%; }
.alto-11 { height: 55%; }
.alto-12 { height: 60%; }
.alto-13 { height: 65%; }
.alto-14 { height: 70%; }
.alto-15 { height: 75%; }
.alto-16 { height: 80%; }
.alto-17 { height: 85%; }
.alto-18 { height: 90%; }
.alto-19 { height: 95%; }
.alto-20 { height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .mb__barra { transform-origin: bottom; animation: barra-crece 600ms var(--ease-out) both; }
}
@media (min-width: 960px) { .mb__riel { height: 96px; } .mini-barras { gap: 18px; } }
.spark { height: auto; }
/* break-ui: datos extremos */
.monto--grande.monto--largo { font-size: clamp(30px, 9vw, 44px); }
.monto--grande.monto--muy-largo { font-size: clamp(24px, 7vw, 36px); }
.heroe__centro .monto--grande.monto--largo { font-size: clamp(26px, 7.4vw, 34px); }
.heroe__centro .monto--grande.monto--muy-largo { font-size: clamp(20px, 6vw, 28px); }
.venc__nombre { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.35; }
.icono-redondo { flex: none; }
.ficha-cabeza { align-items: flex-start; }
.ficha-cabeza h1 { font-size: clamp(24px, 6.4vw, 34px); }
.heroe__dato .monto { overflow-wrap: anywhere; white-space: normal; }
.fila-enlace__der .monto { white-space: nowrap; }
.interruptor__riel::after { background: #FFFDF8; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .15); }
.js .tema-guardar { display: none; }
@media (min-width: 960px) {
  .cal { gap: 4px; }
  .dia-cal { aspect-ratio: auto; height: 78px; grid-template-rows: auto auto; align-content: start; gap: 6px; padding-top: 10px; }
  .dia-cal__n { font-size: 15px; }
}
