/* Finanzas — estilo iOS. Oscuro por defecto, claro si el sistema lo pide. */
:root {
  --fondo: #000;
  --tarjeta: #1c1c1e;
  --tarjeta-2: #2c2c2e;
  --tarjeta-3: #3a3a3c;
  --separador: rgba(84, 84, 88, .65);
  --texto: #fff;
  --texto-2: rgba(235, 235, 245, .6);
  --texto-3: rgba(235, 235, 245, .3);
  --acento: #0a84ff;
  --rojo: #ff453a;
  --verde: #30d158;
  --naranja: #ff9f0a;
  --barra: rgba(30, 30, 30, .72);
  --sombra: 0 8px 30px rgba(0, 0, 0, .45);
  --radio: 22px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --fondo: #f2f2f7;
    --tarjeta: #fff;
    --tarjeta-2: #e5e5ea;
    --tarjeta-3: #d1d1d6;
    --separador: rgba(60, 60, 67, .29);
    --texto: #000;
    --texto-2: rgba(60, 60, 67, .6);
    --texto-3: rgba(60, 60, 67, .3);
    --acento: #007aff;
    --rojo: #ff3b30;
    --verde: #34c759;
    --naranja: #ff9500;
    --barra: rgba(249, 249, 249, .78);
    --sombra: 0 8px 30px rgba(0, 0, 0, .12);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--acento); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.ico { flex: none; vertical-align: -.2em; }

.pagina {
  max-width: 600px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 130px);
}
body.hoja .pagina { padding-bottom: calc(env(safe-area-inset-bottom) + 40px); }

/* ---------- encabezado ---------- */
.encabezado-acciones { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.espaciador { flex: 1; }
.boton-redondo {
  position: relative; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--tarjeta); color: var(--texto); border: 0; cursor: pointer;
}
.campana-roja .ico { color: var(--rojo); }
.boton-redondo.chico { width: 36px; height: 36px; color: var(--verde); }
.insignia {
  position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--rojo); color: #fff; font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
}
.insignia.en-fila { position: static; margin-right: 6px; }
.titulo-grande { font-size: 34px; font-weight: 700; letter-spacing: .01em; margin: 10px 0 18px; }
.titulo-mediano { font-size: 24px; font-weight: 700; margin: 8px 0 10px; }
.volver { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; margin-left: -6px; }
.centrado { text-align: center; }

