/*
 * «Calma oscura» (docs/DISENO.md): los mismos colores, letras, formas y medidas que la app
 * (ui/theme y ui/componentes). 1 dp / sp de la app = 1 px aquí.
 */
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url("/fuentes/manrope_semibold.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("/fuentes/manrope_bold.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("/fuentes/manrope_extrabold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fuentes/inter_regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/fuentes/inter_medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fuentes/inter_semibold.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --fondo: #0B0E11;
  --superficie: #14181D;
  --superficie-elevada: #171B21;
  --superficie-barra: #0F1216;
  --relleno: #20262E;
  --borde: #20262E;
  --borde-fuerte: #2A313A;
  --texto: #F2F4F6;
  --texto-secundario: #A0A9B4;
  --etiqueta: #8792A0;
  --desactivado: #5A6470;
  --acento: #3DDC97;
  --sobre-acento: #04261A;
  --gasto: #FF8F80;
  --info: #9A8CF0;
  --margen: 16px;
  --alto-barra: 80px;
}
/* Colores de cuentas, categorías y personas (VisualCuenta, VisualCategoria, colorPersona). */
.col-indigo { --c: #8B9CFF; } .col-ambar { --c: #F2C46D; } .col-cian { --c: #5FD0E4; } .col-coral { --c: #FF8F80; }
.col-lavanda { --c: #9A8CF0; } .col-arena { --c: #C4A796; } .col-menta { --c: #3DDC97; } .col-rosa { --c: #F29BC4; }
.col-lima { --c: #C6E07A; } .col-azul { --c: #6FA8FF; } .col-gris { --c: #8792A0; } .col-acento { --c: #3DDC97; } .col-gasto { --c: #FF8F80; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--fondo); color: var(--texto);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 22px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
button { font: inherit; color: inherit; }
svg.ico { width: 20px; height: 20px; fill: currentColor; flex: none; display: block; }

/* ---------- Tipografía (Type.kt) ---------- */
.t-titulo { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 24px; line-height: 30px; margin: 0; }
.t-hs { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 20px; line-height: 26px; margin: 0; }
.t-tl { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 18px; line-height: 24px; margin: 0; }
.t-tm { font-weight: 600; font-size: 15px; line-height: 20px; }
.t-ts { font-weight: 600; font-size: 14px; line-height: 18px; }
.t-bl { font-weight: 400; font-size: 15px; line-height: 22px; }
.t-bm { font-weight: 400; font-size: 14px; line-height: 20px; }
.t-bs { font-weight: 400; font-size: 13px; line-height: 18px; }
.t-ll { font-weight: 600; font-size: 15px; line-height: 20px; }
.t-lm { font-weight: 600; font-size: 13px; line-height: 16px; }
.t-ls { font-weight: 500; font-size: 12px; line-height: 16px; }
.t-ls-n { font-weight: 400; font-size: 12px; line-height: 16px; }
.t-seccion { font-weight: 600; font-size: 13px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--etiqueta); margin: 0; }
.num { font-family: "Manrope", sans-serif; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; white-space: nowrap; }
.imp-grande { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 44px; line-height: 48px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.imp-grande .cent { font-size: 26px; color: var(--texto-secundario); }
.imp-medio { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 22px; line-height: 28px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.imp-fila { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 15px; line-height: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.imp-16 { font-size: 16px; }
.c-texto { color: var(--texto); } .c-sec { color: var(--texto-secundario); } .c-etq { color: var(--etiqueta); }
.c-acento { color: var(--acento); } .c-gasto { color: var(--gasto); } .c-info { color: var(--info); } .c-ambar { color: #F2C46D; } .c-desact { color: var(--desactivado); }
.recorte { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crece { flex: 1; min-width: 0; }
.fila-h { display: flex; align-items: center; gap: 12px; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; }
.col.g2 { gap: 2px; } .col.g4 { gap: 4px; } .col.g6 { gap: 6px; } .col.g8 { gap: 8px; } .col.g10 { gap: 10px; } .col.g12 { gap: 12px; }
.mayus1::first-letter { text-transform: uppercase; }
.oculto-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Estructura ---------- */
body.app { padding-bottom: calc(var(--alto-barra) + env(safe-area-inset-bottom)); }
.pantalla {
  max-width: 560px; margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) var(--margen) 24px;
  display: flex; flex-direction: column; gap: 20px;
}
.pantalla.g16 { gap: 16px; }
.pantalla.sin-hueco { gap: 0; padding-bottom: 96px; }
.cargando { display: flex; justify-content: center; padding-top: 48px; }
.rueda { width: 40px; height: 40px; border: 4px solid var(--relleno); border-top-color: var(--acento); border-radius: 50%; animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* Barra de navegación (NavigationBar de Material 3 con los colores de la app). */
.barra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: var(--superficie-barra); display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}
.barra-dentro { display: flex; width: 100%; max-width: 560px; height: var(--alto-barra); }
.barra a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--etiqueta); text-decoration: none; font-weight: 500; font-size: 12px; line-height: 16px;
}
.barra a .indicador { width: 64px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; transition: background-color .2s; }
.barra a svg.ico { width: 24px; height: 24px; }
.barra a.activa { color: var(--acento); font-weight: 600; }
.barra a.activa .indicador { background: rgba(61, 220, 151, .14); }

/* ---------- Componentes (ui/componentes) ---------- */
.tarjeta {
  background: var(--superficie); border: 1px solid var(--borde); border-radius: 20px;
  padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.tarjeta.lista { padding: 4px 0; gap: 0; overflow: hidden; }
.tarjeta.p14 { padding: 14px; }
.tarjeta.g6 { gap: 6px; } .tarjeta.g8 { gap: 8px; } .tarjeta.g14 { gap: 14px; } .tarjeta.g16 { gap: 16px; }
.cabecera { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; min-height: 52px; }
.cabecera .acciones { display: flex; gap: 8px; }
.titulo-seccion { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.titulo-seccion.sangria { padding-left: 4px; }
.enlace-accion { background: none; border: 0; padding: 0 8px; min-height: 40px; border-radius: 20px; color: var(--acento); font-weight: 600; font-size: 13px; line-height: 16px; cursor: pointer; }
.enlace-accion:active { background: rgba(61, 220, 151, .1); }

.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex: none; position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}
.avatar.apagado { color: var(--etiqueta); background: var(--relleno); }
.avatar.persona { border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, transparent); font-family: "Manrope", sans-serif; font-weight: 700; font-size: 14px; }
.avatar.persona img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.insignia {
  position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--superficie); padding: 2px;
}
.insignia span {
  display: flex; width: 100%; height: 100%; border-radius: 50%; background: var(--c); color: var(--fondo);
  align-items: center; justify-content: center; font-size: 8px; line-height: 8px; font-weight: 700;
}

.boton-icono {
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--borde); background: var(--superficie);
  color: var(--texto); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; position: relative;
}
.boton-icono:disabled { color: var(--desactivado); cursor: default; }
.boton-icono .punto { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--acento); }
.boton-principal {
  height: 52px; border: 0; border-radius: 14px; background: var(--acento); color: var(--sobre-acento);
  font-weight: 600; font-size: 15px; line-height: 20px; cursor: pointer; padding: 0 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
}
.boton-principal:disabled { background: rgba(242, 244, 246, .12); color: rgba(242, 244, 246, .38); cursor: default; }
.boton-secundario {
  height: 52px; border: 1px solid var(--borde-fuerte); border-radius: 14px; background: transparent; color: var(--texto);
  font-weight: 600; font-size: 15px; line-height: 20px; cursor: pointer; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.boton-secundario.compacto { height: 40px; border-radius: 12px; font-size: 14px; line-height: 18px; }
.boton-secundario:disabled { color: var(--desactivado); cursor: default; }
.botones { display: flex; flex-wrap: wrap; gap: 8px; }

.pildora { display: inline-block; border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: 13px; line-height: 16px; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.etiqueta { flex: none; font-weight: 500; font-size: 12px; line-height: 16px; text-transform: uppercase; color: var(--texto-secundario); background: var(--relleno); border-radius: 6px; padding: 1px 6px; }
.separador { height: 1px; background: var(--borde); flex: none; }
.separador.s52 { margin-left: 52px; }
.separador.h16 { margin: 0 16px; }

.reparto { display: flex; gap: 3px; height: 10px; border-radius: 5px; overflow: hidden; }
.reparto.a8 { height: 8px; border-radius: 4px; }
.reparto span { display: block; height: 100%; background: var(--c); }
.progreso { height: 8px; border-radius: 4px; background: var(--relleno); overflow: hidden; }
.progreso span { display: block; height: 100%; border-radius: 4px; background: var(--c); }

/* FilaMovimiento */
.mov {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 16px;
  background: none; border: 0; text-align: left; cursor: pointer;
}
.mov:active { background: rgba(242, 244, 246, .06); }
.mov .sub { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mov .titulo.interno { color: var(--texto-secundario); }

/* ChipOpcion (FilterChip) */
.chip {
  height: 36px; border-radius: 999px; border: 1px solid var(--borde-fuerte); background: transparent; color: var(--texto-secundario);
  display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; flex: none; cursor: pointer;
  font-weight: 500; font-size: 14px; line-height: 20px; white-space: nowrap;
}
.chip.con-icono { padding-left: 8px; }
.chip svg.ico { width: 16px; height: 16px; color: var(--c); }
.chip.elegido { background: var(--texto); border-color: var(--texto); color: var(--fondo); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-fila { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--margen)); padding: 0 var(--margen); }
.chips-fila::-webkit-scrollbar { display: none; }

/* Hojas inferiores (ModalBottomSheet) */
.velo { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .32); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.velo.visible { opacity: 1; }
.hoja {
  width: 100%; max-width: 640px; max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--superficie-elevada); color: var(--texto); border-radius: 28px 28px 0 0;
  padding: 0 var(--margen) calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, 0, 0, 1);
}
.velo.visible .hoja { transform: translateY(0); }
.hoja .asa { width: 32px; height: 4px; border-radius: 2px; background: rgba(160, 169, 180, .4); margin: 22px auto 22px; }
.hoja .contenido { display: flex; flex-direction: column; gap: 16px; }
.opcion-alcance {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--borde);
  background: transparent; text-align: left; cursor: pointer; width: 100%;
}
.opcion-alcance.elegida { border-color: var(--acento); background: rgba(61, 220, 151, .08); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--borde-fuerte); flex: none; margin: 10px; display: flex; align-items: center; justify-content: center; }
.elegida .radio { border-color: var(--acento); }
.elegida .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--acento); }

