/* sobre.cash — una sola hoja para landing, app y admin. Mobile-first, tema oscuro. */

:root {
  --bg: #080f13;           /* azul-negro profundo */
  --surface: #0e1a1f;      /* capa 1: secciones y paneles */
  --raised: #152429;       /* capa 2: hover, elevado */
  --line: #20343b;         /* filete 1px */
  --line-soft: #172930;
  --text: #eaf4f5;         /* blanco roto (17:1) */
  --text-2: #c3d3d6;
  --muted: #8ea4a9;        /* 6.1:1 aun sobre --raised */
  --aqua: #1ccad8;         /* azul aqua: relleno de acciones y luz */
  --aqua-hover: #3ad6e2;
  --on-aqua: #04181b;      /* texto sobre aqua (9:1) */
  --aqua-deep: #0a7f8c;    /* teal profundo: rellenos, lacre */
  --aqua-text: #5fe3ee;    /* aqua legible sobre fondo oscuro (10:1+) */
  --aqua-tint: rgba(28, 202, 216, .12);
  --heading: #6fe4ee;      /* títulos */
  --tide: #3d8bff;         /* azul compañero (5.8:1) */
  --tide-text: #6ea8ff;
  --ok: #5fd39a;
  --warn: #f2b35b;
  --bad: #ff7a72;          /* errores (7:1) */
  --card: linear-gradient(180deg, #13232a, #0e1b20);
  --hi: inset 0 1px 0 rgba(255, 255, 255, .05);   /* brillo interno de borde superior */
  --shadow: var(--hi), 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -20px rgba(0, 0, 0, .7);

  --display: 'Bricolage Grotesque', 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ui: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --gutter: 16px;
  --max: 72rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--display); font-weight: 650; font-stretch: 96%; line-height: 1.1; letter-spacing: -0.015em; margin: 0; color: var(--heading); }
p { margin: 0; }
a { color: var(--aqua-text); text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(28, 202, 216, .3);
  border-radius: 6px;
}

[tabindex="-1"]:focus { outline: none; box-shadow: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 20; background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: var(--r-sm); }
.skip:focus { top: var(--gutter); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Auroras: luz aqua pastel, difusa, sobre blanco ─────────────────────── */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  filter: blur(60px);
  will-change: transform;
  animation: drift 42s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { right: -18vmax; top: -34vmax; background: radial-gradient(closest-side, var(--aqua), transparent 72%); opacity: .32; }
.aurora span:nth-child(2) { left: -30vmax; top: -20vmax; width: 60vmax; height: 60vmax; background: radial-gradient(closest-side, var(--tide), transparent 70%); opacity: .22; animation-duration: 56s; animation-direction: alternate-reverse; }
.aurora span:nth-child(3) { left: 40%; top: 30%; width: 44vmax; height: 44vmax; background: radial-gradient(closest-side, var(--aqua-deep), transparent 70%); opacity: .3; animation-duration: 64s; }
.aurora--quiet span { opacity: .16; }
.aurora--quiet span:nth-child(3) { opacity: .12; }

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(5vmax, 4vmax, 0) scale(1.06); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(.96); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora span { animation: none; }
  *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; }
}

/* ── Marca ─────────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand img { width: auto; height: 24px; }
.site-head .brand, .foot-top .brand { font-size: .92rem; }

/* ── Botones ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.35rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); box-shadow: var(--hi);
  font: 600 1rem/1.1 var(--ui); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--raised); border-color: #2d4952; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--aqua); border-color: var(--aqua); color: var(--on-aqua); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 28px -10px rgba(28, 202, 216, .55); }
.btn-primary:hover:not(:disabled) { background: var(--aqua-hover); border-color: var(--aqua-hover); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, .04); border-color: #2d4952; }
.btn-sm { min-height: 38px; padding: .45rem .95rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--aqua-text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ── Formularios ─────────────────────────────────────────────────────── */
.field { display: grid; gap: .4rem; }
.field + .field { margin-top: 1rem; }
.field label, .label { font-size: .9rem; font-weight: 500; color: var(--muted); }
.hint { font-size: .875rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], textarea {
  width: 100%;
  min-height: 50px;
  padding: .8rem 1rem;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #060c10; color: var(--text);
  font: 500 1rem/1.4 var(--ui);
}
textarea { min-height: 7rem; resize: vertical; }
input:hover, textarea:hover { border-color: #2d4952; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--aqua); outline-offset: 0; box-shadow: 0 0 0 4px rgba(28, 202, 216, .18); border-radius: var(--r-sm); }
input[aria-invalid=true] { border-color: var(--bad); }
.input-big { font: 600 1.6rem/1.2 var(--ui) !important; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--heading); flex: none; }
input[type=file] { color: var(--muted); font: inherit; max-width: 100%; }
input[type=file]::file-selector-button { margin-right: .8rem; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 .9rem var(--ui); cursor: pointer; }