/* ---------- tarjetas ---------- */
.tarjeta {
  background: var(--tarjeta); border-radius: var(--radio);
  padding: 18px 20px; margin-bottom: 16px;
}
.tarjeta.lista { padding: 6px 0; }
.tarjeta.lista > .tarjeta-titulo, .tarjeta-titulo-fila { padding: 12px 20px 4px; }
.tarjeta-titulo { font-size: 22px; font-weight: 700; margin: 0 0 14px; padding-bottom: 14px; border-bottom: .5px solid var(--separador); }
.tarjeta.lista .tarjeta-titulo { border: 0; margin: 0; padding-bottom: 6px; }
.tarjeta-titulo-fila { display: flex; justify-content: space-between; align-items: baseline; }
.tarjeta-titulo-fila .tarjeta-titulo { padding: 0; }
.etiqueta-chica { font-size: 13px; letter-spacing: .04em; color: var(--texto-2); text-transform: uppercase; }
.cifra-grande { font-size: 40px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.cifra-de { font-size: 17px; color: var(--texto-2); font-weight: 500; }
.cifra-media { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.negativo { color: var(--texto); }
.positivo { color: var(--verde); }
.texto-2 { color: var(--texto-2); }
.relleno { padding: 8px 20px 14px; margin: 0; }
.ayuda { font-size: 14px; margin: 6px 4px 18px; }
.enlace-derecha { display: block; text-align: right; font-size: 19px; font-weight: 600; margin-top: 12px; }
.seccion-titulo { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); margin: 22px 20px 8px; }
.destacado { outline: 2px solid var(--acento); }

/* ---------- carrusel de cuentas ---------- */
.carrusel {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc(50% - 8px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px;
}
.carrusel::-webkit-scrollbar { display: none; }
.tarjeta-cuenta {
  scroll-snap-align: start; background: var(--tarjeta); border-radius: var(--radio);
  padding: 18px 18px 30px; color: var(--texto); display: flex; flex-direction: column; min-width: 0;
}
.cuenta-icono, .glifo {
  display: grid; place-items: center; color: #fff; background: var(--c);
}
.cuenta-icono { width: 42px; height: 42px; border-radius: 11px; margin-bottom: 22px; }
.cuenta-nombre { font-size: 16px; text-transform: uppercase; letter-spacing: .03em; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuenta-saldo { font-size: 23px; font-weight: 700; margin-top: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tarjeta-agregar .cuenta-nombre { color: var(--acento); }
.puntos { display: flex; justify-content: center; gap: 9px; margin: 14px 0 20px; min-height: 8px; }
.puntos i { width: 8px; height: 8px; border-radius: 50%; background: var(--tarjeta-3); transition: background .2s; }
.puntos i.activo { background: var(--texto); }

/* ---------- gráficas ---------- */
.grafica { position: relative; width: 100%; min-height: 200px; margin-top: 6px; }
.grafica svg { display: block; width: 100%; height: auto; overflow: visible; }
.grafica text { fill: var(--texto-2); font-size: 11px; font-family: inherit; }
.grafica .reticula { stroke: var(--separador); stroke-dasharray: 5 5; }
.grafica .linea { fill: none; stroke: var(--acento); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.grafica .area { fill: var(--acento); opacity: .18; }
.grafica .barra-ing { fill: var(--verde); }
.grafica .barra-gas { fill: var(--acento); }
.leyenda-linea { display: flex; gap: 18px; font-size: 14px; color: var(--texto-2); margin-top: 8px; }
.leyenda-linea span { display: inline-flex; align-items: center; gap: 6px; }

.dona-fila { display: flex; align-items: center; gap: 18px; }
.dona { position: relative; width: 132px; height: 132px; flex: none; }
.dona.grande { width: 200px; height: 200px; margin: 4px auto 14px; }
.dona svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dona-centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dona-centro strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.dona.grande .dona-centro strong { font-size: 26px; }
.leyenda { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; font-size: 15px; }
.leyenda li { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.leyenda-nombre { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leyenda-valor { font-variant-numeric: tabular-nums; color: var(--texto-2); }
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }

/* ---------- filas ---------- */
.fila {
  display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: var(--texto);
  position: relative; min-height: 58px;
}
.fila + .fila::before, .fila-con-accion + .fila-con-accion::before {
  content: ""; position: absolute; top: 0; left: 68px; right: 0; border-top: .5px solid var(--separador);
}
.fila-con-accion { display: flex; align-items: center; position: relative; padding-right: 14px; }
.fila-con-accion .fila { flex: 1; min-width: 0; }
.glifo { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.fila-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fila-titulo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-sub { font-size: 14px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-monto { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; text-align: right; }
.fila-monto small { display: block; font-size: 13px; color: var(--texto-2); font-weight: 400; }
.fila-monto.neutro { color: var(--texto-2); }
.fila .ok { color: var(--verde); vertical-align: -.15em; }
.chevron { color: var(--texto-3); }
.acento { color: var(--acento); }
.boton-fila { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; flex: 1; }
.peligro-texto { color: var(--rojo) !important; }
.dia-encabezado { display: flex; justify-content: space-between; margin: 20px 20px 8px; font-size: 14px; color: var(--texto-2); font-weight: 600; }

/* ---------- barras de presupuesto ---------- */
.barra { position: relative; height: 10px; border-radius: 5px; background: var(--tarjeta-2); overflow: visible; margin: 6px 0 10px; }
.barra > span { display: block; height: 100%; border-radius: 5px; background: var(--acento); max-width: 100%; }
.barra > span.excedido { background: var(--rojo); }
.barra > i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--texto); border-radius: 1px; }
.barra.chica { height: 6px; margin: 4px 0 2px; }
.monto-celda {
  width: 80px; text-align: right; background: var(--tarjeta-2); border: 0; border-radius: 10px;
  padding: 8px 10px; font-variant-numeric: tabular-nums;
}

/* ---------- botón flotante y tabs ---------- */
.fab {
  position: fixed; z-index: 30; right: max(20px, calc(50% - 280px));
  bottom: calc(env(safe-area-inset-bottom) + 96px);
  width: 62px; height: 62px; border-radius: 50%; background: var(--acento); color: #fff;
  display: grid; place-items: center; box-shadow: var(--sombra);
}
.fab:active { transform: scale(.94); }
.tabs {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  width: min(calc(100% - 24px), 560px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  border-radius: 34px; background: var(--barra);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: .5px solid var(--separador); box-shadow: var(--sombra);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px;
  border-radius: 28px; color: var(--texto); font-size: 11.5px; font-weight: 500; min-width: 0;
}
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab .ico { width: 26px; height: 26px; }
.tab.activa { background: var(--tarjeta-2); color: var(--acento); }

/* ---------- formularios ---------- */
.grupo { background: var(--tarjeta); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.renglon { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 16px; position: relative; }
.renglon + .renglon::before, .renglon + .error + .renglon::before, .ayuda + .renglon::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--separador);
}
.renglon > span { flex: none; min-width: 96px; max-width: 45%; }
.renglon input, .renglon select {
  flex: 1; min-width: 0; text-align: right; background: none; border: 0; outline: 0; padding: 8px 0;
  color: var(--texto); font-size: 17px;
}
.renglon select { text-align-last: right; appearance: none; color: var(--texto-2); }
.renglon input[type=color] { flex: none; width: 44px; height: 30px; padding: 0; border-radius: 8px; }
.renglon input[type=checkbox] { flex: none; width: 22px; height: 22px; accent-color: var(--verde); }
.renglon input::placeholder { color: var(--texto-3); }
.en-grupo { padding: 0 16px 10px; margin: 0; }
.error { color: var(--rojo); font-size: 14px; margin: 4px 4px 12px; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--acento); color: #fff; font-weight: 600; font-size: 17px;
}
.boton.secundario { background: var(--tarjeta); color: var(--acento); }
.boton.peligro { background: var(--tarjeta); color: var(--rojo); }
.boton.chico { min-height: 36px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.boton.ancho, .boton-texto.ancho { width: 100%; margin-bottom: 12px; }
.boton:disabled { opacity: .45; }
.boton-texto { background: none; border: 0; color: var(--acento); min-height: 44px; cursor: pointer; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; }
.boton-texto.chico { font-size: 15px; min-height: 36px; }
.botones-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.botones-fila .boton { font-size: 15px; padding: 0 10px; }

.avisos { margin-bottom: 12px; }
.aviso { padding: 12px 16px; border-radius: 14px; background: var(--tarjeta); margin-bottom: 8px; font-size: 15px; }
.aviso-success { color: var(--verde); }
.aviso-error { color: var(--rojo); }
.aviso-warning { color: var(--naranja); }

/* ---------- hoja de captura ---------- */
.barra-hoja {
  position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  margin: 0 -16px 12px; padding: calc(env(safe-area-inset-top) + 8px) 16px 10px;
  background: var(--barra); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.barra-boton { background: none; border: 0; color: var(--acento); font-size: 17px; padding: 8px 0; cursor: pointer; }
.barra-boton:last-child { justify-self: end; }
.barra-boton.fuerte { font-weight: 600; }
.segmentado { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--tarjeta-2); border-radius: 10px; padding: 2px; margin-bottom: 10px; }
.segmentado label { position: relative; }
.segmentado input { position: absolute; opacity: 0; pointer-events: none; }
.segmentado span { display: block; text-align: center; padding: 7px 4px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.segmentado input:checked + span { background: var(--tarjeta-3); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
@media (prefers-color-scheme: light) { .segmentado input:checked + span { background: #fff; } }
.monto-grande { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 18px 0 8px; }
.monto-signo { font-size: 34px; color: var(--texto-2); font-weight: 600; }
.monto-grande input {
  width: 4.6ch; max-width: calc(100% - 40px); background: none; border: 0; outline: 0; text-align: left;
  font-size: 56px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--texto);
}
.monto-grande input::placeholder { color: var(--texto-3); }
.campo-texto input {
  width: 100%; background: var(--tarjeta); border: 0; outline: 0; border-radius: 14px;
  padding: 15px 16px; font-size: 17px; margin: 8px 0 4px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 20px;
  background: var(--tarjeta); font-size: 15px; cursor: pointer; border: 1.5px solid transparent;
}
.chip span .ico { color: var(--c); }
.chip input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, var(--tarjeta)); }
.chip input:focus-visible + span { outline: 2px solid var(--acento); }
.chip[hidden] { display: none; }
.captura .grupo { margin-top: 22px; }
.captura .seccion-titulo { margin-left: 4px; }
.detalle-alerta { padding: 14px 16px; font-size: 14px; color: var(--texto-2); }
.detalle-alerta summary { color: var(--acento); cursor: pointer; }
[data-solo][hidden] { display: none; }

/* ---------- varios ---------- */
.vacio { text-align: center; padding: 30px 24px; }
.vacio-glifo { color: var(--texto-2); opacity: .55; }
.vacio-titulo { font-size: 19px; font-weight: 600; margin: 10px 0 4px; }
.vacio-texto { color: var(--texto-2); margin: 0 0 16px; }
.buscador { display: flex; align-items: center; gap: 8px; background: var(--tarjeta-2); border-radius: 12px; padding: 0 12px; color: var(--texto-2); margin-bottom: 10px; }
.buscador input { flex: 1; background: none; border: 0; outline: 0; padding: 10px 0; font-size: 17px; color: var(--texto); }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.chip-filtro { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 16px; background: var(--tarjeta); font-size: 14px; }
.selector-mes { display: flex; justify-content: space-between; align-items: center; background: var(--tarjeta); border-radius: 14px; padding: 8px 12px; margin-bottom: 16px; }
.selector-mes a { display: grid; place-items: center; width: 36px; height: 36px; }
.resumen-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.resumen-3 > div { min-width: 0; }
.resumen-3 .cifra-media { font-size: clamp(14px, 4.2vw, 19px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pasos ol { margin: 0; padding-left: 20px; }
.pasos li { margin-bottom: 12px; }
.pasos li:last-child { margin-bottom: 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; background: var(--tarjeta-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.copiable { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.copiable code { flex: 1; padding: 10px 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; }
.alerta-texto { white-space: pre-wrap; font-size: 15px; background: var(--tarjeta-2); padding: 10px 12px; border-radius: 12px; }
.alerta-acciones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.alerta-acciones select { flex: 1; min-width: 140px; background: var(--tarjeta-2); border: 0; border-radius: 10px; padding: 8px 10px; }
.linea-estado input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--acento); flex: none; }
.linea-estado.coincide .fila-titulo { color: var(--texto-2); }
.mini-select { background: var(--tarjeta-2); border: 0; border-radius: 8px; padding: 5px 6px; font-size: 13px; }
.qr { display: grid; place-items: center; background: #fff; border-radius: 18px; padding: 14px; margin: 12px auto 14px; width: 248px; }
.qr img { display: block; }

@media (min-width: 700px) {
  .carrusel { grid-auto-columns: calc(33.333% - 11px); }
}
@media (max-width: 360px) {
  .titulo-grande { font-size: 30px; }
  .cifra-grande { font-size: 34px; }
  .tab span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Selector de PDFs: botón con el acento del sistema, no el gris nativo. */
.renglon input[type=file] { font-size: 14px; color: var(--texto-2); text-align: left; }
.renglon input[type=file]::file-selector-button {
  background: var(--acento); color: #fff; border: 0; border-radius: 9px;
  padding: 7px 12px; margin-right: 10px; font: inherit; font-weight: 600; cursor: pointer;
}

/* ---------- acceso ---------- */
body.sin-sesion {
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--acento) 32%, transparent), transparent 70%),
    var(--fondo);
}
.acceso { padding-top: calc(env(safe-area-inset-top) + 48px); max-width: 420px; }
.acceso-marca { text-align: center; margin-bottom: 26px; }
.acceso-logo {
  width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 14px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #2b9bff, #0062e6);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--acento) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.25);
}
.acceso-titulo { font-size: 32px; font-weight: 700; margin: 0; letter-spacing: .01em; }
.acceso-sub { color: var(--texto-2); margin: 6px 24px 0; font-size: 16px; }
.acceso-modos { margin-bottom: 16px; grid-template-columns: 1fr 1fr; }
.acceso-modos a { text-align: center; padding: 8px 4px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--texto); }
.acceso-modos a.activo { background: var(--tarjeta-3); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
@media (prefers-color-scheme: light) { .acceso-modos a.activo { background: #fff; } }
.campo-apilado { display: block; padding: 10px 16px 8px; position: relative; }
.campo-apilado + .campo-apilado::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--separador); }
.campo-apilado > span:first-child { display: block; font-size: 13px; color: var(--texto-2); margin-bottom: 2px; }
.campo-apilado input { width: 100%; background: none; border: 0; outline: 0; font-size: 17px; padding: 4px 0; color: var(--texto); }
.campo-apilado input::placeholder { color: var(--texto-3); }
.con-ojo { display: flex; align-items: center; gap: 8px; }
.ojo { background: none; border: 0; color: var(--texto-2); padding: 4px; cursor: pointer; display: grid; place-items: center; }
.boton.grande { min-height: 54px; font-size: 18px; border-radius: 16px; }
.acceso-nota { color: var(--texto-2); font-size: 14px; text-align: center; margin: 4px 12px 0; }
.acceso-pie { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--texto-2); font-size: 13px; margin-top: 30px; }
.acceso-form .error { margin-left: 16px; }
.acceso-form input[name=codigo] { font-size: 28px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.pasos .qr { margin-top: 14px; }

/* ---------- captura: detalles ---------- */
.texto-3 { color: var(--texto-3); text-transform: none; letter-spacing: 0; }
.tipos .tipo-gasto input:checked + span { color: var(--rojo); }
.tipos .tipo-ingreso input:checked + span { color: var(--verde); }
.tipos .tipo-transferencia input:checked + span { color: var(--acento); }
.monto-grande[data-tipo=ingreso] input { color: var(--verde); }
.monto-grande.sacudir { animation: sacudir .35s; }
@keyframes sacudir { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.chip-mas {
  padding: 8px 14px; border-radius: 20px; border: 1.5px dashed var(--tarjeta-3);
  background: none; color: var(--acento); font-size: 15px; cursor: pointer;
}
.chip-mas[hidden] { display: none; }
.chips-meses .chip span { min-width: 48px; justify-content: center; }
.meses-detalle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding: 12px 14px; background: var(--tarjeta); border-radius: 14px;
}
.meses-detalle[hidden] { display: none; }
.mensualidad { font-weight: 700; font-variant-numeric: tabular-nums; }
.tasa { color: var(--texto-2); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.tasa input { width: 64px; background: var(--tarjeta-2); border: 0; border-radius: 8px; padding: 6px 8px; font-size: 16px; text-align: right; color: var(--texto); }
.fecha-rapida { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: flex-end; min-width: 0; }
.fecha-rapida input { flex: 0 1 auto; width: auto; min-width: 0; }
.mini { background: var(--tarjeta-2); border: 0; border-radius: 8px; padding: 5px 9px; font-size: 14px; color: var(--acento); cursor: pointer; }
.enlace-plan { min-height: 0; }
.boton.grande { margin-top: 6px; }

/* ---------- acciones rápidas del panel ---------- */
.rapidas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 18px; }
.rapida {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px;
  background: var(--tarjeta); border-radius: 18px; color: var(--texto); font-size: 12.5px; font-weight: 500; text-align: center;
}
.rapida .glifo { width: 38px; height: 38px; border-radius: 12px; }

/* ---------- planes a meses ---------- */
.plan-fila .fila-texto { gap: 4px; }
.plan-cuotas { font-variant-numeric: tabular-nums; }
.etiqueta-msi { display: inline-block; font-size: 11px; font-weight: 700; color: var(--acento); background: color-mix(in srgb, var(--acento) 16%, transparent); padding: 1px 6px; border-radius: 6px; margin-left: 4px; vertical-align: 1px; }
.resumen-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-select { font-size: 16px; }
.relleno-chico { padding: 0 20px 6px; margin: 0; }
.tarjeta-titulo-fila.fuera { padding: 0 4px; margin: 22px 16px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.seccion-titulo.sin-margen { margin: 0; }
.chip-select {
  appearance: none; background: var(--tarjeta); border: 1.5px solid transparent; border-radius: 20px;
  padding: 8px 14px; font-size: 16px; color: var(--acento); cursor: pointer;
}
/* En el teléfono no se puede escanear la propia pantalla: botón al llavero. */
.solo-escritorio { display: none; }
@media (hover: hover) and (pointer: fine) {
  .solo-escritorio { display: block; }
  .solo-movil { display: none !important; }
}
.pasos .boton { margin: 4px 0 12px; }

/* Interruptor estilo iOS para las casillas de los formularios. */
.renglon.interruptor > span { flex: 1; max-width: none; }
.renglon.interruptor input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; width: 51px; height: 31px; margin: 0;
  border-radius: 16px; background: var(--tarjeta-3); position: relative; cursor: pointer; transition: background .2s;
}
.renglon.interruptor input[type=checkbox]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .2s;
}
.renglon.interruptor input[type=checkbox]:checked { background: var(--verde); }
.renglon.interruptor input[type=checkbox]:checked::after { transform: translateX(20px); }
.plan-cuotas { font-size: 13px; }

/* ======================================================================
   Vista web (≥ 1024 px): barra lateral, contenido en columnas, tablas.
   En el teléfono nada de esto aplica: se queda la vista tipo app.
   ====================================================================== */
.lateral, .solo-ancho { display: none; }
.rejilla { display: block; }

/* ---------- cola de estados de cuenta (ambas vistas) ---------- */
.soltar {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 28px 20px; margin-bottom: 16px; cursor: pointer;
  border: 2px dashed var(--tarjeta-3); border-radius: 22px; background: var(--tarjeta);
  transition: border-color .15s, background .15s;
}
.soltar input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.soltar.encima { border-color: var(--acento); background: color-mix(in srgb, var(--acento) 10%, var(--tarjeta)); }
.soltar-glifo { color: var(--acento); }
.soltar-titulo { font-size: 18px; font-weight: 600; }
.soltar-sub { color: var(--texto-2); font-size: 14px; max-width: 34ch; }
[data-sin-js][hidden] { display: none; }
.fila-cola { align-items: flex-start; }
.fila-cola .fila-texto { padding-top: 2px; }
.fila-cola .fila-sub { white-space: normal; }
.fila-cola[data-estado=ok] .cola-indicador { color: var(--verde); }
.fila-cola[data-estado=revisar] .cola-indicador, .fila-cola[data-estado=protegido] .cola-indicador { color: var(--naranja); }
.fila-cola[data-estado=error] .cola-indicador, .fila-cola[data-estado=error] .fila-sub { color: var(--rojo); }
.cola-indicador { flex: none; width: 24px; display: grid; place-items: center; padding-top: 6px; }
.cola-extra { font-size: 14px; }
.cola-extra:empty { display: none; }
.cola-clave { display: flex; gap: 8px; margin-top: 6px; }
.cola-clave input { flex: 1; min-width: 0; background: var(--tarjeta-2); border: 0; border-radius: 10px; padding: 8px 10px; font-size: 16px; color: var(--texto); }
.girando {
  width: 18px; height: 18px; border-radius: 50%; display: inline-block;
  border: 2.5px solid var(--tarjeta-3); border-top-color: var(--acento); animation: girar .8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
.col { display: none; }

@media (min-width: 1024px) {
  .solo-angosto { display: none !important; }
  .solo-ancho { display: inline; }
  .tabs, .fab { display: none !important; }

  /* ---------- barra lateral ---------- */
  .lateral {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 20;
    padding: 22px 14px 16px; background: var(--tarjeta); border-right: .5px solid var(--separador); overflow-y: auto;
  }
  .lateral-marca { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--texto); padding: 0 8px; margin-bottom: 18px; }
  .lateral-logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #2b9bff, #0062e6); }
  .lateral-nuevo { min-height: 42px; font-size: 15px; border-radius: 12px; margin-bottom: 16px; }
  .lateral-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .lateral-nav a {
    display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px;
    color: var(--texto); font-size: 15px; font-weight: 500;
  }
  .lateral-nav a .ico { color: var(--texto-2); width: 1.25em; height: 1.25em; }
  .lateral-nav a:hover { background: var(--tarjeta-2); }
  .lateral-nav a.activa { background: color-mix(in srgb, var(--acento) 16%, transparent); color: var(--acento); }
  .lateral-nav a.activa .ico { color: var(--acento); }
  .lateral-nav .insignia { margin-left: auto; margin-right: 0; }
  .lateral-grupo { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); padding: 16px 10px 4px; }
  .lateral-pie { border-top: .5px solid var(--separador); padding: 12px 6px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .lateral-usuario { font-size: 13px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* ---------- contenido ---------- */
  body:not(.sin-sesion) { padding-left: 248px; }
  body:not(.sin-sesion) .pagina { max-width: 900px; margin: 0 auto; padding: 28px 40px 60px; }
  body.ancha .pagina { max-width: 1240px; }
  body.hoja .pagina { max-width: 720px; }
  .encabezado-acciones { min-height: 36px; }
  .titulo-grande { margin-top: 2px; }
  .barra-hoja { position: static; margin: 0 0 18px; padding: 14px 18px; border-radius: 16px; background: var(--tarjeta); }
  .fila:hover, .lista a.fila:hover { background: color-mix(in srgb, var(--tarjeta-2) 60%, transparent); }
  .tarjeta-cuenta { transition: transform .15s; }
  .tarjeta-cuenta:hover { transform: translateY(-2px); }
  .boton:hover { filter: brightness(1.08); }

  /* Cuentas: rejilla en lugar de carrusel. */
  .carrusel { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); overflow: visible; margin: 0 0 18px; padding: 0; }
  .puntos { display: none; }
  .rapidas { grid-template-columns: repeat(4, minmax(0, 170px)); }
  .rapida { flex-direction: row; justify-content: center; gap: 10px; font-size: 15px; padding: 12px; }

  /* Rejillas por pantalla: en el teléfono el orden del HTML; aquí, columnas. */
  .rejilla { display: grid; gap: 0 22px; align-items: start; }
  .rejilla > * { min-width: 0; }
  .rejilla-panel { grid-template-columns: 1.15fr 1fr; grid-template-areas: "tendencia gastos" "movs meses" "movs ."; }
  .area-tendencia { grid-area: tendencia; }
  .area-gastos { grid-area: gastos; }
  .area-meses { grid-area: meses; }
  .area-movs { grid-area: movs; }
  .rejilla-estadisticas { grid-template-columns: 1fr 1fr; grid-template-areas: "resumen resumen" "dona flujo" "dona tendencia"; }
  .area-resumen { grid-area: resumen; }
  .area-dona { grid-area: dona; }
  .area-flujo { grid-area: flujo; }
  .rejilla-plan { grid-template-columns: 1fr 1fr; grid-template-areas: "resumen meses" "limites meses"; }
  .rejilla-plan .area-limites { grid-area: limites; }
  .rejilla-plan .area-meses .tarjeta-titulo-fila.fuera { margin-top: 0; }
  .rejilla-cuenta { grid-template-columns: 1fr 1.2fr; grid-template-areas: "izq der" "izq2 der"; }
  .area-izq { grid-area: izq; }
  .area-izq2 { grid-area: izq2; }
  .area-der { grid-area: der; }
  .rejilla-estados { grid-template-columns: 420px 1fr; }
  .rejilla-estados .area-cola .tarjeta-titulo-fila.fuera:first-child { margin-top: 0; }
  .soltar { padding: 48px 24px; }

  /* Movimientos como tabla. */
  .lista.tabla .fila { display: grid; grid-template-columns: 36px minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 110px 130px; gap: 14px; }
  .lista.tabla .fila-sub { display: none; }
  .lista.tabla .col { display: block; font-size: 15px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lista.tabla .fila + .fila::before { left: 70px; }
  .dia-encabezado { margin-left: 4px; margin-right: 4px; }

  /* Más: dos columnas de secciones. */
  .grafica { min-height: 0; }
  .dona.grande { width: 220px; height: 220px; }
}
@media (min-width: 1024px) and (prefers-color-scheme: light) {
  .lateral { background: #fff; }
}

/* ---------- identidad, profundidad y lectura ---------- */
:root {
  --fondo: #0c1019;
  --tarjeta: #151c29;
  --tarjeta-2: #202a3a;
  --tarjeta-3: #354157;
  --texto: #f2f5fb;
  --texto-2: #a5b2c7;
  --texto-3: #7e8da5;
  --acento: #a5b4ff;
  --verde: #67dfb3;
  --rojo: #ff858e;
  --separador: rgba(150, 174, 205, .14);
  --barra: rgba(16, 23, 35, .86);
  --sombra: 0 8px 28px rgba(0, 0, 0, .14);
  --radio: 20px;
}
@media (prefers-color-scheme: light) {
  :root {
    --fondo: #f3f5f9;
    --tarjeta: #fff;
    --tarjeta-2: #edf0f6;
    --tarjeta-3: #d8dfeb;
    --texto: #18253b;
    --texto-2: #596981;
    --texto-3: #6c7b92;
    --acento: #514edb;
    --verde: #087d5e;
    --rojo: #c53548;
    --separador: rgba(54, 77, 111, .12);
    --barra: rgba(255, 255, 255, .9);
    --sombra: 0 6px 24px rgba(39, 57, 91, .04);
  }
}
[hidden] { display: none !important; }
body { line-height: 1.5; }
button, a, input, select, summary { touch-action: manipulation; }
a, button { transition: background .18s, color .18s, transform .18s; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 4px; }
.renglon:focus-within, .campo-apilado:focus-within { box-shadow: inset 3px 0 var(--acento); }
.saltar { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 12px 20px; background: var(--tarjeta); border-radius: 12px; }
.saltar:focus { top: 20px; }
.encabezado-contexto { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 10px; letter-spacing: .13em; color: var(--texto-2); }
.privacidad { display: inline-flex; align-items: center; gap: 5px; letter-spacing: 0; font-size: 11px; }
.privacidad .ico { color: var(--verde); }
.titulo-grande { letter-spacing: -.045em; line-height: 1.16; margin: 9px 0 12px; font-weight: 720; }
.subtitulo { color: var(--texto-2); font-size: 15px; margin: -3px 0 24px; }
.tarjeta, .tarjeta-cuenta, .grupo { border: 1px solid var(--separador); box-shadow: var(--sombra); }
.tarjeta { padding: 22px; }
.tarjeta-titulo { font-size: 18px; letter-spacing: -.025em; font-weight: 650; }
.cifra-grande { letter-spacing: -.045em; font-weight: 650; }
.etiqueta-chica, .seccion-titulo { font-size: 11px; letter-spacing: .08em; }
.boton { background: #6664e8; color: #fff; box-shadow: 0 4px 12px rgba(66, 59, 166, .14); font-weight: 600; border-radius: 13px; gap: 8px; }
.boton:active, .rapida:active { transform: scale(.98); }
.boton-texto, .ojo, .cola-enlace { min-height: 44px; display: inline-flex; align-items: center; }
.enlace-derecha { font-size: 14px; font-weight: 550; }
.fila { min-height: 68px; padding-top: 13px; padding-bottom: 13px; }
.fila-titulo { font-size: 15px; font-weight: 550; }
.fila-sub { font-size: 12px; }
.fila-monto { font-size: 15px; }
.glifo { background: color-mix(in srgb, var(--c, var(--acento)) 15%, var(--tarjeta)); color: var(--c, var(--acento)); border-radius: 12px; }
.tarjeta-cuenta { position: relative; background: linear-gradient(145deg, color-mix(in srgb, var(--c, var(--acento)) 9%, var(--tarjeta)), var(--tarjeta)); padding: 20px 18px 24px; overflow: hidden; }
.tarjeta-cuenta::before { content: ""; position: absolute; top: 0; left: 22px; right: 22px; height: 2px; background: var(--c, var(--acento)); opacity: .7; }
.cuenta-icono { color: var(--c, var(--acento)); background: color-mix(in srgb, var(--c, var(--acento)) 14%, var(--tarjeta)); border-radius: 13px; margin-bottom: 22px; }
.cuenta-nombre { font-size: 11px; letter-spacing: .06em; }
.cuenta-saldo { font-size: clamp(17px, 5.3vw, 25px); letter-spacing: -.03em; font-weight: 650; }
.rapidas { gap: 10px; }
.rapida { border: 1px solid var(--separador); border-radius: 15px; background: var(--tarjeta); font-weight: 550; }
.panorama { display: grid; grid-template-columns: 1fr 1fr; border-radius: 24px; padding: 24px; margin: 0 0 22px; gap: 22px 16px; color: #f2f6ff; background: radial-gradient(ellipse at top right, rgba(89, 218, 177, .18), transparent 65%), linear-gradient(120deg, #1a2941, #152b32); border: 1px solid rgba(132, 178, 196, .22); box-shadow: 0 12px 32px rgba(10, 28, 41, .12); }
.panorama .etiqueta-chica { color: #b1c6d4; line-height: 1.5; }
.panorama-principal { display: flex; flex-direction: column; grid-column: 1 / -1; }
.panorama-principal > strong { font-size: clamp(30px, 8.5vw, 46px); letter-spacing: -.055em; font-weight: 620; font-variant-numeric: tabular-nums; line-height: 1.3; margin: 6px 0; overflow-wrap: anywhere; }
.panorama-nota { color: #b1c6d4; font-size: 12px; }
.panorama-dato { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(184, 212, 223, .18); padding-top: 16px; min-width: 0; }
.panorama-dato > strong { font-size: clamp(17px, 4.5vw, 24px); letter-spacing: -.03em; font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.panorama-dato > a { font-size: 12px; color: #bfc9ff; }
.grafica-nota { font-size: 13px; margin: 0 0 8px; }
.grafica .area { opacity: .09; }
.grafica .reticula { stroke-dasharray: 3 6; }
.tabs { border-top: 1px solid var(--separador); }
.tab.activa { color: var(--acento); }
.fab { background: #6664e8; box-shadow: 0 6px 24px rgba(42, 35, 109, .3); }
.buscador { border: 1px solid var(--separador); min-height: 48px; }
.soltar { border: 1px dashed var(--texto-3); background: linear-gradient(145deg, color-mix(in srgb, var(--acento) 6%, var(--tarjeta)), var(--tarjeta)); gap: 12px; padding: 30px 22px; }
.soltar:focus-within { outline: 3px solid var(--acento); outline-offset: 4px; }
.soltar-glifo { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: color-mix(in srgb, var(--acento) 12%, var(--tarjeta)); }
.soltar-titulo { letter-spacing: -.025em; font-size: 20px; line-height: 1.35; max-width: 22ch; }
.soltar-sub { font-size: 13px; line-height: 1.65; }
.soltar-boton { display: inline-flex; gap: 10px; align-items: center; background: #6664e8; color: #fff; padding: 10px 18px; border-radius: 11px; font-size: 14px; margin-top: 6px; }
.soltar-limites { font-size: 11px; color: var(--texto-2); }
.importacion-nota { display: flex; align-items: center; gap: 10px; color: var(--texto-2); margin: 16px 4px; font-size: 12px; }
.importacion-nota .ico { color: var(--verde); }
.importacion-nota p { margin: 0; }
.como-importar { color: var(--texto-2); font-size: 13px; margin: 18px 4px 24px; }
.como-importar summary { cursor: pointer; padding: 10px 0; color: var(--acento); }
.como-importar p { line-height: 1.7; }
.historial-vacio { padding: 42px 24px; }
.historial-vacio .vacio-titulo { font-size: 19px; }
.historial-vacio .vacio-texto { max-width: 32ch; margin-left: auto; margin-right: auto; font-size: 14px; }
.fila-cola { gap: 10px; }
.fila-cola .fila-titulo { white-space: normal; overflow-wrap: anywhere; }
.fila-cola .fila-sub { font-size: 13px; line-height: 1.5; margin-top: 4px; }
.cola-quitar { background: none; border: 0; color: var(--texto-2); width: 32px; min-height: 44px; flex: none; font-size: 22px; padding: 0; cursor: pointer; }
.cola-progreso { width: 100%; height: 5px; margin-top: 10px; appearance: none; border: 0; border-radius: 4px; overflow: hidden; background: var(--tarjeta-3); accent-color: var(--acento); }
.cola-progreso::-webkit-progress-bar { background: var(--tarjeta-3); }
.cola-progreso::-webkit-progress-value { background: var(--acento); border-radius: 4px; }
.cola-progreso::-moz-progress-bar { background: var(--acento); }
.cola-clave { flex-wrap: wrap; }
.cola-clave input { min-width: 110px; }
.acceso { padding-top: max(60px, 12vh); }
.acceso-logo { background: linear-gradient(150deg, #8889f3, #5552c5); box-shadow: 0 12px 32px rgba(92, 84, 182, .2), inset 0 1px 0 rgba(255,255,255,.3); }
.acceso-titulo { letter-spacing: -.04em; }
.campo-apilado { padding-top: 16px; padding-bottom: 14px; }
.campo-apilado + .campo-apilado::before { right: 16px; }
@media (min-width: 1024px) {
  .lateral { background: var(--tarjeta); padding: 32px 18px 22px; }
  .lateral-marca { margin-bottom: 28px; letter-spacing: -.035em; font-size: 23px; }
  .lateral-logo { background: #6664e8; border-radius: 11px; }
  .lateral-nav a { min-height: 44px; font-size: 13px; padding: 11px 12px; }
  .lateral-nav a.activa { background: color-mix(in srgb, var(--acento) 10%, transparent); box-shadow: inset 3px 0 var(--acento); }
  .lateral-grupo { font-size: 10px; letter-spacing: .12em; padding-top: 22px; }
  .lateral-nuevo { font-size: 13px; min-height: 44px; }
  body:not(.sin-sesion) .pagina { padding: 40px clamp(24px, 3.2vw, 48px) 60px; }
  .encabezado-acciones:has(> .espaciador:only-child) { display: none; }
  .encabezado-contexto { font-size: 10px; margin-bottom: 12px; }
  .privacidad { font-size: 12px; }
  .titulo-grande { font-size: 36px; margin-bottom: 14px; }
  .encabezado { margin-bottom: 26px; }
  .subtitulo { margin-bottom: 0; }
  .panorama { grid-template-columns: 1.5fr 1fr 1fr; padding: 30px; gap: 28px; align-items: center; margin-bottom: 26px; }
  .panorama-principal { grid-column: auto; }
  .panorama-principal > strong { font-size: clamp(32px, 3.2vw, 46px); }
  .panorama-dato { border-top: 0; border-left: 1px solid rgba(184, 212, 223, .18); padding: 4px 0 4px 26px; }
  .panorama-dato > strong { font-size: 22px; }
  .carrusel { grid-auto-columns: auto; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
  .cuenta-saldo { font-size: 24px; }
  .rapidas { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 26px; }
  .rapida { padding: 13px 10px; font-size: 13px; }
  .rejilla { gap: 0 20px; }
  .rejilla-panel { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "tendencia gastos" "movs meses"; }
  .rejilla-estados { grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr); gap: 28px; }
  .soltar { padding: 36px 24px; }
  .lista.tabla .fila { grid-template-columns: 36px minmax(100px, 2fr) minmax(80px, 1.1fr) minmax(85px, 1.1fr) 68px minmax(100px, 1fr); gap: 12px; }
  .lista.tabla .col { font-size: 12px; }
  .fila:hover { border-radius: 12px; }
}
@media (min-width: 1024px) and (max-width: 1200px) {
  .dona-fila { flex-direction: column; }
  .dona-fila .leyenda { width: 100%; }
  .panorama { padding: 24px; gap: 18px; }
  .panorama-dato { padding-left: 18px; }
  .panorama-dato > strong { font-size: 18px; }
}
@media (max-width: 390px) {
  .panorama { padding: 20px; gap: 18px 12px; }
  .dona-fila { gap: 10px; }
  .dona { width: 110px; height: 110px; }
  .leyenda { font-size: 12px; }
  .leyenda li { gap: 5px; }
  .leyenda-valor { font-size: 11px; }
  .tarjeta { padding: 18px 16px; }
  .fila { padding-left: 16px; padding-right: 16px; }
  .privacidad { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

:root[data-tema="oscuro"] {
  color-scheme: dark;
  --fondo: #0c1019;
  --tarjeta: #151c29;
  --tarjeta-2: #202a3a;
  --tarjeta-3: #354157;
  --texto: #f2f5fb;
  --texto-2: #a5b2c7;
  --texto-3: #7e8da5;
  --acento: #a5b4ff;
  --verde: #67dfb3;
  --rojo: #ff858e;
  --separador: rgba(150, 174, 205, .14);
  --barra: rgba(16, 23, 35, .86);
  --sombra: 0 8px 28px rgba(0, 0, 0, .14);
  --radio: 20px;
}

:root[data-tema="claro"] {
  color-scheme: light;
    --fondo: #f3f5f9;
    --tarjeta: #fff;
    --tarjeta-2: #edf0f6;
    --tarjeta-3: #d8dfeb;
    --texto: #18253b;
    --texto-2: #596981;
    --texto-3: #6c7b92;
    --acento: #514edb;
    --verde: #087d5e;
    --rojo: #c53548;
    --separador: rgba(54, 77, 111, .12);
    --barra: rgba(255, 255, 255, .9);
    --sombra: 0 6px 24px rgba(39, 57, 91, .04);
  }
.encabezado-utilidades { display: flex; align-items: center; gap: 16px; }
.tema-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid var(--separador); border-radius: 9px; color: var(--texto-2); background: var(--tarjeta); font-size: 12px; cursor: pointer; min-height: 36px; }
@media (max-width: 600px) { .encabezado-utilidades { gap: 8px; } .encabezado-contexto .privacidad { display: none; } }