/* Campos (OutlinedTextField) */
.campo { position: relative; }
.campo input {
  width: 100%; height: 56px; border-radius: 14px; border: 1px solid var(--borde-fuerte); background: var(--superficie);
  color: var(--texto); font: inherit; font-size: 15px; padding: 0 16px; outline: none;
}
.campo input:focus { border: 2px solid var(--acento); padding: 0 15px; }
.campo label { display: block; color: var(--etiqueta); font-size: 13px; margin: 0 4px 6px; }
.buscador { display: flex; align-items: center; gap: 8px; height: 56px; border-radius: 14px; border: 1px solid var(--borde); background: var(--superficie); padding: 0 4px 0 14px; }
.buscador:focus-within { border-color: var(--borde-fuerte); }
.buscador input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--texto); font: inherit; font-size: 15px; }
.buscador input::placeholder { color: var(--etiqueta); }
.buscador button { width: 44px; height: 44px; border: 0; background: none; color: var(--texto-secundario); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 22px; }

/* Snackbar */
.aviso {
  position: fixed; left: 50%; bottom: calc(var(--alto-barra) + 12px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translate(-50%, 16px); opacity: 0; transition: opacity .2s, transform .2s;
  width: calc(100% - 2 * var(--margen)); max-width: 528px; min-height: 48px; padding: 14px 16px; border-radius: 4px;
  background: #E3E5E8; color: #1A1D21; font-size: 14px; line-height: 20px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
}
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }
.aviso button { margin-left: auto; background: none; border: 0; color: #0E7A4E; font-weight: 600; cursor: pointer; padding: 0; }

/* Menú de meses (MenuMeses) */
.menu {
  position: absolute; z-index: 15; min-width: 180px; max-height: 320px; overflow-y: auto; padding: 8px 0;
  background: var(--superficie-elevada); border-radius: 4px; box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
}
.menu button { display: flex; width: 100%; min-height: 48px; align-items: center; padding: 0 16px; background: none; border: 0; color: var(--texto); font-size: 14px; cursor: pointer; text-align: left; }
.menu button.actual { color: var(--acento); font-weight: 600; }
.menu button:hover, .menu button:active { background: rgba(242, 244, 246, .06); }

/* ---------- Inicio ---------- */
.aviso-permiso { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 0; text-align: left; cursor: pointer; width: 100%; }
.fila-cuenta { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.sparkline { display: block; width: 100%; height: 64px; margin-top: 4px; overflow: visible; }
.dos-cifras { display: flex; gap: 12px; }
.dos-cifras > * { flex: 1; min-width: 0; }

/* ---------- Movimientos ---------- */
.selector-mes-pildora { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 8px 0 10px; border-radius: 10px; background: var(--relleno); border: 0; color: var(--texto); cursor: pointer; font-weight: 600; font-size: 13px; line-height: 16px; }
.selector-mes-pildora svg.ico { width: 16px; height: 16px; }
.leyenda { display: flex; flex-wrap: wrap; column-gap: 6px; }
.leyenda button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px; border-radius: 999px; background: none; border: 0; cursor: pointer; color: var(--texto-secundario); font-size: 12px; line-height: 16px; }
.leyenda button.elegida { color: var(--texto); font-weight: 600; }
.leyenda .bola { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cabecera-dia { position: sticky; top: 0; z-index: 2; background: var(--fondo); padding: 14px 20px 6px; margin: 0 calc(-1 * var(--margen)); display: flex; flex-direction: column; gap: 2px; }
.estado-vacio { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 32px; text-align: center; }
.estado-vacio svg.ico { width: 40px; height: 40px; color: var(--etiqueta); }
.estado-vacio .boton-secundario { margin-top: 4px; min-height: 44px; }

/* ---------- Análisis ---------- */
.grafica { position: relative; height: 180px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.grafica svg { display: block; width: 100%; height: 100%; overflow: visible; }
.grafica text { fill: var(--etiqueta); font-family: "Inter", sans-serif; font-size: 11px; }
.marcador {
  position: absolute; top: 0; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: var(--superficie-elevada);
  color: var(--texto); font-weight: 600; font-size: 13px; line-height: 18px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.periodos { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--superficie-barra); }
.periodos button { flex: 1; height: 44px; border-radius: 10px; border: 0; background: var(--superficie-barra); color: var(--texto-secundario); font-weight: 600; font-size: 13px; line-height: 16px; cursor: pointer; }
.periodos button.activo { background: var(--relleno); color: var(--texto); }
.selector-mes { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; position: relative; }
.selector-mes .mes { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border-radius: 10px; background: none; border: 0; cursor: pointer; color: var(--texto); }
.selector-mes .mes svg.ico { color: var(--texto-secundario); }
.barras { display: flex; gap: 8px; align-items: flex-end; }
.barras .mes { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.barras .par { height: 124px; display: flex; gap: 3px; align-items: flex-end; }
.barras .par span { width: 12px; border-radius: 4px 4px 0 0; background: var(--c); }
.barras .par.apagado span { opacity: .55; }
.barras .nombre { font-size: 11px; line-height: 16px; color: var(--etiqueta); }
.barras .actual .nombre { color: var(--texto); font-weight: 600; }
.leyenda-cuadro { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; line-height: 16px; color: var(--texto-secundario); }
.leyenda-cuadro i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.consejo { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 12px; border-radius: 14px; background: rgba(154, 140, 240, .10); color: var(--info); border: 0; text-align: left; cursor: pointer; width: 100%; }

/* ---------- Detalle de cuenta y Ajustes ---------- */
.fila-dato { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; }
.posicion { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bola-estado { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.texto-nota { padding: 0 4px; }
.enlace-fila { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; text-align: left; cursor: pointer; padding: 0; }

/* ---------- Páginas de acceso (entrar y alta) ---------- */
body.acceso { display: flex; justify-content: center; padding: 48px 16px; }
body.acceso main { width: 100%; max-width: 420px; }
body.acceso h1 { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 28px; line-height: 34px; margin: 0 0 8px; }
body.acceso p { color: var(--texto-secundario); margin: 0 0 24px; }
body.acceso button { width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: var(--acento); color: var(--sobre-acento); font-weight: 600; cursor: pointer; }
body.acceso button:disabled { opacity: .5; }
.error { color: var(--gasto); min-height: 24px; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .velo, .hoja, .aviso, .barra a .indicador { transition: none; }
}

/* ---------- Utilidades de las pantallas ---------- */
.mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; margin-bottom: 2px; } .mt16 { margin-top: 16px; }
.pt4 { padding-top: 4px; } .pt8 { padding-top: 8px; }
.fila-h.g6 { gap: 6px; } .fila-h.g8 { gap: 8px; } .fila-h.g12 { gap: 12px; }
.fila-h.arriba, .entre.arriba { align-items: flex-start; }
.derecha { text-align: right; flex: 1; }
.fuerte { font-weight: 600; }
.sin-margen { margin: 0; }
.relativo { position: relative; }
.avatar-caja { flex: none; }
.col-info { --c: #9A8CF0; }
.ig-32 { font-size: 32px; line-height: 36px; } .ig-32 .cent { font-size: 20px; }
.ig-40 { font-size: 40px; line-height: 44px; } .ig-40 .cent { font-size: 24px; }
.imp-30 { font-size: 30px; line-height: 36px; font-weight: 800; }
.imp-26 { font-size: 26px; line-height: 32px; }
.t-lm-num { font-weight: 600; font-size: 13px; line-height: 16px; }
.t-cat { font-weight: 600; font-size: 14px; line-height: 20px; }
.t-cat strong { font-weight: 700; }
.num-inter { font-variant-numeric: tabular-nums; }
.linea-base { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ico16 svg.ico { width: 16px; height: 16px; }
.tarjeta.lista > p { margin: 0; padding: 16px; }
.cabecera-detalle { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.separador.s68 { margin-left: 68px; }
.fila-ajuste { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; background: none; border: 0; text-align: left; cursor: pointer; }
.fila-ajuste:active, .fila-opcion:active, .fila-cuenta:active { background: rgba(242, 244, 246, .04); }
.fila-opcion { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 0; background: none; border: 0; border-radius: 12px; text-align: left; cursor: pointer; }
.fila-interruptor { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; background: none; border: 0; text-align: left; cursor: pointer; padding: 0; }
/* Switch de Material 3 con los colores de la app */
.interruptor { width: 52px; height: 32px; border-radius: 16px; background: var(--relleno); border: 2px solid var(--borde-fuerte); position: relative; flex: none; transition: background-color .2s; }
.interruptor span { position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--texto-secundario); transition: all .2s; }
.interruptor.encendido { background: var(--acento); border-color: var(--acento); }
.interruptor.encendido span { left: 22px; top: 2px; width: 24px; height: 24px; background: var(--sobre-acento); }
body.sin-barra { padding-bottom: 0; }
body.sin-barra .barra { display: none; }
body.sin-barra .aviso { bottom: calc(16px + env(safe-area-inset-bottom)); }
/* Indicador de tirar para actualizar */
.ptr {
  position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 50%; z-index: 6; width: 40px; height: 40px; border-radius: 50%;
  background: var(--superficie-elevada); color: var(--acento); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4); opacity: 0; transform: translate(-50%, -48px); pointer-events: none; transition: opacity .15s;
}
.ptr.girando svg { animation: girar 1s linear infinite; }

/* ---------- Edición: botón Añadir, hojas de números y nuevo movimiento ---------- */
.fab {
  position: fixed; right: max(var(--margen), calc(50% - 280px + var(--margen))); bottom: calc(var(--alto-barra) + 16px + env(safe-area-inset-bottom)); z-index: 4;
  height: 56px; padding: 0 20px 0 16px; border-radius: 16px; border: 0; background: var(--acento); color: var(--sobre-acento);
  display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 15px; line-height: 20px; cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .35);
}
.fab svg.ico { width: 24px; height: 24px; }
.boton-lapiz { width: 44px; height: 44px; border: 0; background: none; color: var(--texto-secundario); display: flex; align-items: center; justify-content: center; border-radius: 22px; cursor: pointer; flex: none; margin: -12px -8px -12px 0; }
button.posicion { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; }
button.posicion:active { background: rgba(242, 244, 246, .04); }
.subtitulo-hoja { margin: -12px 0 0; }
input.campo-importe {
  width: 100%; height: 56px; border-radius: 14px; border: 1px solid var(--borde-fuerte); background: var(--superficie-barra); color: var(--texto);
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; padding: 0 16px; outline: none;
}
input.campo-importe:focus { border: 2px solid var(--acento); padding: 0 15px; }
input.campo-importe.con-error { border-color: var(--gasto); }
.segmentado { display: flex; }
.segmentado button {
  flex: 1; min-height: 44px; border: 1px solid var(--borde-fuerte); background: transparent; color: var(--texto-secundario); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; line-height: 20px;
}
.segmentado button:first-child { border-radius: 22px 0 0 22px; }
.segmentado button:last-child { border-radius: 0 22px 22px 0; border-left: 0; }
.segmentado button.activo { background: rgba(61, 220, 151, .14); color: var(--acento); }
.segmentado svg.ico { width: 18px; height: 18px; }
.campo-con-sufijo {
  position: relative; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--borde-fuerte); background: var(--superficie); cursor: text;
}
.campo-con-sufijo:focus-within { border: 2px solid var(--acento); padding: 0 15px; }
.campo-con-sufijo .flotante { position: absolute; top: -9px; left: 12px; padding: 0 4px; background: var(--superficie-elevada); color: var(--etiqueta); font-size: 12px; line-height: 16px; }
.campo-con-sufijo:focus-within .flotante { color: var(--acento); }
.campo-con-sufijo input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--texto); font: inherit; font-size: 15px; height: 54px; padding: 0; }
.campo-con-sufijo input.campo-importe { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 22px; height: 54px; }
.campo-con-sufijo input.campo-importe:focus { border: 0; padding: 0; }

/* ---------- Previsión ---------- */
.plazos { display: flex; gap: 8px; }
.plazo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; border-radius: 14px; background: var(--superficie-barra); }
.imp-17 { font-size: 17px; }
.t-12 { font-size: 12px; }
.t-13 { font-size: 13px; }
/* Slider de Material 3: pista gris sin relleno y pulgar menta (el centro es «como ahora»). */
input.deslizador { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
input.deslizador::-webkit-slider-runnable-track { height: 16px; border-radius: 8px; background: var(--relleno); }
input.deslizador::-moz-range-track { height: 16px; border-radius: 8px; background: var(--relleno); }
input.deslizador::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 44px; margin-top: -14px; border-radius: 2px; background: var(--acento); }
input.deslizador::-moz-range-thumb { width: 4px; height: 44px; border: 0; border-radius: 2px; background: var(--acento); }

/* ---------- Presupuestos y gastos fijos ---------- */
.pantalla.g14 { gap: 14px; }
.pulsable { cursor: pointer; }
.pulsable:active { background: #171B21; }
.imp-24 { font-size: 24px; line-height: 30px; font-weight: 800; }
.imp-32 { font-size: 32px; line-height: 38px; font-weight: 800; }
.fuerte8 { font-weight: 800; }
.linea-base.g6 { gap: 6px; } .linea-base.g8 { gap: 8px; }
.entre.abajo { align-items: flex-end; }
.barra-hoy { position: relative; height: 14px; display: flex; align-items: center; }
.barra-hoy .progreso { flex: 1; }
.barra-hoy .raya { position: absolute; top: 0; bottom: 0; width: 2px; border-radius: 1px; background: rgba(242, 244, 246, .7); }
.aviso-rojo { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 143, 128, .10); color: var(--gasto); border: 0; text-align: left; width: 100%; }
button.aviso-rojo { cursor: pointer; }
.opcion-verde { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; background: rgba(61, 220, 151, .08); border: 0; text-align: left; cursor: pointer; width: 100%; }
.dos-lineas { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fila-presupuesto { display: flex; flex-direction: column; gap: 7px; width: 100%; padding: 12px 16px; background: none; border: 0; text-align: left; cursor: pointer; }
.fila-presupuesto:active, .fila-fijo:active { background: rgba(242, 244, 246, .04); }
.fila-h.g10 { gap: 10px; }
.atajo { min-height: 38px; padding: 0 12px; border-radius: 10px; border: 0; cursor: pointer; font-weight: 600; font-size: 15px; line-height: 20px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.atajo.col-texto { --c: #F2F4F6; }
.atajo.neutro { --c: #F2F4F6; background: var(--relleno); min-height: 40px; padding: 0 14px; }
.atajo.col-acento { min-height: 40px; padding: 0 14px; background: rgba(61, 220, 151, .16); }
.reparto-fijos { display: flex; gap: 2px; height: 8px; }
.reparto-fijos span { display: block; height: 100%; border-radius: 4px; background: var(--c); }
.avatar.inicial { background: color-mix(in srgb, var(--c) 16%, transparent); font-family: "Manrope", sans-serif; font-weight: 800; font-size: 15px; }
.fila-fijo { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 16px; background: none; border: 0; text-align: left; cursor: pointer; }
div.fila-fijo { cursor: default; }
.etiqueta-color { flex: none; font-weight: 600; font-size: 12px; line-height: 16px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border-radius: 6px; padding: 1px 6px; }
.boton-suave { min-height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--relleno); color: var(--texto-secundario); font-weight: 600; font-size: 15px; cursor: pointer; flex: none; }
.boton-suave.verde { background: rgba(61, 220, 151, .16); color: var(--acento); }
.enlace-rojo { align-self: flex-start; min-height: 40px; padding: 0 12px; border: 0; background: none; color: var(--gasto); font-weight: 600; font-size: 14px; cursor: pointer; border-radius: 20px; }

/* ---------- Personas ---------- */
.avatar.persona.t52 { width: 52px; height: 52px; font-size: 18px; }
.avatar.persona.t52 img { width: 52px; height: 52px; }
.avatar.persona.t72 { width: 72px; height: 72px; font-size: 25px; cursor: pointer; }
.avatar.persona.t72 img { width: 72px; height: 72px; }
.avatar.persona.neutro { background: var(--relleno); color: var(--texto-secundario); }
.avatar.persona[role="button"] { cursor: pointer; }
.chips-fila.g14 { gap: 14px; }
.texto-nota4 { padding-left: 4px; }
.persona-fila { width: 64px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; border-radius: 12px; background: none; border: 0; cursor: pointer; }
.persona-fila .recorte { max-width: 64px; }
.lista-hoja { margin: 0 calc(-1 * var(--margen)); }
.fila-ajuste.sin-pad { padding: 8px var(--margen); min-height: 60px; }
.centro { align-items: center; text-align: center; }
.col-gris-claro { --c: #A0A9B4; }
.fila-reparto { display: flex; align-items: center; width: 100%; min-height: 52px; padding: 4px 0; background: none; border: 0; text-align: left; cursor: pointer; gap: 12px; }
.imp-18 { font-size: 18px; }
.puntos-pagina { display: flex; gap: 5px; }
.puntos-pagina button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--borde-fuerte); cursor: pointer; transition: width .2s; }
.puntos-pagina button.activo { width: 16px; background: var(--texto); }
.barras .par.par2 { gap: 2px; }
.barras .par.estrechas span { width: 10px; }

/* ---------- Cuentas con una persona ---------- */
.pantalla.g8 { gap: 8px; }
.pantalla.con-panel { padding-bottom: calc(200px + env(safe-area-inset-bottom)); }
.c-lavanda { color: #9A8CF0; }
.pt2 { padding-top: 2px; } .pt24 { padding-top: 24px; }
.ayuda-reparto { margin: 0; padding: 12px; border-radius: 12px; background: var(--superficie); border: 1px solid var(--borde); }
.fila-cobrado { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 4px 12px; border-radius: 12px; background: var(--superficie); border: 0; text-align: left; cursor: pointer; }
.fila-gasto { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; cursor: pointer; }
.fila-gasto:active { background: rgba(242, 244, 246, .04); }
.casilla { width: 24px; height: 24px; flex: none; border-radius: 8px; border: 2px solid var(--borde-fuerte); background: var(--superficie); display: flex; align-items: center; justify-content: center; color: var(--sobre-acento); }
.casilla.marcada { background: var(--acento); border-color: var(--acento); }
.casilla svg.ico { width: 16px; height: 16px; }
.los-demas { align-self: flex-start; min-height: 36px; padding: 0 8px 0 0; background: none; border: 0; cursor: pointer; }
.parte { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px; border-radius: 9px; border: 0; background: var(--relleno); color: var(--texto); cursor: pointer; flex: none; }
.parte svg.ico { width: 14px; height: 14px; color: var(--etiqueta); }
.parte.ajustada { background: rgba(242, 196, 109, .14); color: #F2C46D; }
.parte.ajustada svg.ico { color: #F2C46D; }
.panel-total {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; margin: 0 auto; max-width: 560px;
  background: var(--superficie); border-radius: 24px 24px 0 0; padding: 16px var(--margen) calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px; box-shadow: 0 -4px 16px rgba(0, 0, 0, .35);
}
.imp-28 { font-size: 28px; line-height: 34px; }
.botones-panel { display: flex; gap: 10px; }
.botones-panel .boton-secundario { flex: 1; height: 48px; }
.botones-panel .boton-principal { flex: 1.4; }
.boton-principal.rojo { background: var(--gasto); color: #2A0A06; }
.contenido.g14 { gap: 14px; }
.visor { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--superficie-barra); }
.visor.g4 { padding: 12px 16px; }
.t-14 { font-size: 14px; }
.atajos-calc { display: flex; gap: 8px; }
.atajos-calc button { flex: 1; height: 40px; border-radius: 10px; border: 1px solid var(--borde-fuerte); background: var(--superficie); color: var(--texto); font-weight: 600; font-size: 13px; cursor: pointer; }
.teclado { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.teclado button { height: 56px; border-radius: 14px; border: 0; background: var(--relleno); color: var(--texto); font-family: "Manrope", sans-serif; font-weight: 600; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.teclado button.op { background: var(--borde-fuerte); color: var(--acento); }
.teclado button:active { filter: brightness(1.25); }
.teclado svg.ico { width: 24px; height: 24px; }
.fila-bizum { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 16px; background: none; border: 0; text-align: left; cursor: pointer; }
.campo-con-sufijo.con-error { border-color: var(--gasto); }

/* Página al volver del banco */
.boton-enlace { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 14px; background: var(--acento); color: var(--sobre-acento); font-weight: 600; text-decoration: none; }

/* Código para enlazar la app */
.codigo-enlace { padding: 20px; border-radius: 16px; background: var(--superficie-barra); text-align: center; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 34px; letter-spacing: .12em; color: var(--texto); }