/* Selector de dos opciones con radios reales */
.seg { display: inline-grid; grid-auto-flow: column; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: .55rem 1.1rem; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input:checked + label { background: var(--aqua-tint); color: var(--aqua-text); box-shadow: inset 0 0 0 1px rgba(95, 227, 238, .35); }
.seg input:focus-visible + label { outline: 2px solid var(--aqua); outline-offset: 2px; }

/* ── Avisos (aria-live) ──────────────────────────────────────────────── */
.notice { padding: .85rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-size: .95rem; }
.notice:empty { display: none; }
.notice.is-error { border-color: rgba(255, 122, 114, .4); background: rgba(255, 122, 114, .08); color: #ffd4d0; }
.notice.is-ok { border-color: rgba(95, 211, 154, .35); background: rgba(95, 211, 154, .08); color: #cdf3df; }
.notice.is-warn { border-color: rgba(242, 179, 91, .4); background: rgba(242, 179, 91, .08); color: #fbe5c4; }

/* ═════════════════════════════ LANDING ═════════════════════════════════ */

.site-head { position: relative; z-index: 2; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.site-head nav { display: flex; align-items: center; gap: .35rem; }
.site-head nav a:not(.btn) { display: none; color: var(--text-2); text-decoration: none; padding: .5rem .7rem; font-weight: 500; font-size: .95rem; border-radius: 8px; }
.site-head nav a:not(.btn):hover { color: var(--text); background: var(--surface); }
.site-head .btn-primary { display: none; }

/* Hero: propuesta + CTAs + confianza | producto */
.hero { padding-block: 2.5rem 4rem; }
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 4.75rem);
  font-weight: 680;
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-stretch: 96%;
  text-wrap: balance;
  max-width: 13ch;
  color: var(--aqua-text);
  padding-bottom: .06em;
}
.hero-sub { margin-top: 1.4rem; max-width: 33rem; font-size: 1.15rem; line-height: 1.55; color: var(--text-2); }
.hero .btn-row { margin-top: 2rem; }
.hero .btn { min-height: 52px; padding-inline: 1.6rem; }
@media (max-width: 519px) { .hero .btn-row .btn { flex: 1 1 100%; } }

.trust { list-style: none; margin: 2.5rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; max-width: 36rem; }
.trust li { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; line-height: 1.4; color: var(--text-2); }
.trust svg { flex: none; width: 20px; height: 20px; margin-top: .05rem; color: var(--aqua-text); }
/* Landing: con el hero en dos columnas, 4 ítems en fila se parten en 3 líneas; 2×2 queda parejo. */
@media (min-width: 1000px) { .hero .trust { grid-template-columns: 1fr 1fr; max-width: 34rem; } }

/* Visual del producto. .hero-visual es el slot estable para capas de marca. */
.hero-visual { margin: 0; position: relative; display: grid; justify-items: center; gap: .9rem; }
.hero-visual::before { content: ''; position: absolute; inset: 8% 4% 14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(28, 202, 216, .35), rgba(61, 139, 255, .12) 60%, transparent); filter: blur(40px); z-index: -1; }
.hero-visual figcaption { font-size: .8rem; color: var(--muted); }

.phone {
  width: min(300px, 82vw);
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(160deg, #24363d, #111d22 40%, #0b1418);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 0 0 1px #000, 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 80px -20px rgba(28, 202, 216, .25);
}
.phone-toast {
  position: absolute; z-index: 2; top: 13%; left: 50%; margin-left: -190px;
  display: flex; gap: .7rem; align-items: center;
  padding: .7rem 1rem .7rem .75rem; border-radius: 16px;
  background: rgba(14, 26, 31, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(95, 227, 238, .25);
  box-shadow: var(--hi), 0 18px 40px -16px rgba(0, 0, 0, .8), 0 0 30px -10px rgba(28, 202, 216, .4);
  animation: toast-in 600ms cubic-bezier(.2, .8, .2, 1) 900ms both;
}
.phone-toast svg { flex: none; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--aqua); color: var(--on-aqua); }
.phone-toast strong { display: block; font-size: .88rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.phone-toast span { display: block; font-size: .75rem; color: var(--muted); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .phone-toast { animation: none; } }
@media (max-width: 519px) { .phone-toast { margin-left: -150px; top: 9%; } }
.phone-screen { position: relative; overflow: hidden; border-radius: 37px; background: linear-gradient(180deg, #0c171c, var(--bg) 60%); padding: 0 16px 20px; font-variant-numeric: tabular-nums; }
.phone-bar { display: flex; justify-content: space-between; align-items: center; height: 44px; padding-inline: 10px 6px; font-size: .78rem; font-weight: 600; color: var(--text); }
.phone-bar span { width: 3rem; }
.phone-bar span:last-child { text-align: right; }
.phone-bar i { width: 88px; height: 24px; border-radius: 999px; background: #000; }
.phone-top { display: flex; justify-content: space-between; align-items: center; padding: .4rem 2px .9rem; }
.phone-top span { font-size: .78rem; color: var(--muted); }
.phone-top strong { display: block; font-size: .92rem; font-weight: 600; color: var(--text); }
.phone-top em { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font: 600 .7rem var(--ui); font-style: normal; color: var(--heading); }

/* Saldo dentro de un sobre: solapa en V y lacre */
.env {
  position: relative; overflow: hidden;
  padding: 5.6rem 1.1rem 1rem;
  border-radius: 18px;
  background: linear-gradient(155deg, #11808c, #0d5f72 55%, #0b4f8a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 0 0 1px rgba(95, 227, 238, .25), 0 12px 30px -12px rgba(28, 202, 216, .45);
  color: #fff;
}
.env::before { content: ''; position: absolute; inset: 0 0 auto; height: 3.9rem; background: rgba(255, 255, 255, .09); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.env::after { content: ''; position: absolute; left: 50%; top: 3.9rem; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #5fe3ee, var(--aqua) 45%, var(--aqua-deep)); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 0 16px rgba(95, 227, 238, .6); }
.env > * { position: relative; }
.env span { font-size: .78rem; font-weight: 500; color: #d7f6f9; }
.env strong { display: block; margin-top: .1rem; font-size: 2rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.env small { display: block; margin-top: .3rem; font-size: .72rem; color: #d7f6f9; }
.phone-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .9rem; }
.phone-actions span { display: grid; justify-items: center; gap: .3rem; font-size: .7rem; font-weight: 500; color: var(--text-2); }
.phone-actions svg { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--aqua-tint); color: var(--heading); }
.phone-moves { margin-top: 1.1rem; }
.phone-moves > p { font-size: .8rem; font-weight: 600; color: var(--text); }
.phone-moves .rows > li { padding: .62rem 0; gap: .6rem; border-color: var(--line-soft); }
.phone-moves .title { font-size: .8rem; font-weight: 600; }
.phone-moves .sub { font-size: .7rem; }
.phone-moves .amt { font-size: .8rem; font-weight: 600; }

/* Secciones */
.sec { padding-block: 4.5rem; }
.sec-alt { background: radial-gradient(50rem 18rem at 15% 0, rgba(28, 202, 216, .07), transparent 70%), rgba(14, 26, 31, .62); border-block: 1px solid var(--line-soft); }
.sec-head { max-width: 40rem; }
.sec-head h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); text-wrap: balance; }
.sec-head p { margin-top: 1rem; color: var(--text-2); font-size: 1.08rem; max-width: 36rem; }

/* Cómo funciona: es una secuencia, va numerada */
.steps { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; gap: 2.25rem; counter-reset: step; }
.steps li { position: relative; padding-left: 3.75rem; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.15rem;
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--aqua-tint); border: 1px solid rgba(95, 227, 238, .3);
  font: 600 1rem var(--ui); color: var(--heading);
}
.steps h3 { font-size: 1.15rem; color: var(--text); }
.steps p { margin-top: .5rem; color: var(--muted); max-width: 30rem; }

/* Seguridad: lista con filetes, sin tarjetas */
.split { display: grid; gap: 2.5rem; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0 1rem; padding-block: 1.4rem; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts svg { grid-row: span 2; width: 2.5rem; height: 2.5rem; padding: .55rem; border-radius: 12px; background: var(--card); box-shadow: var(--hi); border: 1px solid var(--line); color: var(--aqua-text); }
.facts h3 { font-size: 1.1rem; color: var(--text); }
.facts p { margin-top: .35rem; color: var(--muted); max-width: 34rem; }

/* Qué podés hacer: tres usos, mismo filete que Seguridad */
.uses { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; gap: 0; }
.uses li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0 1rem; padding-block: 1.4rem; border-top: 1px solid var(--line); }
.uses li:last-child { border-bottom: 1px solid var(--line); }
.uses svg { grid-row: span 2; width: 2.5rem; height: 2.5rem; padding: .55rem; border-radius: 12px; background: var(--card); box-shadow: var(--hi); border: 1px solid var(--line); color: var(--aqua-text); }
.uses h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 1.15rem; color: var(--text); }
.uses h3 .pill { font-family: var(--ui); letter-spacing: 0; }
.uses p { margin-top: .35rem; color: var(--muted); max-width: 30rem; }

/* Comisiones y límites: tablas de verdad + calculadora */
.fees { display: grid; gap: 2.5rem; margin-top: 3rem; align-items: start; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table caption { text-align: left; padding-bottom: .75rem; font-weight: 600; color: var(--text); }
.table th, .table td { padding: .9rem 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.table tr:last-child th, .table tr:last-child td { border-bottom: 1px solid var(--line); }
.table thead th { border-top: 0; padding-top: 0; font-size: .85rem; font-weight: 500; color: var(--muted); }
.table tbody th { font-weight: 500; color: var(--text-2); padding-right: 1rem; }
.table td { font-weight: 600; color: var(--text); text-align: right; white-space: nowrap; }
.table td small { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); white-space: normal; }
.table thead th:not(:first-child) { text-align: right; }
.limits { margin-top: 3rem; max-width: 40rem; }
/* Landing: en escritorio la tabla de límites va bajo la de comisiones (misma columna); en el celular, después de la calculadora. */
@media (max-width: 999px) { .fees-tables { display: contents; } .fees .calc { order: 1; } .fees .limits { order: 2; margin-top: 0; } }

.calc {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}
.calc h3 { font-size: 1rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.calc-row { display: flex; gap: .6rem; align-items: center; margin-top: 1rem; }
.calc-row input { flex: 1; min-width: 0; }
/* Landing: prefijo de moneda dentro del input de la calculadora */
.calc-amount { position: relative; flex: 1; min-width: 0; display: flex; }
.calc-amount input { padding-left: 2.6rem; width: 100%; }
.calc-prefix { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); font: 600 1.25rem/1 var(--ui); color: var(--muted); pointer-events: none; }
.calc-out { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.calc-out .big { display: block; margin-top: .2rem; font-family: var(--ui); font-weight: 600; font-size: clamp(2rem, 8vw, 2.75rem); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--heading); }
.calc-out .hint { margin-top: .6rem; }

/* FAQ */
.faq { margin-top: 2.5rem; max-width: 46rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; font-weight: 600; font-size: 1.05rem; color: var(--text); cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font: 400 1.5rem/1 var(--ui); color: var(--aqua-text); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.3rem; color: var(--text-2); max-width: 40rem; }

.cta-final { padding-block: 4.5rem; border-top: 1px solid var(--line-soft); background: radial-gradient(40rem 16rem at 85% 100%, rgba(28, 202, 216, .12), transparent 70%), radial-gradient(30rem 14rem at 10% 0, rgba(61, 139, 255, .08), transparent 70%); }
.cta-final .wrap { display: grid; gap: 1.5rem; }
.cta-final h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.cta-final p { margin-top: .6rem; color: var(--text-2); max-width: 32rem; }

/* ── Pie institucional ───────────────────────────────────────────────── */
.site-foot { padding-block: 3.5rem 6rem; background: #060b0e; border-top: 1px solid var(--line); color: var(--text-2); font-size: .92rem; }
.foot-top { display: grid; gap: 1.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.foot-top p { margin-top: .75rem; max-width: 22rem; color: var(--muted); }
.foot-help { padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--hi); max-width: 26rem; }
.foot-help h2 { font-size: 1rem; color: var(--text); letter-spacing: -0.01em; }
.foot-help p { margin-top: .3rem; }
.foot-help a { font-weight: 600; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; padding-block: 2.5rem; }
.foot-cols h2 { font-size: .92rem; font-weight: 600; color: var(--text); letter-spacing: 0; }
.foot-cols ul { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .6rem; }
.foot-cols a { color: var(--text-2); text-decoration: none; }
.foot-cols a:hover { color: var(--aqua-text); text-decoration: underline; }
.foot-legal { padding-top: 2rem; border-top: 1px solid var(--line); max-width: 52rem; font-size: .84rem; line-height: 1.6; color: var(--muted); }
.foot-legal p + p { margin-top: .75rem; }
.foot-legal strong { color: var(--text); font-weight: 600; }
.foot-copy { margin-top: 1.5rem; font-size: .84rem; color: var(--muted); }

/* Variante compacta para app y admin */
.site-foot--compact { padding-block: 2rem 2.5rem; background: transparent; font-size: .84rem; }
.site-foot--compact nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.site-foot--compact nav a { color: var(--text-2); text-decoration: none; }
.site-foot--compact nav a:hover { color: var(--aqua-text); text-decoration: underline; }
.site-foot--compact .foot-legal { margin-top: 1.1rem; padding-top: 0; border-top: 0; }
.site-foot--compact .foot-copy { margin-top: .5rem; }

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .site-head nav a:not(.btn) { display: inline-block; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .steps li { padding-left: 0; padding-top: 4rem; }
  .steps li::after { content: ''; position: absolute; top: 1.25rem; left: 3.25rem; right: -1.25rem; height: 1px; background: var(--line); }
  .steps li:last-child::after { display: none; }
  .trust { grid-template-columns: repeat(4, 1fr); max-width: none; }
  .uses { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .uses li, .uses li:last-child { grid-template-columns: 1fr; gap: 1rem 0; border-bottom: 0; padding-top: 1.6rem; }
  .uses svg { grid-row: auto; }
  .foot-top { grid-template-columns: 1fr auto; align-items: start; }
  .foot-cols { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1000px) {
  .site-head .btn-primary { display: inline-flex; }
  .hero { padding-block: 4rem 6rem; }
  .hero .wrap { grid-template-columns: 1.25fr 1fr; gap: 3rem; }
  .split { grid-template-columns: 1fr 1.25fr; gap: 5rem; }
  .fees { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
  .sec { padding-block: 6.5rem; }
  .cta-final .wrap { grid-template-columns: 1fr auto; align-items: end; }
}

/* ══════════════════════════════ APP ════════════════════════════════════ */

.app-head { position: sticky; top: 0; z-index: 5; background: rgba(8, 15, 19, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.app-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 60px; }
.who { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); min-width: 0; }
.who strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app-main { padding-block: 1.75rem 3rem; }
.app-main:focus { outline: none; }
.view { max-width: 40rem; margin-inline: auto; }
.view-wide { max-width: 52rem; }
.view > h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.lead, .view > .lead { margin-top: .6rem; color: var(--muted); }
.stack > * + * { margin-top: 1.25rem; }
.mt { margin-top: 1.5rem; }

.panel { padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); }
.panel h2 { font-size: 1.05rem; font-family: var(--ui); font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

/* Navegación y saldo: ver «APP: rediseño» al final del archivo. */

/* Listas (movimientos, retiros, tickets) */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem 0; border-top: 1px solid var(--line-soft); }
.rows > li:first-child { border-top: 0; }
.rows .main { min-width: 0; }
.rows .title { font-weight: 600; overflow-wrap: anywhere; }
.rows .sub { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.rows .amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.rows .amt.pos { color: var(--ok); }
.rows a.row-link { display: flex; justify-content: space-between; gap: 1rem; width: 100%; color: inherit; text-decoration: none; }
.rows a.row-link:hover .title { text-decoration: underline; }
.empty { padding: 1.2rem 0; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .4rem; }

.pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--raised); color: var(--text-2); white-space: nowrap; }
.pill.ok { background: rgba(95, 211, 154, .14); color: var(--ok); }
.pill.warn { background: rgba(242, 179, 91, .14); color: var(--warn); }
.pill.bad { background: rgba(255, 122, 114, .14); color: var(--bad); }

/* Auth */
.auth { max-width: 26rem; margin-inline: auto; padding-top: 1rem; }
.auth h1 { font-size: clamp(1.8rem, 7vw, 2.3rem); }
.auth .lead { margin-top: .6rem; color: var(--muted); }
.auth form { margin-top: 1.8rem; }
.auth .alt { margin-top: 1.5rem; color: var(--muted); font-size: .95rem; display: grid; gap: .5rem; }

/* Clave de invitado */
.keybox { padding: 1rem; border: 1px dashed rgba(95, 227, 238, .45); border-radius: var(--r-sm); background: var(--aqua-tint); color: var(--text); font: 500 .92rem/1.55 var(--mono); word-break: break-all; user-select: all; }

/* Depósito */
.quote { display: grid; gap: .45rem; }
.quote div { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.quote dt { color: var(--muted); }
.quote dd { margin: 0; font-weight: 600; }
.quote .net { padding-top: .6rem; border-top: 1px solid var(--line); font-size: 1.1rem; }
.quote .net dd { color: var(--heading); }
.pay-amount { font-family: var(--ui); font-weight: 600; font-size: clamp(2.2rem, 10vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--heading); }
.countdown { font: 600 2rem/1 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.countdown.low { color: var(--warn); }
.meter { height: 4px; border-radius: 4px; background: var(--raised); overflow: hidden; margin-top: .7rem; }
.meter i { display: block; height: 100%; width: 100%; background: var(--aqua); transform-origin: left; transition: transform 1s linear; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--aqua-text); border-radius: 50%; animation: spin .9s linear infinite; vertical-align: -3px; margin-right: .5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.final { text-align: center; padding: 2rem 1rem; }
.final .mark { width: 64px; height: 64px; margin: 0 auto 1.2rem; border-radius: 50%; display: grid; place-items: center; font: 700 1.8rem var(--display); }
.final .mark.ok { background: rgba(95, 211, 154, .14); color: var(--ok); }
.final .mark.warn { background: rgba(242, 179, 91, .14); color: var(--warn); }
.final .mark.bad { background: rgba(255, 122, 114, .14); color: var(--bad); }
.final h2 { font-size: 1.5rem; color: var(--heading); }
.final p { margin-top: .7rem; color: var(--muted); }
.final .btn-row { justify-content: center; margin-top: 1.6rem; }

/* 2FA */
.qr { display: inline-block; padding: 12px; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 30px -12px rgba(0, 0, 0, .8); border-radius: var(--r-sm); }
.qr img, .qr canvas { width: 180px; height: 180px; }
.secret { font: 600 1rem var(--mono); letter-spacing: .06em; word-break: break-all; }

/* Tickets */
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.msg { padding: .9rem 1.05rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); max-width: 92%; }
.msg.staff { justify-self: end; background: var(--aqua-tint); border-color: rgba(95, 227, 238, .3); }
.msg .meta { font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ══════════════════════════════ ADMIN ══════════════════════════════════ */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.stat { padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat .label { display: block; }
.stat .val { display: block; margin-top: .3rem; font: 600 1.6rem/1.15 var(--ui); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; }
.tabs a { padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.tabs a:hover { background: var(--raised); }
.tabs a[aria-current=page] { background: var(--aqua-tint); border-color: rgba(95, 227, 238, .45); color: var(--aqua-text); }
.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.card-list > li { padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: .7rem 0 0; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.decide { display: grid; gap: .6rem; margin-top: 1rem; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } }

/* ══════════════════════════ APP: rediseño ══════════════════════════════
   Shell, inicio, flujos de cobro y retiro, soporte y cuenta. Sólo clases de la app
   (el admin comparte .panel/.rows/.pill/.kv/.thread, que quedan como estaban). */

:root {
  --viz-in: #0fa3b1;   /* entró — validado contra --surface con dataviz (CVD ΔE 8.6) */
  --viz-out: #9085e9;  /* salió */
  --nav-h: 4.25rem;
}

/* ── Header (también el del admin) ── */
.acc-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--aqua-tint); color: var(--aqua-text); box-shadow: inset 0 0 0 1px rgba(95, 227, 238, .3); flex: none; }
@media (max-width: 519px) {
  .app-head a.sb-logo.sb-logo--head { font-size: 15px; }
  .app-head .wrap { gap: .5rem; }
  .app-head .btn-sm { padding-inline: .75rem; }
}
@media (max-width: 379px) { .app-head a.sb-logo.sb-logo--head { font-size: 13.5px; } .app-head .btn-sm { padding-inline: .6rem; } }

/* ── Navegación: riel "Libro" en escritorio, dock "Solapa" en el celular ──
   El estado vive en <html>: .is-logged, .is-folded, .is-guest, .is-admin, .is-handle.
   Dónde estás lo marca la gota (riel) o la solapa (dock). */
:root { --head-h: 60px; --rail: 272px; --rail-c: 84px; --nv-out: cubic-bezier(.2, .8, .2, 1); --nv-fold: cubic-bezier(.65, 0, .35, 1); }
html.is-logged { --head-h: 64px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.rail, .dock, .mtop { display: none; }
:is(.rail, .dock, .more, .acct-menu, .mtop) .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
html:not(.is-admin) .nav-admin, html:not(.is-guest) .nav-guest, html:not(.is-guest) .nav-nudge { display: none; }
/* Funciones apagadas (FEATURES en app.js): data-feat se muestra sólo encendida; data-feat-off, sólo apagada. */
html.no-pots [data-feat=pots], html.no-transfers [data-feat=transfers], html:not(.no-pots) [data-feat-off=pots] { display: none !important; }

/* Piezas compartidas: avatar, nombre, contador, aviso de la llave */
.nav-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--raised); color: var(--text); font: 600 .82rem/1 var(--ui); box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.nav-av .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; color: var(--aqua-text); }
.who-t { display: grid; min-width: 0; line-height: 1.25; text-align: left; }
.who-n { font-weight: 600; font-size: .92rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-h { font: 500 .72rem/1.3 var(--mono); color: var(--muted); letter-spacing: .02em; }
html:not(.is-handle) .who-h, .who-h:empty { display: none; }
.nav-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--aqua-tint); color: var(--aqua-text); font: 600 .75rem/22px var(--ui); text-align: center; }
.nav-nudge { margin: 10px 0 2px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line); font-size: .84rem; color: var(--text-2); line-height: 1.4; }
.nav-nudge a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }

/* ── Celular con sesión: la cabecera dice quién sos y cuánto hay ── */
html.is-logged .app-head .wrap { min-height: var(--head-h); }
html.is-logged .app-head .wrap > .brand { display: none; }
html.is-logged .mtop { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; }
.mtop-mark { display: inline-flex; align-items: center; min-height: 44px; font-size: 13.5px; }
.mtop-biz { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: .88rem; color: var(--text-2); }
.mtop-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtop-bal { display: grid; margin-left: auto; min-height: 44px; align-content: center; line-height: 1.15; color: inherit; text-decoration: none; white-space: nowrap; }
.mtop-k { font-size: .7rem; color: var(--muted); }
.mtop-v { font: 650 1.22rem/1.1 var(--display); font-stretch: 92%; letter-spacing: -0.02em; color: var(--heading); }
.mtop-v small { font-size: .66em; margin-right: 3px; }
.mtop-av { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.mtop-av .nav-av { width: 38px; height: 38px; }

/* ── Escritorio: el riel ── */
.rail { position: sticky; top: 0; z-index: 4; height: 100vh; height: 100dvh; flex-direction: column; padding: 20px 14px 14px; border-right: 1px solid var(--line-soft); background: var(--bg); overflow: hidden auto; }
.rail .ico { width: 18px; height: 18px; stroke-width: 1.5; }
/* La gota marca dónde estás: pegada al borde del ítem activo, en el canal del riel. */
.rail-drop { position: absolute; left: 2px; top: 0; z-index: 1; width: 10px; height: 10px; pointer-events: none; opacity: 0; transform-origin: 50% 70%; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)) drop-shadow(0 0 6px rgba(28, 202, 216, .4)); }
.rail-drop.is-on { opacity: 1; }
.rail-drop svg { display: block; width: 10px; height: 10px; }
.rail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding-left: 4px; }
.rail-brand { display: inline-flex; align-items: center; min-height: 44px; padding-right: 6px; font-size: 15px; color: var(--text); }
.rail-fold { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; transition: color .2s, background-color .2s; }
.rail-fold:hover { color: var(--text); background: var(--surface); }

/* El sobre: el saldo arriba de todo. Lo que está a liberar y en chanchitos, sólo si hay. */
.rail-env { display: grid; gap: 3px; margin: 16px 0 10px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); box-shadow: var(--hi); color: inherit; text-decoration: none; transition: border-color .2s; }
.rail-env:hover { border-color: var(--line); }
.rail-env:focus-visible { outline-offset: 2px; }
.rail-env-k { font-size: .78rem; color: var(--muted); }
.rail-env-v { margin-bottom: 2px; font: 650 1.7rem/1.1 var(--display); font-stretch: 92%; letter-spacing: -0.03em; color: var(--heading); white-space: nowrap; }
.rail-env-v small { font-size: .62em; letter-spacing: -0.01em; margin-right: 2px; }
.rail-env-s { font-size: .78rem; color: var(--text-2); }
.rail-env-c { display: none; }

/* Cobrar: la acción principal es un botón, no un ítem de la lista. */
.rail-cta { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; margin-bottom: 16px; border-radius: 11px; background: var(--aqua); color: var(--on-aqua); font-weight: 600; font-size: .95rem; text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 24px -12px rgba(28, 202, 216, .6); transition: background-color .2s; }
.rail-cta:hover { background: var(--aqua-hover); }
.rail-cta[aria-current=page] { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 2px var(--bg), 0 0 0 3px rgba(95, 227, 238, .55); }
.rail-cta:focus-visible { outline: 2px solid var(--aqua-text); outline-offset: 2px; }
.rail-cta .ico { stroke-width: 1.8; }
.rail-cta .rail-kbd { position: absolute; right: 10px; border-color: rgba(4, 24, 27, .25); color: var(--on-aqua); }

.rail-list { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.rail-list + .rail-list { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.rail-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px 0 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: .93rem; font-weight: 500; transition: color .2s, background-color .2s; }
.rail-item .ico { color: var(--muted); transition: color .2s; }
.rail-item .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-item:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.rail-item:hover .ico { color: var(--text-2); }
.rail-item[aria-current=page] { color: var(--heading); background: rgba(95, 227, 238, .07); }
.rail-item[aria-current=page] .ico { color: var(--aqua-text); }
.rail-item:focus-visible { outline: 2px solid var(--aqua); outline-offset: -2px; }
.rail-kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; font: 500 .7rem/1 var(--mono); color: var(--muted); opacity: 0; transition: opacity .2s; }
:is(.rail-item, .rail-cta):is(:hover, :focus-visible) .rail-kbd { opacity: 1; }
.rail-spacer { flex: 1; min-height: 16px; }
.rail-foot { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.rail-foot .rail-who { margin-top: 8px; }
.rail-who { display: grid; grid-template-columns: 36px minmax(0, 1fr) 20px; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 6px; padding: 8px 8px 8px 6px; border: 1px solid transparent; border-radius: 12px; background: none; color: inherit; font: inherit; cursor: pointer; transition: background-color .24s, border-color .24s; }
.rail-who:hover { background: var(--surface); border-color: var(--line-soft); }
html:has(#acct-menu:popover-open) .rail-who { background: var(--surface); border-color: var(--line-soft); }
.rail-who .who-chev { width: 16px; height: 16px; color: var(--muted); }

/* Menú de la cuenta (popover: Esc y tocar afuera lo cierran solos) */
.acct-menu { position: fixed; inset: auto auto 84px 12px; width: 248px; max-height: calc(100dvh - 100px); overflow: auto; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: #0f1d22; color: var(--text); box-shadow: var(--hi), 0 24px 60px -20px rgba(0, 0, 0, .9); }
.acct-menu:popover-open { animation: nav-pop .24s var(--nv-out); }
html.is-folded .acct-menu { left: calc(var(--rail-c) + 8px); bottom: 12px; }
.acct-row { display: none; }
.acct-mh { padding: 8px 10px 6px; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-nudge { display: none; }
.acct-mi { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: inherit; font-size: .93rem; text-align: left; text-decoration: none; cursor: pointer; }
.acct-mi:hover, .acct-mi:focus-visible { background: var(--raised); color: var(--text); }
.acct-mi:focus-visible { outline-offset: -2px; }
.acct-ext { margin-left: auto; color: var(--muted); }
.acct-menu hr { height: 1px; margin: 6px 4px; border: 0; background: var(--line-soft); }
@keyframes nav-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

@media (min-width: 900px) {
  html.is-logged .app-head { display: none; }
  html.is-logged { --head-h: 0px; }
  html.is-logged .app-shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); transition: grid-template-columns .38s var(--nv-fold); }
  html.is-logged .rail { display: flex; }
  html.is-logged .app-shell ~ .site-foot { margin-left: var(--rail); }
  html.is-logged.is-folded .app-shell { grid-template-columns: var(--rail-c) minmax(0, 1fr); }
  html.is-logged.is-folded .app-shell ~ .site-foot { margin-left: var(--rail-c); }

  /* Achicado: íconos con su nombre al costado */
  html.is-folded .rail { padding-inline: 10px; overflow: visible; }
  html.is-folded :is(.rail .sb-wordmark, .rail-env-k, .rail-env-v, .rail-env-s, .rail-kbd, .rail-who .who-t, .rail-who .who-chev, .rail-nudge) { display: none; }
  html.is-folded .rail-top { flex-direction: column; }
  html.is-folded .rail-brand { padding-right: 0; }
  html.is-folded .rail-env { margin-top: 10px; padding: 10px 4px; text-align: center; }
  html.is-folded .rail-env-c { display: block; font: 600 .78rem/1.2 var(--ui); color: var(--heading); }
  html.is-folded .rail-env-c small { display: block; font-size: .68rem; font-weight: 500; color: var(--muted); }
  html.is-folded .rail-top { padding-left: 0; }
  html.is-folded .rail-cta { width: 44px; min-height: 44px; margin-inline: auto; }
  html.is-folded .rail-item { justify-content: center; min-height: 44px; padding: 0; }
  html.is-folded .rail-item:hover .ico { color: var(--text); }
  html.is-folded :is(.rail-item, .rail-cta) .lbl { position: absolute; left: calc(100% + 10px); top: 50%; z-index: 6; flex: none; overflow: visible; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: var(--text); font-size: .82rem; font-weight: 500; transform: translateY(-50%); opacity: 0; pointer-events: none; transition: opacity .12s; }
  html.is-folded :is(.rail-item, .rail-cta):is(:hover, :focus-visible) .lbl { opacity: 1; }
  html.is-folded .rail-item .nav-count { position: absolute; top: 9px; right: 17px; min-width: 0; width: 8px; height: 8px; padding: 0; background: var(--aqua); font-size: 0; }
  html.is-folded .rail-who { grid-template-columns: 1fr; justify-items: center; padding: 6px 0; }
  html.is-folded .rail-drop { left: 0; }
}
/* Pantallas bajas (laptop de 768 px): el riel se aprieta antes de tener que scrollear. */
@media (min-width: 900px) and (max-height: 820px) { .rail-env { margin-top: 10px; } .rail-cta { margin-bottom: 10px; } .rail-spacer { min-height: 8px; } }

/* ── Celular: el dock es un sobre cerrado y Cobrar es la gota de cera que lo cierra ── */
/* El riel y el dock quedan fuera del fundido de la vista: así se ve viajar la gota y plegarse la solapa. */
.rail { view-transition-name: nav-rail; }
.dock { view-transition-name: nav-dock; }
::view-transition-old(nav-rail), ::view-transition-old(nav-dock) { display: none; }
::view-transition-new(nav-rail), ::view-transition-new(nav-dock) { animation: none; }
.dock { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; grid-template-columns: 1fr 1fr 96px 1fr 1fr; align-items: end; height: calc(80px + env(safe-area-inset-bottom)); padding: 0 4px calc(6px + env(safe-area-inset-bottom)); filter: drop-shadow(0 -10px 24px rgba(0, 0, 0, .6)); }
.dock::before, .dock::after { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 0; pointer-events: none; }
.dock::before { bottom: 0; background: rgba(13, 28, 34, .96); clip-path: polygon(0 0, 50% 12px, 100% 0, 100% 100%, 0 100%); }
.dock::after { height: 14px; background: rgba(98, 219, 230, .32); clip-path: polygon(0 0, 50% 12px, 100% 0, 100% 1px, 50% 13px, 0 1px); }
.dock-i { position: relative; display: grid; justify-items: center; align-content: end; gap: 4px; min-width: 0; min-height: 60px; padding: 0 0 4px; border: 0; border-radius: 14px; background: none; color: var(--muted); font: 600 .76rem/1 var(--ui); white-space: nowrap; text-decoration: none; cursor: pointer; transition: color .24s; -webkit-tap-highlight-color: transparent; }
.dock-i .ico { width: 22px; height: 22px; transition: transform .24s var(--nv-out); }
.dock-i[aria-current=page] { color: var(--text); }
.dock-i[aria-current=page] .ico { color: var(--aqua-text); }
.dock-i:focus-visible { outline: 2px solid var(--aqua); outline-offset: -2px; }
@media (hover: hover) { .dock-i:hover { color: var(--text); } .dock-i:hover .ico { transform: translateY(-2px); } }
.nav-dot { position: absolute; top: 12px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 2px #0d1c22; }
/* la marca de "estás acá": una solapa chiquita que se pliega y se abre */
.dock-flap { position: absolute; left: 0; top: 2px; width: 22px; height: 10px; opacity: 0; pointer-events: none; transform-origin: 50% 0; }
.dock-flap.is-on { opacity: 1; }
.dock-flap path { fill: none; stroke: var(--aqua); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock-cobrar { position: relative; align-self: start; justify-self: center; display: grid; justify-items: center; gap: 10px; margin-top: -24px; color: var(--aqua-text); font: 650 .8rem/1 var(--ui); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.dock-wax { position: relative; display: grid; place-items: center; width: 68px; height: 68px; transition: transform .12s var(--nv-out); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)) drop-shadow(0 0 16px rgba(28, 202, 216, .35)); }
.dock-wax > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; }
.dock .dock-glyph { position: relative; width: 26px; height: 26px; stroke-width: 2.2; color: #073640; }
@media (hover: hover) { .dock-cobrar:hover .dock-wax { transform: translateY(-2px) rotate(-4deg); } }
.dock-cobrar:active .dock-wax { transform: scale(1.08, .9); }
.dock-cobrar:focus-visible { outline: none; }
.dock-cobrar:focus-visible .dock-wax { outline: 2px solid var(--aqua); outline-offset: 4px; border-radius: 50%; }
.dock-cobrar[aria-current=page] .dock-wax { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)) drop-shadow(0 0 22px rgba(28, 202, 216, .6)); }

/* Más: <dialog> que sube desde abajo */
.more { width: 100vw; max-width: 100vw; max-height: 86dvh; margin: auto 0 0; padding: 0; overflow: auto; border: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; background: #0d191e; color: var(--text); font-family: var(--ui); box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .8); }
.more::backdrop { background: rgba(2, 6, 8, .6); }
.more:focus { outline: none; }
.more[open] { animation: nav-up .38s var(--nv-out); }
.more-in { padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); }
.more-grab { width: 40px; height: 4px; margin: 2px auto 12px; border-radius: 4px; background: var(--line); }
.more-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-tile { position: relative; display: grid; align-content: space-between; gap: 18px; min-height: 92px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; transition: background-color .24s, border-color .24s; }
.more-tile:hover { background: var(--raised); border-color: var(--line); }
.more-tile .ico { width: 22px; height: 22px; color: var(--aqua-text); }
.more-tile small { display: block; margin-top: 2px; font-size: .8rem; font-weight: 400; color: var(--muted); }
.more-tile .nav-count { position: absolute; top: 12px; right: 12px; }
.more-tile:last-child:nth-child(odd) { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; min-height: 64px; }
.more-tile[aria-current=page] { border-color: var(--aqua-deep); box-shadow: inset 0 0 0 1px var(--aqua-deep); }
.more-acct { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 60px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 16px; color: inherit; text-decoration: none; }
.more-acct:hover { background: var(--surface); }
.more-acct .nav-av { width: 38px; height: 38px; }
.more-go { font-size: .88rem; font-weight: 600; color: var(--aqua-text); }
.more-links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.more-links :is(a, button) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer; }
.more-links :is(a, button):hover { background: var(--surface); color: var(--text); }
@keyframes nav-up { from { transform: translateY(40px); opacity: 0; } }

@media (max-width: 899px) {
  html.is-logged { --nav-h: 104px; } /* dock + lo que sobresale la gota: el composer de Soporte queda arriba */
  html.is-logged .dock { display: grid; }
  html.is-logged .app-shell ~ .site-foot { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .acct-menu { inset: calc(var(--head-h) + 6px) 12px auto; width: auto; max-height: calc(100dvh - var(--head-h) - 130px); padding: 10px; border-radius: 18px; }
  .acct-menu:popover-open { animation-name: nav-drop; }
  .acct-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 6px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 16px; }
  .acct-row .nav-av { width: 38px; height: 38px; }
  html.is-guest .acct-nudge { display: block; margin: 0 0 6px; }
}
@media (max-width: 379px) { .dock-i { font-size: .7rem; letter-spacing: -0.01em; } .mtop-v { font-size: 1.1rem; } }
@keyframes nav-drop { from { opacity: 0; transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  :is(.rail, .dock, .more, .acct-menu, .app-shell), :is(.rail, .dock, .more, .acct-menu) * { animation: none !important; transition: none !important; }
}
html.reduce-motion :is(.rail, .dock, .more, .acct-menu, .app-shell), html.reduce-motion :is(.rail, .dock, .more, .acct-menu) * { animation: none !important; transition: none !important; }

/* ── Vistas y piezas comunes ── */
.view-dash, .view-xl { max-width: 64rem; }
.view-flow { max-width: 34rem; }
.view-chat { max-width: 46rem; }
.mt-s { margin-top: .6rem; }
.center { text-align: center; }
.center-row { justify-content: center; }
.btn-lg { min-height: 54px; font-size: 1.05rem; }
.btn-row--flow { display: grid; grid-template-columns: 1fr 1.6fr; gap: .75rem; }
.btn-row--flow > :only-child { grid-column: 1 / -1; }
.btn.is-busy { cursor: progress; }
.btn.is-busy::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.ico { width: 20px; height: 20px; flex: none; }
.mono, code.mono { font: 500 .95rem/1.4 var(--mono); overflow-wrap: anywhere; }
[data-view] select {
  width: 100%; min-height: 50px; padding: .8rem 2.4rem .8rem 1rem; appearance: none;
  border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text); font: 500 1rem/1.4 var(--ui);
  background: #060c10 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ea4a9' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right .8rem center / 18px;
}
[data-view] select:focus-visible { outline: 2px solid var(--aqua); outline-offset: 0; box-shadow: 0 0 0 4px rgba(28, 202, 216, .18); border-radius: var(--r-sm); }
.input-code { font: 600 1.4rem/1.2 var(--mono) !important; letter-spacing: .32em; text-align: center; max-width: 15rem; }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; background: var(--aqua); color: var(--on-aqua); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.booting { display: grid; place-items: center; min-height: 50vh; }
.booting:empty { display: none; }
.booting .sb-loader { font-size: 1.05rem; }

.empty-state { display: grid; justify-items: center; gap: .45rem; padding: 1.6rem .5rem; text-align: center; }
.empty-state .btn { margin-top: .5rem; }
.empty-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--aqua-tint); color: var(--aqua-text); margin-bottom: .2rem; }
.empty-ico .ico { width: 24px; height: 24px; }
.empty-title { font-weight: 600; }
.rows > li.rows-empty { display: block; border: 0; padding: 0; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font: 600 .9rem/1 var(--ui); font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.chip:hover { background: var(--raised); color: var(--text); }
.chip[aria-pressed=true] { background: var(--aqua-tint); border-color: rgba(95, 227, 238, .55); color: var(--aqua-text); }
.chip .ico { width: 15px; height: 15px; color: var(--muted); }
.chip--recent { border-style: dashed; }
.chip-sub { color: var(--muted); font-weight: 500; }
.chip--alias { padding: 0; gap: 0; cursor: default; }
.chip--alias button { background: none; border: 0; color: inherit; font: 500 .88rem/1 var(--mono); cursor: pointer; min-height: 38px; }
.chip--alias .chip-main { padding: 0 .4rem 0 .9rem; border-radius: 999px 0 0 999px; }
.chip--alias .chip-x { display: grid; place-items: center; width: 34px; border-radius: 0 999px 999px 0; color: var(--muted); }
.chip--alias .chip-x .ico { width: 14px; height: 14px; }
.chip--alias .chip-x:hover { color: var(--bad); }

/* Pasos: una barra fina partida en tramos y abajo «Paso n de N · Nombre» (lo escribe markSteps). Los nombres de
   la lista quedan sólo para lectores de pantalla. */
.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; list-style: none; margin: 0; padding: 0; }
.stepper li { height: 3px; border-radius: 3px; background: var(--line); transition: background-color .3s; }
.stepper li.is-done { background: var(--aqua-deep); }
.stepper li[aria-current=step] { background: var(--aqua); }
.stepper li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stepper-label { margin-top: .6rem; font-size: .85rem; color: var(--muted); }
.stepper-label span { color: var(--text); font-weight: 600; }
.flow-head { margin-bottom: 1.4rem; }
.flow-head > .stepper { margin-top: 1rem; }
.flow-step > * + *, .flow-aside > * + * { margin-top: 1rem; }
/* Compu: el paso del monto va en dos columnas (monto | resumen y botón) para que entre sin scrollear.
   Los pasos de una sola columna quedan centrados con el ancho de lectura de siempre. */
@media (min-width: 1000px) {
  .view-flow { max-width: 60rem; }
  .view-flow .flow-step:not(.flow-split) { max-width: 36rem; margin-inline: auto; }
  .flow-split:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
  .flow-split > .flow-aside { margin-top: 0; }
  .flow-split > .amount-card { align-content: center; }
}
.history { margin-top: 2rem; }
.history summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.history summary::-webkit-details-marker { display: none; }
.history summary::after, .faq-item summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; flex: none; }
.history[open] summary::after, .faq-item[open] summary::after { transform: rotate(225deg) translateY(-1px); }

/* ── Monto grande ── */
.amount-card { display: grid; justify-items: center; gap: .9rem; padding: 1.5rem 1.1rem 1.3rem; text-align: center; }
.amount-label { font-size: .95rem; color: var(--text-2); font-weight: 500; }
.amount-input { display: flex; align-items: baseline; justify-content: center; gap: .35rem; max-width: 100%; padding-bottom: .4rem; border-bottom: 1.5px solid var(--line); transition: border-color .2s; }
.amount-input:focus-within { border-color: var(--aqua); }
.amount-prefix { font: 600 clamp(1.4rem, 6vw, 2rem)/1 var(--ui); color: var(--muted); letter-spacing: -0.02em; white-space: nowrap; }
.amount-input input[type=text] {
  field-sizing: content; min-width: 1ch; max-width: 11ch; min-height: 0; padding: 0; border: 0; background: transparent;
  font: 600 clamp(2.6rem, 12vw, 3.8rem)/1.05 var(--ui); letter-spacing: -0.04em; color: var(--text); text-align: left; caret-color: var(--aqua);
}
.amount-input input::placeholder { color: #36505a; }
@supports not (field-sizing: content) { .amount-input input[type=text] { width: 6.5ch; } }
.amount-input input:focus-visible { outline: none; box-shadow: none; }
.amount-input input[aria-invalid=true] { color: var(--bad); }
.amount-card .chips { justify-content: center; }
/* Teclado sin foco (amountKeys en api.js): un cursor que late detrás de la cifra avisa que se puede tipear igual. */
[data-keypad] { position: relative; }
[data-keypad]:not(:focus-within)::after { content: ''; align-self: center; width: 2px; height: clamp(2rem, 9vw, 2.9rem); margin-left: -.2rem; border-radius: 1px; background: var(--aqua); opacity: .55; animation: caret 1.1s steps(1) infinite; }
[data-keypad].is-typed:not(:focus-within)::after { animation: none; opacity: .9; }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { [data-keypad]:not(:focus-within)::after { animation: none; opacity: .4; } }
.lim-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .25rem .7rem; font-size: .9rem; color: var(--text-2); }
.lim-line .lim-local { color: var(--muted); }
.lim-pend { display: inline-flex; align-items: baseline; gap: .35rem; color: var(--muted); }
.rate-line { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 0; font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.rate-line[hidden] { display: none; }
.rate-line.is-off { color: var(--warn); }
.rate-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(95, 211, 154, .16); }
.avail { font-size: .92rem; color: var(--muted); }
.avail strong { color: var(--text); margin-left: .25rem; }

/* Reset del <dl> sin especificidad: así .flow-step > * + * le pone el espacio cuando va debajo de otra card. */
:where(.summary) { margin: 0; }
.summary { display: grid; gap: .55rem; transition: opacity .2s; }
.summary > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-variant-numeric: tabular-nums; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.summary .net { padding-top: .7rem; margin-top: .15rem; border-top: 1px solid var(--line); font-size: 1.1rem; }
.summary .net dd { color: var(--heading); font-size: 1.25rem; }
.summary.is-loading { opacity: .55; }
.summary--flat { padding: 0; }
.summary--mini { font-size: .9rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.summary--mini .net { border: 0; padding: 0; margin: 0; font-size: inherit; }
.summary--mini .net dd { font-size: 1rem; }

.review { display: grid; gap: .5rem; }
.review .summary { margin-top: .8rem; }
.review-amount { font: 600 clamp(2.2rem, 9vw, 3rem)/1.05 var(--ui); letter-spacing: -0.035em; color: var(--text); }

/* ── Pantalla de pago ── */
.pay-card { display: grid; gap: .9rem; }
.pay-stage { max-width: 210px; width: 100%; margin: -.4rem auto 0; }
.pay-stage:empty { display: none; }
.pay-status { display: flex; justify-content: center; min-height: 1.6rem; }
.pay-card .pay-amount { text-align: center; font-family: var(--ui); font-weight: 600; font-size: clamp(2.4rem, 11vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.05; color: var(--heading); }
.pay-dest { display: grid; gap: .45rem; padding-top: .3rem; }
.copyline { display: flex; gap: .5rem; align-items: center; }
.copyline code { flex: 1; min-width: 0; padding: .8rem 1rem; border-radius: var(--r-sm); background: #060c10; border: 1px solid var(--line); color: var(--text); font: 600 1.05rem/1.4 var(--mono); overflow-wrap: anywhere; }
.copyline .copy-btn { flex: none; align-self: center; }
.copy-btn.is-copied { border-color: rgba(95, 211, 154, .5); color: var(--ok); }
.countdown { display: flex; align-items: center; gap: .9rem; padding: .75rem .9rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-soft); }
.countdown .ring { width: 44px; height: 44px; flex: none; }
.ring-track { fill: none; stroke: var(--raised); stroke-width: 4; }
.ring-fill { fill: none; stroke: var(--aqua); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.countdown-num { font: 600 1.5rem/1.1 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.countdown.low .ring-fill { stroke: var(--warn); }
.countdown.low .countdown-num { color: var(--warn); }

/* ── Resultado / comprobante ── */
.result { display: grid; justify-items: center; gap: .7rem; text-align: center; padding: 1.6rem 1.2rem; }
.result > .summary, .result > .tl-box { justify-self: stretch; text-align: left; }
.result h2 { font-size: 1.45rem; }
.result-amount { font: 600 clamp(2.2rem, 10vw, 3rem)/1.05 var(--ui); letter-spacing: -0.035em; color: var(--heading); }
.result--bad .result-amount { color: var(--text); }
.result .btn-row--flow { justify-self: stretch; margin-top: .4rem; }
.result-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(242, 179, 91, .14); color: var(--warn); }
.result-mark .ico { width: 30px; height: 30px; }
.receipt { width: 100%; padding: 1rem 1.1rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-soft); }

/* ── Inicio ── */
.dash { display: grid; gap: 1rem; }
.hero-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .3rem; padding: 1.6rem 1.35rem 1.35rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
/* La solapa del sobre: una V tenue arriba de todo, el único adorno de la pantalla. */
.hero-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 58%; background: linear-gradient(180deg, rgba(28, 202, 216, .09), rgba(28, 202, 216, 0)); clip-path: polygon(0 0, 100% 0, 50% 100%); pointer-events: none; }
.hero-card::after { content: ''; position: absolute; inset: 0 0 auto; height: 58%; background: linear-gradient(to bottom right, transparent calc(50% - .5px), rgba(95, 227, 238, .14) 50%, transparent calc(50% + .5px)) left / 50% 100% no-repeat, linear-gradient(to bottom left, transparent calc(50% - .5px), rgba(95, 227, 238, .14) 50%, transparent calc(50% + .5px)) right / 50% 100% no-repeat; pointer-events: none; }
.hero-card > * { position: relative; }
.hero-amount { font: 600 clamp(2.8rem, 12vw, 4.4rem)/1.04 var(--ui); letter-spacing: -0.045em; color: var(--heading); overflow-wrap: anywhere; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: auto; padding-top: 1.1rem; }
.quick .btn { gap: .45rem; padding-inline: .6rem; font-size: .95rem; }
.quick .btn svg { width: 20px; height: 20px; }
@media (max-width: 519px) {
  .quick .btn { flex-direction: column; min-height: 72px; border-radius: var(--r-md); font-size: .85rem; gap: .3rem; }
}

.steps-card { display: grid; gap: .6rem; align-content: start; }
.progress { height: 6px; border-radius: 6px; background: var(--raised); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--aqua); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.checklist { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; }
.checklist li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: .3rem; align-items: center; border-top: 1px solid var(--line-soft); }
.checklist li:first-child { border-top: 0; }
.checklist li > a, .checklist li > .ck-text { min-height: 44px; padding: .5rem 0; color: var(--text); text-decoration: none; }
.checklist li > a { display: flex; align-items: center; }
/* El círculo es el "marcar como hecho": 44 px para el dedo, 24 px a la vista. */
.ck-btn { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; }
button.ck-btn { cursor: pointer; }
button.ck-btn:hover .ck { border-color: var(--aqua); color: var(--aqua-text); }
button.ck-btn:focus-visible { outline-offset: -6px; }
.steps-done { display: none; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.steps-done p { color: var(--text-2); }
.steps-done strong { color: var(--text); }
.steps-card.is-complete .steps-done { display: flex; }
.steps-card.is-complete :is(.progress, .checklist) { display: none; }
.steps-undo:empty { display: none; }

/* Nombre para tus cobros: la vista previa es el sobre que ve quien paga. */
.pn-form { display: grid; gap: 1rem; margin-top: 1rem; }
#pots-out .btn-row { margin-top: 1rem; }
.pn-preview { display: grid; gap: .1rem; padding: 1rem 1.1rem; border: 1px dashed var(--line); border-radius: var(--r-md); background: rgba(8, 15, 19, .45); }
.pn-preview-k { margin-bottom: .45rem; font-size: .78rem; color: var(--muted); }
.pn-preview-to { font-size: .85rem; color: var(--muted); }
.pn-preview-name { font: 650 1.5rem/1.1 var(--display); font-stretch: 88%; color: var(--text); overflow-wrap: anywhere; }
.pn-hint { margin-bottom: 1rem; }
.checklist li > a:hover .ck-text > span:first-child { text-decoration: underline; color: var(--aqua-text); }
.ck { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); color: var(--muted); }
.ck .ico { width: 14px; height: 14px; }
.is-done .ck { background: var(--aqua); border-color: var(--aqua); color: var(--on-aqua); }
.is-done .ck-text { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(142, 164, 169, .5); }
.is-soon { color: var(--muted) !important; }
.is-soon .ck { border-style: dashed; }
.ck-text { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; font-size: .95rem; }

.chart-card .section-head { align-items: flex-start; }
.legend { display: flex; gap: 1rem; list-style: none; margin: .2rem 0 0; padding: 0; font-size: .85rem; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: .4rem; }
.sw-in, .sw-out { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--viz-in); }
.sw-out { background: var(--viz-out); }
.chart { position: relative; margin-top: .8rem; min-height: 190px; border-radius: var(--r-sm); }
.chart:focus-visible { outline-offset: 4px; }
.chart-svg { display: block; overflow: visible; }
.chart-svg .bar-in { fill: var(--viz-in); }
.chart-svg .bar-out { fill: var(--viz-out); }
.chart-svg .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart-svg .axis { stroke: var(--line); stroke-width: 1; }
.chart-svg .tick { fill: var(--muted); font: 500 11px var(--ui); font-variant-numeric: tabular-nums; }
.chart-svg .hover-band { fill: rgba(234, 244, 245, .05); }
.chart-tip { position: absolute; top: -.4rem; left: var(--x, 50%); transform: translate(-50%, -100%); display: grid; gap: .2rem; min-width: 9.5rem; padding: .55rem .75rem; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8); font-size: .82rem; pointer-events: none; z-index: 2; }
.chart-tip span { display: flex; align-items: center; gap: .4rem; color: var(--text-2); }
.chart-tip b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-skel { display: block; height: 190px; border-radius: var(--r-sm); }
.chart-table { margin-top: .8rem; font-size: .9rem; }
.chart-table summary { cursor: pointer; color: var(--aqua-text); font-weight: 500; }
.dtable { width: 100%; border-collapse: collapse; margin-top: .6rem; font-variant-numeric: tabular-nums; }
.dtable th, .dtable td { padding: .45rem .3rem; border-bottom: 1px solid var(--line-soft); text-align: right; font-weight: 500; }
.dtable th:first-child { text-align: left; }
.dtable thead th { color: var(--muted); font-weight: 500; }

