/* ==========================================================================
   TUN 屯 — "Tunea con TUN"
   Identidad: noche ciruela, corrientes naranja-oro y destellos celeste nube.
   ========================================================================== */
@font-face {
  font-family: 'Sora';
  src: url('fuentes/sora.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215;
}
@font-face {
  font-family: 'Sora';
  src: url('fuentes/sora-ext.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --noche: #1b0f2e;
  --noche-2: #241540;
  --capa: rgba(43, 25, 74, 0.66);
  --capa-fuerte: rgba(36, 20, 64, 0.92);
  --borde: rgba(255, 170, 90, 0.16);
  --borde-fuerte: rgba(255, 170, 90, 0.34);
  --naranja: #ff7a1a;
  --mandarina: #ffa23d;
  --oro: #ffd36e;
  --celeste: #7fd6ff;
  --menta: #5be7a9;
  --rojo: #ff5c7a;
  --texto: #fff4ea;
  --texto-2: #d5c4ee;
  --texto-3: #a893c9;
  --degradado: linear-gradient(120deg, #ffd36e 0%, #ff9a2e 45%, #ff5e1a 100%);
  --sombra: 0 18px 50px -18px rgba(8, 2, 20, 0.85);
  --brillo: 0 0 0 1px rgba(255, 162, 61, 0.35), 0 10px 40px -8px rgba(255, 122, 26, 0.55);
  --r-grande: 28px;
  --r-medio: 18px;
  --r-chico: 12px;
  --ancho-app: 480px;
  --pie: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--noche) radial-gradient(120% 80% at 80% -10%, #3b1d5e 0%, rgba(27, 15, 46, 0) 60%) no-repeat;
  color: var(--texto);
  font-family: 'Sora', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#fondo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#raiz { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--celeste); }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; border-radius: 10px; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* -------------------------------------------------------------- Marca -- */
.glifo { font-family: 'Noto Sans CJK SC', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif; font-weight: 900; }
.marca { display: flex; align-items: center; gap: 12px; }
.marca__logo { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 6px 18px rgba(255, 122, 26, 0.45)); }
.marca__nombre {
  font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1; padding-top: 0.15em; /* tilde de TÚN */
  background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.marca__lema { display: block; font-style: italic; font-weight: 500; color: var(--oro); font-size: 0.82rem; margin-top: 4px; letter-spacing: 0.01em; }
.marca__lema::before { content: '“'; }
.marca__lema::after { content: '”'; }

.heroe { text-align: center; padding: 8vh 24px 24px; }
.heroe__logo { width: 132px; height: 132px; filter: drop-shadow(0 18px 50px rgba(255, 122, 26, 0.55)); animation: flotar 6s ease-in-out infinite; }
.heroe__nombre {
  margin: 6px 0 0; padding-top: 0.2em; font-size: clamp(3.4rem, 15vw, 5rem); font-weight: 800; letter-spacing: -0.06em; line-height: 0.95; /* espacio para la tilde de TÚN */
  background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.heroe__lema { margin: 10px 0 0; font-style: italic; font-size: 1.35rem; font-weight: 600; color: var(--oro); }
.heroe__lema::before { content: '“'; }
.heroe__lema::after { content: '”'; }
.heroe__frase { margin: 14px auto 0; color: var(--texto-2); max-width: 30ch; }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ------------------------------------------------------------ Esqueleto -- */
.app { max-width: var(--ancho-app); margin: 0 auto; padding: 16px 16px calc(96px + var(--pie)); }
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 2px 18px; }
.cabecera__acciones { display: flex; gap: 8px; }
.icono-btn {
  position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--capa); border: 1px solid var(--borde); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.icono-btn svg { width: 22px; height: 22px; }
.icono-btn__punto {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--naranja); color: #fff; font-size: 0.72rem; font-weight: 700; display: grid; place-items: center;
}
.volver { display: flex; align-items: center; gap: 10px; padding: 4px 0 18px; }
.volver h1 { font-size: 1.35rem; margin: 0; letter-spacing: -0.02em; }

.panel-vidrio {
  background: var(--capa); border: 1px solid var(--borde); border-radius: var(--r-grande);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--sombra);
}
.bloque { padding: 20px; margin-bottom: 16px; }
.bloque h2 { font-size: 1.05rem; margin: 0 0 12px; letter-spacing: -0.01em; }
.bloque p { margin: 0 0 10px; color: var(--texto-2); }

/* ------------------------------------------------- Tarjeta de saldo ★ -- */
.saldo {
  position: relative; border-radius: var(--r-grande); padding: 2px; isolation: isolate; overflow: hidden;
  margin-bottom: 22px;
}
.saldo::before {
  content: ''; position: absolute; inset: -60%; z-index: -2;
  background: conic-gradient(from 0deg, #ff5e1a, #ffd36e, #7fd6ff, #ff9a2e, #ff5e1a);
  animation: girar 9s linear infinite;
}
.saldo__dentro {
  position: relative; border-radius: calc(var(--r-grande) - 2px); padding: 22px 22px 20px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 122, 26, 0.32), transparent 55%),
              radial-gradient(90% 120% at 0% 100%, rgba(127, 214, 255, 0.18), transparent 60%), #22123c;
}
.saldo__glifo { position: absolute; right: -18px; bottom: -40px; font-size: 170px; line-height: 1; color: rgba(255, 211, 110, 0.07); pointer-events: none; }
.saldo__fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.saldo__etiqueta { color: var(--texto-2); font-size: 0.9rem; }
.saldo__monto { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.saldo__simbolo { font-size: 1.9rem; color: var(--oro); }
.saldo__cifra { font-size: clamp(2.6rem, 11vw, 3.4rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.saldo__cifra small { font-size: 0.5em; font-weight: 600; color: var(--texto-2); letter-spacing: 0; }
.saldo__equivale { color: var(--texto-3); font-size: 0.85rem; }
.saldo__ident {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.9rem; font-weight: 600;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Acciones -- */
.acciones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.accion { background: none; border: 0; padding: 0; display: grid; justify-items: center; gap: 8px; color: var(--texto); font-size: 0.82rem; font-weight: 600; }
.accion__circulo {
  width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center;
  background: rgba(255, 122, 26, 0.12); border: 1px solid var(--borde-fuerte); transition: transform 0.15s ease, background 0.2s;
}
.accion__circulo svg { width: 28px; height: 28px; }
.accion--principal .accion__circulo { background: var(--degradado); border: 0; box-shadow: var(--brillo); color: #2a1200; }
.accion:active .accion__circulo { transform: scale(0.92); }
.accion[disabled] { opacity: 0.4; }

/* ---------------------------------------------------------- Listas -- */
.titulo-seccion { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 2px 10px; }
.titulo-seccion h2 { font-size: 1.05rem; margin: 0; }
.titulo-seccion button { background: none; border: 0; color: var(--celeste); font-weight: 600; font-size: 0.9rem; }
.lista { display: grid; gap: 8px; }
.mov {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 16px; background: var(--capa); border: 1px solid rgba(255, 255, 255, 0.05);
}
.mov__icono { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 122, 26, 0.14); color: var(--mandarina); }
.mov__icono svg { width: 22px; height: 22px; }
.mov--entrada .mov__icono { background: rgba(91, 231, 169, 0.13); color: var(--menta); }
.mov__nombre { font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mov__detalle { color: var(--texto-3); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mov__monto { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mov--entrada .mov__monto { color: var(--menta); }
.mov--revertida { opacity: 0.55; }
.mov--revertida .mov__monto { text-decoration: line-through; }
.vacio { text-align: center; padding: 28px 16px; color: var(--texto-2); }
.vacio .glifo { display: block; font-size: 3rem; color: rgba(255, 211, 110, 0.35); margin-bottom: 6px; }

/* ---------------------------------------------------------- Formularios -- */
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo label { font-size: 0.88rem; color: var(--texto-2); font-weight: 500; }
.campo__ayuda { font-size: 0.78rem; color: var(--texto-3); }
.entrada {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 6, 28, 0.55); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.entrada:focus { border-color: var(--mandarina); box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.18); }
.entrada--clave { position: relative; }
.con-ojo { position: relative; }
.con-ojo .entrada { padding-right: 52px; }
.con-ojo button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; width: 42px; height: 42px; display: grid; place-items: center; color: var(--texto-2); }
.con-ojo svg { width: 22px; height: 22px; }
select.entrada { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--texto-2) 50%), linear-gradient(135deg, var(--texto-2) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.error { color: var(--rojo); font-size: 0.88rem; min-height: 1.3em; margin: 4px 0 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px 20px;
  border-radius: var(--r-medio); border: 0; font-weight: 700; font-size: 1.02rem; letter-spacing: 0.005em;
  background: var(--degradado); color: #2a1200; box-shadow: var(--brillo); transition: transform 0.12s ease, filter 0.2s;
  text-decoration: none; cursor: pointer;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { filter: grayscale(0.7) brightness(0.7); cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; }
.btn--vidrio { background: var(--capa); color: var(--texto); border: 1px solid var(--borde-fuerte); box-shadow: none; }
.btn--peligro { background: linear-gradient(120deg, #ff8a9e, #ff3b5c); color: #2a0010; box-shadow: 0 10px 30px -10px rgba(255, 59, 92, 0.6); }
.btn--chico { width: auto; padding: 10px 16px; font-size: 0.9rem; border-radius: 12px; }
.btn--texto { background: none; box-shadow: none; color: var(--celeste); padding: 12px; width: auto; }
.botones { display: grid; gap: 10px; margin-top: 8px; }
.botones--fila { grid-template-columns: 1fr 1fr; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--borde-fuerte); background: rgba(255, 122, 26, 0.08);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.chip[aria-pressed='true'] { background: var(--degradado); color: #2a1200; border-color: transparent; }

.pestanas { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(14, 6, 28, 0.5); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.pestanas button { flex: 1; white-space: nowrap; padding: 10px 14px; border: 0; border-radius: 12px; background: none; color: var(--texto-2); font-weight: 600; font-size: 0.9rem; }
.pestanas button[aria-selected='true'] { background: var(--capa-fuerte); color: var(--texto); box-shadow: inset 0 0 0 1px var(--borde-fuerte); }

/* -------------------------------------------------------- Teclado -- */
.monto-grande { text-align: center; padding: 18px 0 8px; }
.monto-grande__cifra { font-size: clamp(3rem, 16vw, 4.2rem); font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.monto-grande__cifra .glifo { color: var(--oro); font-size: 0.55em; margin-right: 6px; vertical-align: 0.25em; }
.monto-grande__nota { color: var(--texto-3); font-size: 0.85rem; min-height: 1.4em; }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 16px; }
.tecla { height: 62px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.05); font-size: 1.5rem; font-weight: 600; display: grid; place-items: center; }
.tecla:active { background: rgba(255, 122, 26, 0.25); }
.tecla svg { width: 26px; height: 26px; }

/* ------------------------------------------------------- Persona -- */
.persona { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--capa); border: 1px solid rgba(255, 255, 255, 0.06); width: 100%; text-align: left; }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #2a1200; background: var(--degradado); font-size: 1.1rem; }
.avatar--grande { width: 76px; height: 76px; font-size: 1.8rem; margin: 0 auto 10px; box-shadow: var(--brillo); }
.persona__nombre { font-weight: 600; }
.persona__ident { color: var(--texto-3); font-size: 0.85rem; }
.persona__fin { margin-left: auto; color: var(--oro); }

/* --------------------------------------------------- Confirmación -- */
.resumen-op { text-align: center; padding: 26px 20px 22px; }
.resumen-op__monto { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.resumen-op__monto .glifo { color: var(--oro); font-size: 0.6em; margin-right: 6px; }
.datos { display: grid; gap: 0; margin: 16px 0 6px; text-align: left; }
.datos div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); font-size: 0.92rem; }
.datos div:last-child { border-bottom: 0; }
.datos dt, .datos > div > span:first-child { color: var(--texto-3); }
.datos dd, .datos > div > span:last-child { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

/* --------------------------------------------------------- Hojas -- */
.velo { position: fixed; inset: 0; z-index: 50; background: rgba(10, 3, 22, 0.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: aparecer 0.2s ease; }
.hoja { width: 100%; max-width: var(--ancho-app); max-height: 92vh; overflow-y: auto; border-radius: 30px 30px 0 0; padding: 12px 20px calc(24px + var(--pie)); background: linear-gradient(180deg, #2c1850, #1d1033); border: 1px solid var(--borde); border-bottom: 0; animation: subir 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
.hoja__asa { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); margin: 0 auto 14px; }
.hoja h2 { text-align: center; margin: 0 0 6px; font-size: 1.2rem; }
.hoja__sub { text-align: center; color: var(--texto-2); margin: 0 0 14px; font-size: 0.92rem; }
@media (min-width: 720px) {
  .velo { align-items: center; }
  .hoja { border-radius: 30px; border-bottom: 1px solid var(--borde); }
}
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }

.pin-puntos { display: flex; justify-content: center; gap: 14px; margin: 12px 0 8px; }
.pin-puntos i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--texto-3); transition: all 0.15s; }
.pin-puntos i.lleno { background: var(--oro); border-color: var(--oro); box-shadow: 0 0 14px rgba(255, 211, 110, 0.8); transform: scale(1.1); }
.pin-puntos--error { animation: temblar 0.4s; }
@keyframes temblar { 25% { transform: translateX(-10px); } 50% { transform: translateX(10px); } 75% { transform: translateX(-6px); } }

/* --------------------------------------------------------- Éxito -- */
.exito { text-align: center; padding: 28px 8px 12px; }
.exito__sello {
  width: 128px; height: 128px; margin: 0 auto 18px; border-radius: 40px; display: grid; place-items: center; font-size: 74px; color: #2a1200;
  background: var(--degradado); box-shadow: 0 0 0 10px rgba(255, 162, 61, 0.12), 0 0 0 22px rgba(255, 162, 61, 0.06), 0 20px 60px -10px rgba(255, 122, 26, 0.8);
  animation: sello 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.exito h1 { font-size: 2rem; margin: 0; letter-spacing: -0.03em; }
.exito__monto { font-size: 2.4rem; font-weight: 700; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.exito__a { color: var(--texto-2); }
@keyframes sello { from { transform: scale(0.2) rotate(-25deg); opacity: 0; } }
#chispas { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

/* ------------------------------------------------------- Recarga -- */
.pagar-exacto { text-align: center; padding: 22px 18px; }
.pagar-exacto__monto { font-size: clamp(2.8rem, 13vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.pagar-exacto__nota { color: var(--texto-2); font-size: 0.9rem; }
.codigo { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: 12px; background: rgba(127, 214, 255, 0.1); border: 1px dashed rgba(127, 214, 255, 0.5); color: var(--celeste); font-weight: 700; letter-spacing: 0.08em; }
.destino { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(14, 6, 28, 0.45); border: 1px solid rgba(255, 255, 255, 0.06); }
.destino__logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 0.75rem; color: #fff; }
.destino__numero { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.destino__titular { color: var(--texto-3); font-size: 0.8rem; }
.copiar { background: rgba(255, 122, 26, 0.14); border: 1px solid var(--borde-fuerte); color: var(--mandarina); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.copiar svg { width: 20px; height: 20px; }
.esperando { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: rgba(127, 214, 255, 0.08); border: 1px solid rgba(127, 214, 255, 0.25); margin: 16px 0; }
.radar { width: 42px; height: 42px; flex: none; border-radius: 50%; position: relative; background: radial-gradient(circle, var(--celeste) 0 5px, transparent 6px); }
.radar::before, .radar::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--celeste); animation: onda 2s ease-out infinite; }
.radar::after { animation-delay: 1s; }
@keyframes onda { from { transform: scale(0.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.cuenta-regresiva { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--oro); }

/* ---------------------------------------------------------- QR -- */
.qr-marco { width: min(300px, 78vw); aspect-ratio: 1; margin: 6px auto 14px; padding: 16px; border-radius: 30px; background: #fff; position: relative; box-shadow: 0 0 0 6px rgba(255, 162, 61, 0.35), 0 30px 70px -20px rgba(255, 122, 26, 0.7); }
.qr-marco svg { width: 100%; height: 100%; display: block; }
.qr-marco__centro { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%); border-radius: 22%; overflow: hidden; box-shadow: 0 0 0 5px #fff; }
.escaner { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 60vh; border-radius: 28px; overflow: hidden; background: #000; margin-bottom: 14px; }
.escaner video { width: 100%; height: 100%; object-fit: cover; }
.escaner__mira { position: absolute; inset: 18%; border-radius: 26px; box-shadow: 0 0 0 9999px rgba(10, 3, 22, 0.45); }
.escaner__mira::before { content: ''; position: absolute; inset: 0; border-radius: 26px; border: 3px solid var(--oro); animation: latido 1.8s ease-in-out infinite; }
.escaner__linea { position: absolute; left: 18%; right: 18%; height: 2px; background: linear-gradient(90deg, transparent, var(--naranja), transparent); top: 18%; animation: barrer 2.4s ease-in-out infinite; }
@keyframes latido { 50% { opacity: 0.45; } }
@keyframes barrer { 50% { top: 82%; } }

/* ------------------------------------------------------- Avisos -- */
#avisos { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 80; width: min(440px, calc(100% - 24px)); display: grid; gap: 8px; pointer-events: none; }
.aviso { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--capa-fuerte); border: 1px solid var(--borde-fuerte); box-shadow: var(--sombra); backdrop-filter: blur(16px); animation: bajar 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.aviso__glifo { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--degradado); color: #2a1200; font-size: 1.2rem; }
.aviso--error .aviso__glifo { background: linear-gradient(120deg, #ff8a9e, #ff3b5c); color: #fff; }
.aviso strong { display: block; font-size: 0.95rem; }
.aviso span { color: var(--texto-2); font-size: 0.86rem; }
@keyframes bajar { from { transform: translateY(-30px); opacity: 0; } }

/* ------------------------------------------------- Barra inferior -- */
.barra { position: fixed; left: 50%; bottom: calc(12px + var(--pie)); transform: translateX(-50%); z-index: 20; width: min(var(--ancho-app), calc(100% - 24px)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px; border-radius: 24px; background: rgba(28, 14, 50, 0.86); border: 1px solid var(--borde); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--sombra); }
.barra a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--texto-3); text-decoration: none; font-size: 0.68rem; font-weight: 600; border-radius: 16px; }
.barra a svg { width: 24px; height: 24px; }
.barra a[aria-current='page'] { color: var(--oro); background: rgba(255, 211, 110, 0.08); }
.barra__centro { position: relative; top: -18px; }
.barra__centro span.burbuja { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; background: var(--degradado); color: #2a1200; box-shadow: var(--brillo); }

/* --------------------------------------------------------- Ajustes -- */
.opcion { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 4px; background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); text-align: left; }
.opcion:last-child { border-bottom: 0; }
.opcion__icono { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(127, 214, 255, 0.1); color: var(--celeste); flex: none; }
.opcion__icono svg { width: 20px; height: 20px; }
.opcion__texto { flex: 1; min-width: 0; }
.opcion__texto small { display: block; color: var(--texto-3); font-size: 0.8rem; }
.interruptor { position: relative; width: 52px; height: 30px; flex: none; }
.interruptor input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.interruptor span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.15); transition: background 0.2s; }
.interruptor span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.interruptor input:checked + span { background: var(--degradado); }
.interruptor input:checked + span::after { transform: translateX(22px); }
.interruptor input:focus-visible + span { outline: 3px solid var(--oro); outline-offset: 2px; }

.idiomas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.idiomas button { padding: 10px 4px; border-radius: 14px; border: 1px solid var(--borde); background: var(--capa); display: grid; justify-items: center; gap: 2px; font-size: 0.8rem; font-weight: 600; }
.idiomas button span { font-size: 1.5rem; }
.idiomas button[aria-pressed='true'] { border-color: var(--oro); box-shadow: 0 0 0 2px rgba(255, 211, 110, 0.35); }

.codigos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.codigos span { padding: 10px; text-align: center; border-radius: 12px; background: rgba(14, 6, 28, 0.6); border: 1px dashed var(--borde-fuerte); font-weight: 700; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

.paises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; }
.paises button { padding: 12px 6px; border-radius: 14px; border: 1px solid var(--borde); background: var(--capa); display: grid; justify-items: center; gap: 4px; font-size: 0.78rem; font-weight: 600; }
.paises button span { font-size: 1.8rem; line-height: 1; }
.paises button[aria-pressed='true'] { border-color: var(--oro); box-shadow: 0 0 0 2px rgba(255, 211, 110, 0.35); }
.paises button[disabled] { opacity: 0.38; }
.pasos-registro { display: flex; gap: 6px; justify-content: center; margin: 0 0 18px; }
.pasos-registro i { width: 26px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); }
.pasos-registro i.hecho { background: var(--degradado); }

/* --------------------------------------------------------- Manual -- */
.manual-seccion { padding: 0; margin-bottom: 12px; overflow: hidden; }
.manual-seccion summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; gap: 12px; align-items: center; font-weight: 700; }
.manual-seccion summary::-webkit-details-marker { display: none; }
.manual-seccion summary .opcion__icono { background: rgba(255, 122, 26, 0.14); color: var(--mandarina); }
.manual-seccion[open] summary { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.manual-cuerpo { padding: 16px 18px 20px; }
.manual-cuerpo > p { color: var(--texto-2); margin-top: 0; }
.manual-pasos { counter-reset: paso; list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.manual-pasos li { counter-increment: paso; position: relative; padding-left: 40px; color: var(--texto); font-size: 0.93rem; }
.manual-pasos li::before { content: counter(paso); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--degradado); color: #2a1200; font-weight: 800; font-size: 0.85rem; }
.manual-consejo { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(127, 214, 255, 0.08); border: 1px solid rgba(127, 214, 255, 0.2); color: var(--texto-2); font-size: 0.88rem; margin-top: 8px; }
.manual-consejo svg { width: 20px; height: 20px; flex: none; color: var(--celeste); }
.mini { margin: 4px auto 12px; width: 220px; border-radius: 30px; padding: 10px; background: #120822; border: 2px solid rgba(255, 255, 255, 0.12); box-shadow: 0 20px 50px -20px rgba(255, 122, 26, 0.5); position: relative; }
.mini__pantalla { border-radius: 22px; padding: 12px 10px; background: radial-gradient(120% 70% at 90% 0%, rgba(255, 122, 26, 0.25), transparent 60%), #1d1033; min-height: 300px; display: grid; gap: 8px; align-content: start; font-size: 9px; }
.mini__barra { height: 18px; display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 11px; }
.mini__bloque { border-radius: 10px; padding: 8px; background: rgba(255, 255, 255, 0.06); position: relative; }
.mini__bloque--saldo { background: linear-gradient(135deg, rgba(255, 122, 26, 0.35), rgba(127, 214, 255, 0.15)); padding: 12px 10px; }
.mini__bloque--saldo b { display: block; font-size: 18px; letter-spacing: -0.03em; }
.mini__fila { display: grid; grid-auto-flow: column; gap: 6px; }
.mini__boton { border-radius: 8px; padding: 7px 4px; text-align: center; background: rgba(255, 122, 26, 0.14); font-weight: 700; }
.mini__boton--fuerte { background: var(--degradado); color: #2a1200; }
.mini__resalta { box-shadow: 0 0 0 2px var(--oro), 0 0 18px rgba(255, 211, 110, 0.7); animation: latido 1.6s ease-in-out infinite; }
.mini__marca { position: absolute; right: -14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--oro); color: #2a1200; font-weight: 800; font-size: 11px; display: grid; place-items: center; box-shadow: 0 0 0 3px #120822; z-index: 2; }
.mini__marca--izq { right: auto; left: -14px; }

/* ---------------------------------------------------------- Panel -- */
.panel { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; min-height: 100dvh; }
.panel__lado { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 20px 14px; background: rgba(20, 10, 38, 0.82); border-right: 1px solid var(--borde); backdrop-filter: blur(16px); display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.panel__lado .marca { padding: 4px 8px 18px; }
.panel__nav { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; color: var(--texto-2); text-decoration: none; font-weight: 600; font-size: 0.92rem; border: 0; background: none; width: 100%; text-align: left; }
.panel__nav svg { width: 20px; height: 20px; }
.panel__nav[aria-current='page'] { background: rgba(255, 122, 26, 0.14); color: var(--texto); box-shadow: inset 3px 0 0 var(--naranja); }
.panel__nav .icono-btn__punto { position: static; margin-left: auto; }
.panel__cuerpo { padding: 24px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
.panel__titulo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel__titulo h1 { margin: 0; font-size: 1.6rem; letter-spacing: -0.03em; }
.panel__titulo p { margin: 2px 0 0; color: var(--texto-3); font-size: 0.9rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; border-radius: 20px; background: var(--capa); border: 1px solid var(--borde); }
.kpi__valor { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi__nombre { color: var(--texto-3); font-size: 0.82rem; }
.kpi--alerta { border-color: rgba(255, 92, 122, 0.55); background: rgba(255, 92, 122, 0.1); }
.rejilla-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.tabla-envoltura { overflow-x: auto; border-radius: 20px; border: 1px solid var(--borde); background: var(--capa); }
table.tabla { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tabla th { text-align: left; font-weight: 600; color: var(--texto-3); padding: 12px 14px; border-bottom: 1px solid var(--borde); white-space: nowrap; background: rgba(20, 10, 38, 0.5); }
.tabla td { padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.etiqueta { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; background: rgba(255, 255, 255, 0.08); white-space: nowrap; }
.etiqueta--verde { background: rgba(91, 231, 169, 0.16); color: var(--menta); }
.etiqueta--naranja { background: rgba(255, 122, 26, 0.18); color: var(--mandarina); }
.etiqueta--rojo { background: rgba(255, 92, 122, 0.18); color: var(--rojo); }
.etiqueta--celeste { background: rgba(127, 214, 255, 0.15); color: var(--celeste); }
.filtros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filtros .entrada { width: auto; flex: 1 1 220px; padding: 11px 14px; }
.grafico { width: 100%; height: 220px; }
.feed { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.feed div { padding: 10px 12px; border-radius: 12px; background: rgba(14, 6, 28, 0.5); font-size: 0.85rem; border-left: 3px solid var(--celeste); }
.feed div.alto { border-left-color: var(--rojo); }
.feed div.medio { border-left-color: var(--naranja); }
.feed time { display: block; color: var(--texto-3); font-size: 0.74rem; }
.freno { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 22px; border: 1px solid rgba(255, 92, 122, 0.4); background: rgba(255, 92, 122, 0.08); margin-bottom: 18px; }
.freno--activo { background: rgba(255, 59, 92, 0.25); animation: latido 1.6s infinite; }
.freno strong { display: block; }
.freno p { margin: 0; color: var(--texto-2); font-size: 0.88rem; }
.freno .btn { width: auto; margin-left: auto; }
.matriz td, .matriz th { text-align: center; }
.matriz td:first-child, .matriz th:first-child { text-align: left; }
.matriz input { width: 20px; height: 20px; accent-color: var(--naranja); }
.panel-movil { display: none; }
.canal { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--capa); border: 1px solid var(--borde); }
.canal h3 { margin: 0; font-size: 1rem; }
.canal p { margin: 0; color: var(--texto-3); font-size: 0.82rem; }
.canal__acciones { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.secreto { display: block; padding: 12px; border-radius: 12px; background: rgba(14, 6, 28, 0.7); border: 1px dashed var(--oro); color: var(--oro); word-break: break-all; font-weight: 600; margin: 10px 0; }

@media (max-width: 900px) {
  .panel { grid-template-columns: 1fr; }
  .panel__lado { display: none; }
  .panel-movil { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px; position: sticky; top: 0; z-index: 10; background: rgba(20, 10, 38, 0.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--borde); scrollbar-width: none; }
  .panel-movil a { flex: none; padding: 8px 14px; border-radius: 12px; color: var(--texto-2); text-decoration: none; font-weight: 600; font-size: 0.85rem; background: var(--capa); }
  .panel-movil a[aria-current='page'] { background: var(--degradado); color: #2a1200; }
  .rejilla-2 { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------- Bloqueo -- */
.candado { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.candado__caja { width: 100%; max-width: 380px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.freno > svg { width: 34px; height: 34px; flex: none; color: var(--rojo); }
.freno .btn { white-space: nowrap; }
.exito { padding-top: 64px; }

/* ====================== Tarifario central y área contable (22-oct-2026) ====================== */
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 18px; }
.area { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 20px; border: 1px solid var(--borde);
  background: var(--capa); color: var(--texto); cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; font: inherit; }
.area:hover { transform: translateY(-2px); border-color: var(--c, var(--naranja)); }
.area--activa { border-color: var(--c, var(--naranja)); box-shadow: 0 0 0 1px var(--c, var(--naranja)), 0 10px 30px -12px var(--c, var(--naranja)); }
.area__txt { display: grid; gap: 3px; min-width: 0; }
.area__txt small { color: var(--texto-3); font-size: .76rem; }
.area--nueva { border-style: dashed; color: var(--oro); }
.area--nueva svg { width: 34px; height: 34px; }
.area-cabecera { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-left: 4px solid var(--c, var(--naranja)); }
.celda-valor { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.entrada--chica { width: 96px; padding: 8px 10px; text-align: right; font-weight: 700; }
.entrada--error { border-color: var(--rojo) !important; box-shadow: 0 0 0 2px rgba(255, 92, 122, .3); }
.tabla--matriz td, .tabla--matriz th { text-align: center; }
.tabla--matriz td:first-child, .tabla--matriz th:first-child { text-align: left; }
.fila-ejemplo td { background: rgba(255, 122, 26, .08); text-align: left !important; color: var(--texto-2); }
.fila-ejemplo svg { width: 16px; height: 16px; vertical-align: -3px; }
.filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filtros .campo { margin: 0; min-width: 140px; flex: 1; }
.barra-area { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.barra-area small { color: var(--texto-3); }
.barra-prog { height: 8px; border-radius: 6px; background: rgba(255,255,255,.06); margin: 6px 0 4px; overflow: hidden; }
.barra-prog i { display: block; height: 100%; border-radius: 6px; animation: crecer .9s ease-out; }
@keyframes crecer { from { width: 0; } }
.fila-alerta td { background: rgba(255, 92, 122, .12); color: #ffb3c2; }
.solo-imprimir { display: none; }
.cpe-lista .mov__icono img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
@media print {
  body { background: #fff !important; color: #111 !important; }
  #fondo, .panel__lado, .panel-movil, .no-imprimir, .panel__titulo > div:last-child, #avisos, .barra-nav { display: none !important; }
  .solo-imprimir { display: block; }
  .panel, .panel__cuerpo { display: block !important; padding: 0 !important; margin: 0 !important; }
  .panel-vidrio, .kpi { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none !important; color: #111 !important; }
  .tabla th { background: #ff7a1a !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tabla td { color: #111 !important; }
  .kpi__valor, h1, h2, strong { color: #111 !important; }
  .fila-alerta td { background: #ffe1e7 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.tabla .interruptor, .campo .interruptor { display: inline-block; vertical-align: middle; }

/* (6 nov 2026) ARREGLO «la página vibra» (cuentas del banco: Yape, BCP…). Causas encontradas:
   1) las ondas del radar crecían por fuera de su caja y, cerca del borde, hacían aparecer y desaparecer la barra
      de desplazamiento: la página cambiaba de ancho una y otra vez (se veía temblar);
   2) la cuenta regresiva empezaba vacía y cada segundo cambiaba el ancho de su fila;
   3) en el celular, el alto «100vh» cambia cuando la barra del navegador se esconde o aparece.
   Arreglo: espacio fijo para la barra de desplazamiento, ondas recortadas dentro de su caja, ancho fijo para el reloj
   y alto «100dvh» (el alto real visible). */
html { scrollbar-gutter: stable; }
body { overflow-x: hidden; }
.esperando { overflow: hidden; }
.cuenta-regresiva { display: inline-block; min-width: 5ch; text-align: right; }
.tabla-envoltura { contain: layout paint; }