@media (min-width: 1000px) {
  .dash { grid-template-columns: 1.5fr 1fr; gap: 1.1rem; }
  .dash > .chart-card, .dash > .moves-card { grid-column: 1 / -1; }
  .dash:has(> #home-steps[hidden]) > .hero-card { grid-column: 1 / -1; }
  .hero-card { padding: 2rem 1.8rem 1.6rem; }
  .quick { max-width: 30rem; }
}

/* Movimientos con íconos */
.move-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--aqua-tint); color: var(--aqua-text); }
.move-ico.out { background: rgba(144, 133, 233, .14); color: #b9b1f5; }
.move-ico .ico { width: 18px; height: 18px; }
.moves > li.day { display: block; padding: 1.2rem 0 .3rem; border-top: 0; font-size: .82rem; font-weight: 600; color: var(--muted); }
.moves > li.day:first-child { padding-top: 0; }
.moves > li.day + li { border-top: 0; }

/* ── Auth y tipos de cuenta ── */
.auth--wide { max-width: 54rem; }
.alt { margin-top: 1.5rem; color: var(--muted); font-size: .95rem; }
.alt-card { display: flex; align-items: center; gap: .9rem; margin-top: 1.5rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none; }
.alt-card:hover { background: var(--raised); }
.alt-card > span:last-child { display: grid; gap: .1rem; }
.alt-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--aqua-tint); color: var(--aqua-text); flex: none; }
.alt-ico svg { width: 22px; height: 22px; }
.kinds { display: grid; gap: 1rem; }
.kind { display: grid; align-content: start; gap: .9rem; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.kind--main { background: var(--card); border-color: rgba(95, 227, 238, .4); box-shadow: var(--shadow), 0 0 0 4px rgba(28, 202, 216, .06); }
.kind-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.kind h2 { font-size: 1.25rem; }
.kind form { margin-top: .2rem; }
.kind:not(.kind--main) h2 { color: var(--text); }
@media (min-width: 760px) { .kinds { grid-template-columns: 1.25fr 1fr; align-items: start; } }
.ticks, .info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .93rem; color: var(--text-2); }
.ticks li { position: relative; padding-left: 1.6rem; }
.ticks li::before { content: ''; position: absolute; left: .2rem; top: .42em; width: .7rem; height: .38rem; border-left: 2px solid var(--aqua-text); border-bottom: 2px solid var(--aqua-text); transform: rotate(-45deg); }
.ticks--plain li::before { border: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); top: .6em; left: .35rem; transform: none; }
.ticks li.tick-warn { color: #fbe5c4; }
.ticks li.tick-warn::before { background: var(--warn); }
.info-list { margin-top: 1rem; }
.info-list li { padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-soft); }
.info-list strong { color: var(--text); font-weight: 600; }
#guest-intro .info-list, #guest-key .lead { margin-top: 1rem; }
[data-view="guest"] .stepper { margin-top: 1.2rem; }
[data-view="guest"] .stepper-label { margin-bottom: .5rem; }
[data-view="guest"] .sb-scene { max-width: 220px; margin-block: .4rem .2rem; }

/* ── Soporte ── */
.help-hero { display: grid; justify-items: center; gap: 1rem; padding: .5rem 0 1.6rem; text-align: center; }
.help-hero h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); }
.search { position: relative; width: 100%; max-width: 34rem; }
.search svg { position: absolute; left: 1rem; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input[type=search] { min-height: 54px; padding-left: 2.9rem; border-radius: 999px; font-size: 1.02rem; background: var(--surface); }
.chips--topics { justify-content: center; }
.help-grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1000px) {
  .help-grid { grid-template-columns: 1.35fr 1fr; gap: 2rem; }
  .help-inbox { position: sticky; top: calc(var(--head-h) + 20px); }
}
.faq-group + .faq-group { margin-top: 1.6rem; }
.faq-group h2 { font: 600 .9rem/1.3 var(--ui); color: var(--muted); letter-spacing: 0; margin-bottom: .3rem; }
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 0; cursor: pointer; list-style: none; font-weight: 600; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--aqua-text); }
.faq-item p { padding: 0 2rem 1rem 0; color: var(--text-2); }
.faq-item[open] p { animation: sb-enter 220ms var(--sb-e-out, ease-out) both; }
.faq-none { padding: 1rem 0; color: var(--muted); }
.ticket-form { display: grid; gap: 0; margin-top: 1rem; }
.inbox { list-style: none; margin: .6rem 0 0; padding: 0; }
.inbox li + li { border-top: 1px solid var(--line-soft); }
.inbox a { display: grid; grid-template-columns: 8px 1fr auto; gap: .75rem; align-items: center; padding: .85rem .5rem; margin-inline: -.5rem; border-radius: var(--r-sm); color: var(--text); text-decoration: none; }
.inbox a:hover { background: var(--raised); }
.inbox-dot { width: 8px; height: 8px; border-radius: 50%; }
.inbox li.is-new .inbox-dot { background: var(--aqua); box-shadow: 0 0 0 3px rgba(28, 202, 216, .2); }
.inbox-main { display: grid; min-width: 0; }
.inbox-subject { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox li.is-new .inbox-subject { font-weight: 700; }
.inbox-sub { font-size: .82rem; color: var(--muted); }
.inbox li.is-closed .inbox-subject { color: var(--muted); }

/* Hilo como chat, con el cuadro de respuesta fijo abajo */
.chat-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-soft); }
.back { display: inline-flex; align-items: center; gap: .2rem; color: var(--text-2); text-decoration: none; font-size: .92rem; font-weight: 500; }
.back svg { width: 20px; height: 20px; }
.back:hover { color: var(--aqua-text); }
.chat-title { min-width: 0; }
.chat-title h1 { font-size: 1.2rem; font-family: var(--ui); font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.chat-title .hint { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .2rem; }
@media (max-width: 519px) { .back span { display: none; } }
.chat { list-style: none; margin: 0; padding: 1.2rem 0; display: grid; gap: .9rem; }
.bubble { display: flex; gap: .6rem; align-items: flex-end; max-width: 86%; }
.bubble.mine { justify-self: end; flex-direction: row-reverse; }
.bubble-who { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--raised); color: var(--aqua-text); flex: none; }
.bubble-who .ico { width: 16px; height: 16px; }
.bubble-box { padding: .7rem .95rem; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.mine .bubble-box { border-radius: 18px 18px 6px 18px; background: var(--aqua-tint); border-color: rgba(95, 227, 238, .3); }
.bubble-meta { display: flex; gap: .6rem; align-items: baseline; font-size: .76rem; color: var(--muted); margin-bottom: .2rem; }
.bubble-meta strong { color: var(--text-2); font-weight: 600; }
.bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 3; display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: end; padding: .75rem 0; background: linear-gradient(180deg, rgba(8, 15, 19, 0), var(--bg) 22%); }
.composer textarea { min-height: 50px; max-height: 180px; resize: none; border-radius: 24px; padding: .8rem 1.1rem; }
.composer-send { width: 50px; min-height: 50px; padding: 0; }
.composer-send svg { width: 20px; height: 20px; }
.composer .notice { grid-column: 1 / -1; }
@media (min-width: 900px) { .composer { bottom: 0; background: transparent; } }

/* ── Cuenta ── */
.acc-head { display: flex; align-items: center; gap: 1rem; }
.acc-avatar { width: 56px; height: 56px; }
.acc-avatar .ico { width: 28px; height: 28px; }
.acc-head .hint { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .3rem; }
.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.3rem; padding: 1.1rem 1.25rem; border-radius: var(--r-md); border: 1px solid rgba(95, 227, 238, .35); background: linear-gradient(120deg, rgba(28, 202, 216, .14), rgba(61, 139, 255, .06)); }
.banner > div { flex: 1 1 18rem; }
.banner h2 { font: 600 1.05rem/1.3 var(--ui); color: var(--text); }
.banner p { margin-top: .3rem; font-size: .92rem; color: var(--text-2); }
.acc-layout { display: grid; gap: 1.2rem; margin-top: 1.4rem; }
.subnav { position: sticky; top: var(--head-h); z-index: 4; display: flex; gap: .35rem; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: .55rem var(--gutter); background: rgba(8, 15, 19, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); scrollbar-width: none; }
.subnav a { flex: none; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.subnav a:hover { background: var(--raised); color: var(--text); }
@media (max-width: 419px) { .subnav a { padding-inline: .8rem; } }
.subnav a[aria-current=page] { background: var(--aqua-tint); border-color: rgba(95, 227, 238, .5); color: var(--aqua-text); }
@media (min-width: 900px) {
  .acc-layout { grid-template-columns: 12rem 1fr; gap: 2rem; align-items: start; }
  .subnav { top: calc(var(--head-h) + 24px); flex-direction: column; margin: 0; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible; }
  .subnav a { border: 0; background: none; border-radius: var(--r-sm); padding: .6rem .9rem; font-weight: 500; }
  .subnav a[aria-current=page] { background: var(--aqua-tint); font-weight: 600; }
}
.acc-panel .panel h2 { font-size: 1.08rem; }
.dl { margin: .8rem 0 0; display: grid; }
.dl > div { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: .2rem 1rem; padding: .75rem 0; border-top: 1px solid var(--line-soft); }
.dl > div:first-child { border-top: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.dd-link { font-weight: 500; }
@media (max-width: 519px) { .dl > div { grid-template-columns: 1fr; } }
/* ── Cuenta → Límites: un solo máximo por cobro ── */
.lim-card { display: grid; gap: .7rem; }
.lim-card h2 { margin: 0; }
.lim-big { margin: 0; font: 600 clamp(2.4rem, 9vw, 3.2rem)/1 var(--ui); letter-spacing: -0.04em; color: var(--heading); }
.lim-card > .hint { margin: 0; }
.lim-scale-box { display: grid; gap: .35rem; margin-top: .3rem; }
.lim-scale { position: relative; height: 8px; border-radius: 999px; background: var(--raised); }
.lim-fill { position: absolute; inset: 0 auto 0 0; width: max(8px, var(--cur)); border-radius: inherit; background: var(--aqua); }
.lim-ask { position: absolute; top: -5px; bottom: -5px; left: var(--ask); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--warn); }
.lim-ticks { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lim-state { display: grid; gap: .6rem; justify-items: start; padding: .9rem 1rem; border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.lim-state p { margin: 0; }
.lim-dl { margin-top: .2rem; }
.lim-form { display: grid; gap: 1rem; }
.lim-form > .hint { margin: 0; }
.lim-pick { display: grid; gap: .45rem; justify-items: center; padding: 1rem; border: 1px solid var(--line-soft); border-radius: var(--r-md); text-align: center; }
.lim-ask-amount { font: 600 clamp(1.9rem, 8vw, 2.4rem)/1.05 var(--ui); letter-spacing: -0.03em; color: var(--heading); }
.lim-ask-local { margin: 0; }
.lim-pick input[type=range] { width: 100%; accent-color: var(--aqua); margin: .4rem 0 .2rem; }
.lim-num { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--text-2); }
.lim-num-in { display: inline-flex; align-items: center; gap: .3rem; }
.lim-num input { width: 6.5rem; min-height: 40px; }
.lim-form textarea { width: 100%; resize: vertical; }

.compare { display: grid; border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; align-items: center; }
.compare-row > span { padding: .8rem .9rem; border-top: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.compare-head > span { border-top: 0; display: grid; gap: .3rem; justify-items: start; font-size: .88rem; align-self: stretch; align-content: end; }
.compare-label { color: var(--muted); font-size: .92rem; }
.compare-val { font-weight: 600; }
.compare .is-mine { background: var(--aqua-tint); }
.compare-val.is-mine { color: var(--heading); }
.compare-cta { padding: .9rem; border-top: 1px solid var(--line-soft); font-size: .92rem; color: var(--text-2); }
@media (max-width: 519px) { .compare-row > span { padding: .7rem .55rem; font-size: .85rem; } }
.input-wrap { position: relative; }
.input-ok { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--ok); }
.input-ok svg { width: 20px; height: 20px; }
.hint.is-bad { color: #ffb4ae; }
.hint.is-good { color: var(--ok); }
.recent { margin-top: 1.1rem; display: grid; gap: .5rem; }
.qr-steps { margin: 0; padding-left: 1.2rem; color: var(--text-2); font-size: .93rem; display: grid; gap: .25rem; }
@media (prefers-reduced-motion: reduce) {
  .faq-item[open] p { animation: none; }
  .btn.is-busy::after { animation-duration: 3s; }
  .progress i, .ring-fill { transition: none; }
}
html.reduce-motion .faq-item[open] p { animation: none; }
.auth p.alt { display: block; }
@media (max-width: 479px) {
  .btn-row--flow { grid-template-columns: 1fr; }
  .btn-row--flow > .btn-primary, .btn-row--flow > .is-main { order: -1; }
}
@media (max-width: 999px) { .help-inbox { order: -1; } }

/* ── Ronda 2 del juez: piezas nuevas de la app ── */
.hero-card { align-self: start; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.kpis dt { font-size: .8rem; color: var(--muted); }
.kpis dd { margin: .15rem 0 0; font-weight: 600; font-size: 1rem; color: var(--text); }
@media (max-width: 379px) { .kpis { grid-template-columns: 1fr 1fr; } }

.consent { margin-top: 1.2rem; }
.consent a { color: var(--text-2); }
.kind .consent { margin-top: 0; }

.dropzone { display: flex; align-items: center; gap: .8rem; min-height: 64px; padding: .8rem 1rem; border: 1.5px dashed var(--line); border-radius: var(--r-sm); background: #060c10; color: var(--text-2); font-size: .92rem; cursor: pointer; transition: border-color .15s, background-color .15s; }
.dropzone > svg { width: 26px; height: 26px; flex: none; color: var(--aqua-text); }
.dropzone:hover, .dropzone.is-over { border-color: var(--aqua); background: var(--aqua-tint); }
#g-file:focus-visible + .dropzone { outline: 2px solid var(--aqua); outline-offset: 2px; }
.dropzone.is-ok { border-style: solid; border-color: rgba(95, 211, 154, .5); }
.dropzone.is-bad { border-color: rgba(255, 122, 114, .5); }
#g-file-name { display: block; min-width: 0; overflow-wrap: anywhere; }
#g-file-name .ico { display: inline-block; width: 18px; height: 18px; margin-right: .35rem; vertical-align: -4px; color: var(--ok); }

.mv-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.moves > li.move { display: block; padding: 0; }
.move-in { display: grid; grid-template-columns: 38px 1fr auto; gap: .85rem; align-items: center; padding: .95rem 0; color: inherit; text-decoration: none; }
a.move-in { margin-inline: -.6rem; padding-inline: .6rem; border-radius: var(--r-sm); }
a.move-in:hover { background: var(--raised); }
.rows .title .pill { margin-left: .5rem; vertical-align: 1px; }
.rows a.title { color: inherit; text-decoration: none; display: block; }
.rows a.title:hover { color: var(--aqua-text); text-decoration: underline; }

.pay-card > h2 { font-size: 1.2rem; }
.pay-qr { justify-self: center; margin-bottom: .4rem; }
.result--ok .result-mark { background: rgba(95, 211, 154, .14); color: var(--ok); }
.result--bad .result-mark { background: rgba(255, 122, 114, .14); color: var(--bad); }
.result .label { margin-top: .3rem; }
.result .label + .result-amount { margin-top: -.5rem; }

.next { margin-top: 1.2rem; padding: 1rem 1.1rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-soft); display: grid; gap: .45rem; }
.next h3 { font: 600 .95rem/1.3 var(--ui); color: var(--text); letter-spacing: 0; }
.next p:not(.hint) { color: var(--text-2); font-size: .93rem; }

.bubble-ref { display: inline-block; margin-bottom: .35rem; padding: .15rem .55rem; border-radius: 999px; background: rgba(8, 15, 19, .5); font-size: .78rem; color: var(--text-2); }
.bubble-sys { justify-self: center; max-width: 30rem; padding: .5rem .9rem; border-radius: 999px; border: 1px dashed var(--line); font-size: .85rem; color: var(--muted); text-align: center; }

/* ══════════════════════════ A liberar y chanchitos ══════════════════════════ */

/* Inicio: los dos bolsillos del sobre, debajo de lo disponible. */
.pockets { display: grid; grid-template-columns: 1fr 1fr; margin-top: .9rem; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: rgba(8, 15, 19, .45); }
.pocket { display: grid; align-content: start; gap: .15rem; padding: .8rem .95rem; color: inherit; text-decoration: none; min-width: 0; }
.pocket + .pocket { border-left: 1px solid var(--line-soft); }
.pockets:has(> .pocket:only-child) { grid-template-columns: 1fr; }
a.pocket:hover { background: var(--raised); border-radius: 0 var(--r-md) var(--r-md) 0; }
.pocket-k { font-size: .82rem; color: var(--muted); }
.pocket-v { font: 600 1.25rem/1.2 var(--ui); letter-spacing: -0.02em; color: var(--text); }
.pocket.is-empty .pocket-v { color: var(--muted); }
.pocket-s { font-size: .8rem; color: var(--text-2); }
.pocket-act { justify-self: start; margin-top: .3rem; font-size: .88rem; font-weight: 600; }
@media (max-width: 379px) { .pocket { padding: .7rem; } .pocket-v { font-size: 1.1rem; } }

/* Hoja: sube desde abajo en el celular, diálogo centrado en escritorio. */
.sheet { width: min(32rem, 100vw); max-height: min(90dvh, 46rem); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); font-family: var(--ui); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.sheet::backdrop { background: rgba(2, 6, 8, .66); }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem .6rem; background: var(--surface); }
.sheet-head h2 { font-family: var(--display); font-size: 1.3rem; overflow-wrap: anywhere; }
.sheet-x { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; }
.sheet-x:hover { background: var(--raised); color: var(--text); }
.sheet-x svg { width: 18px; height: 18px; }
.sheet-body { display: grid; gap: 1rem; padding: .4rem 1.25rem 1.4rem; }
.sheet-body .review-amount { margin-top: -.8rem; }
@media (max-width: 599px) {
  .sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet[open] { animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.hold-list > li.hold-row { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: center; }
.hold-row .title { font-size: 1.05rem; }
.hold-now { display: grid; justify-items: end; gap: .3rem; text-align: right; }
.hold-now .hint { white-space: nowrap; }

/* Retirar: lo que todavía no se puede retirar. */
.wd-split { display: grid; gap: .45rem; max-width: 26rem; padding: .7rem .9rem; border-radius: var(--r-sm); border: 1px dashed var(--line); text-align: left; font-size: .88rem; color: var(--text-2); }
.wd-split strong { color: var(--text); }

/* Movimientos entre tus cuentas: sin signo, en gris. */
.rows .amt.amt--move { color: var(--muted); font-weight: 500; }
.move-ico.move { background: var(--raised); color: var(--text-2); }

/* Chanchitos */
.pots-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.pots-head .lead { max-width: 40rem; }
.pots-sum { margin-top: 1.1rem; color: var(--text-2); }
.pots-sum strong { color: var(--heading); font-size: 1.1rem; }
.pots-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .pots-grid { grid-template-columns: repeat(2, 1fr); } }
.pot { display: grid; gap: .35rem; padding: 1.2rem 1.2rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); min-width: 0; }
.pot-top { display: grid; grid-template-columns: 52px 1fr auto; gap: .8rem; align-items: center; margin-bottom: .4rem; }
.pot-id { min-width: 0; }
.pot-name { font-size: 1.15rem; overflow-wrap: anywhere; }
.pot-meta { margin-top: .15rem; font-size: .82rem; color: var(--muted); }
.pot-ring { position: relative; display: grid; place-items: center; width: 52px; height: 52px; }
.pot-ring > svg:not(.ico) { position: absolute; inset: 0; width: 100%; height: 100%; }
.pot-ring .ring-fill { transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.pot-ring.is-full .ring-fill { stroke: var(--ok); }
.pot-pct { position: relative; font-size: .78rem; font-weight: 600; }
.pot-ring--free { border-radius: 50%; background: var(--aqua-tint); color: var(--aqua-text); }
.pot-ring--free .ico { width: 24px; height: 24px; }
.pot-more { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid transparent; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.pot-more:hover { border-color: var(--line); color: var(--text); }
.pot-amt { font: 600 1.9rem/1.1 var(--ui); letter-spacing: -0.03em; color: var(--heading); }
.pot-goal { font-size: .88rem; color: var(--text-2); }
.pot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .7rem; }
.pots-empty { display: grid; justify-items: center; gap: .6rem; padding: 1.4rem 1.4rem 1.8rem; text-align: center; grid-column: 1 / -1; }
.pots-empty h2 { font-size: 1.35rem; color: var(--heading); }
.pots-empty .hint { max-width: 30rem; }
.pots-empty .btn { margin-top: .4rem; }
.pots-scene { width: 100%; max-width: 260px; }
.pot-move { display: grid; gap: 1rem; }
.pot-move .avail { text-align: center; }
.amount-card--sheet { padding: .4rem 0 0; }
.pot-saved { display: grid; justify-items: center; gap: .3rem; text-align: center; }
.pot-saved-t { font: 600 1.6rem/1.15 var(--ui); letter-spacing: -0.02em; color: var(--heading); }
.pot-archive { display: grid; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.tl-row .title a { color: inherit; text-decoration: none; }
.tl-row .title a:hover, .tl-row .title a:focus-visible { text-decoration: underline; }
