@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* =====================================================================
   Meridiano — rediseño v2 "Aire" (docs/spec-rediseno-v2.md, PR 1).
   Claro por defecto; oscuro solo con [data-theme="dark"] (el toggle).
   Los tokens viejos (--ink, --line, --surface-2…) quedan como alias de
   los nuevos para que las pantallas que todavía no entraron al rediseño
   sigan coherentes.
   ===================================================================== */
:root {
  --bg: #f7f7fb; --surface: #ffffff; --border: #eef0f6; --divider: #f1f2f7;
  --text: #121a2e; --muted: #7b8194; --muted-2: #9aa0b0; --chip: #eef1fa;
  --primary: #0b1526; --on-primary: #ffffff; --gold: #d3a03c;
  --warn-bg: #fff5df; --warn-text: #9a6d14; --err-bg: #fdeae6; --err-text: #a8402f;
  --shadow-card: 0 10px 30px -14px rgba(18,26,46,.16), 0 1px 2px rgba(18,26,46,.04);
  --r-card: 22px; --r-btn: 16px; --r-input: 16px; --r-chip: 12px;
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-serif: var(--font-sans);
  --sidebar-w: 248px;

  /* --- alias de compatibilidad (pantallas fuera del PR 1) --- */
  --surface-2: var(--chip); --surface-3: #e6e9f3;
  --ink: var(--text); --ink-2: var(--muted); --ink-3: var(--muted-2);
  --line: var(--border); --line-2: #e3e6ef;
  --navy: #0b1526; --navy-2: #121a2e; --navy-3: #1b2744;
  --hero: linear-gradient(135deg, rgba(24,36,66,.96) 0%, rgba(14,22,42,.96) 55%, rgba(60,48,30,.92) 100%);
  --gold-2: #e6b75a; --gold-ink: #9a6d14; --gold-weak: var(--warn-bg); --gold-line: #f1dfae; --gold-soft: #fdf3e3;
  --on-dark: #ffffff; --on-dark-2: rgba(255,255,255,.7); --on-gold: #121a2e;
  --good: #121a2e; --good-bg: var(--chip); --good-on-dark: #e6b75a; --good-on-dark-2: #f3e3b8; --red-on-dark: #f09a86;
  --amber: var(--warn-text); --amber-bg: var(--warn-bg); --red: var(--err-text); --red-bg: var(--err-bg);
  --globe-line: #c3ccdb; --qr-bg: #ffffff; --qr-ink: #121a2e;
  --tip-bg: var(--primary); --tip-ink: #ffffff; --tip-ink-2: rgba(255,255,255,.62);
  --accent: var(--gold); --accent-ink: var(--gold-ink); --accent-weak: var(--gold-weak);
  --r-sm: var(--r-chip); --r: var(--r-btn); --r-lg: var(--r-card); --r-xl: var(--r-card);
  --shadow: var(--shadow-card); --shadow-lg: 0 24px 50px -20px rgba(18,26,46,.35);
  --bal-ring: transparent; --bal-wash: var(--surface); --bal-accent: none; --home-hd-shadow: var(--shadow-card);
  --on-pastel: #121a2e;
  --conv-ink-2: #a9b7cd; --conv-sym: #8ea0bd; --conv-ph: #55657f; --conv-max: #cfd9e8;
}
:root[data-theme="dark"] {
  --bg: #1f2537; --surface: #2a3146; --border: #394159; --divider: #353d53;
  --text: #f3f4f8; --muted: #aab2c5; --muted-2: #8f98ad; --chip: #394159;
  --primary: #f3f4f8; --on-primary: #12182a; --gold: #e6b75a;
  --warn-bg: #3d3320; --warn-text: #e6b75a; --err-bg: #3a1f1b; --err-text: #f09a86;
  --shadow-card: 0 10px 30px -14px rgba(0,0,0,.35);
  --surface-3: #454e68; --line-2: #454e68;
  --navy: #0b1526; --navy-2: #121a2e; --navy-3: #1b2744;
  --gold-ink: #e6b75a; --gold-line: rgba(230,183,90,.3); --gold-soft: rgba(230,183,90,.1);
  --good: #f3f4f8; --on-gold: #12182a;
  --tip-bg: #f3f4f8; --tip-ink: #12182a; --tip-ink-2: #5b6475;
  --shadow-lg: 0 24px 50px -20px rgba(0,0,0,.6);
  --qr-bg: #ffffff; --qr-ink: #121a2e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans); background: var(--bg); color: var(--ink);
  font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-sans); font-weight: 800; letter-spacing: -.025em; color: var(--ink); }
.mono { font-family: var(--font-mono); }
.tbl .amt, .num { font-variant-numeric: tabular-nums; }
.ico { flex: none; display: block; }
button { font-family: inherit; }
::selection { background: var(--gold-weak); }

/* ---------- Eyebrow (título chico con punto dorado, como la landing) ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.eyebrow.on-dark { color: rgba(255,255,255,.62); }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; padding: 28px 48px 64px; }
/* Desktop usa el ancho (spec-rediseno, fase 1, punto 7): 1200 px a la derecha de la barra lateral. */
.main-inner { max-width: 1200px; margin: 0 auto; }

/* Sidebar */
.sidebar { width: var(--sidebar-w); flex: none; background: var(--surface); border-right: 1px solid var(--line);
  padding: 22px 16px 18px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; color: var(--ink); }
.sidebar .brand { padding: 4px 10px 22px; }
.brand .mk { flex: none; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink-2); cursor: pointer; font-weight: 600; border: none; background: none; width: 100%;
  text-align: left; font-size: 14px; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--navy); color: var(--on-dark); }
.nav-item.active .ico { color: var(--gold-2); }
.badge-count { margin-left: auto; background: var(--gold); color: var(--on-gold); font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.sidebar-foot .nav-item { margin-bottom: 2px; }
.sidebar-foot .me { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.me { display: flex; align-items: center; gap: 11px; padding: 8px 8px 12px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--gold-weak); color: var(--gold-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 13.5px; flex: none; letter-spacing: .02em; border: none; }
.me .who { min-width: 0; }
.me .name { font-weight: 700; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .org { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-actions { display: flex; gap: 6px; padding: 0 4px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.lang-toggle { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.lang-toggle button { border: none; background: none; height: 28px; min-width: 40px; padding: 0 10px; border-radius: 999px;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3, var(--ink-2)); cursor: pointer; }
.lang-toggle button:hover { color: var(--ink); }
.lang-toggle button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(17,26,46,.12); }
.side-lang { display: flex; margin: 8px 4px 0; }
.side-lang button { flex: 1; }
.foot-actions .icon-btn.wide { flex: 1; width: auto; display: flex; gap: 8px; justify-content: center; font-size: 13px; font-weight: 600; }

/* Barra superior (solo celular) y navegación inferior de cuatro pestañas (spec-rediseno, fase 1: sin "Más" ni flotante) */
.topbar { display: none; }
.avatar { position: relative; }
.avatar-dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid var(--surface); }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 14px 16px 120px; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 14px; }
  .topbar .brand { font-size: 18px; }
  .sheet-scrim { display: block; position: fixed; inset: 0; background: rgba(8,12,24,.55); z-index: 60; animation: fade .18s both; }
  .sheet { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: var(--surface);
    border-radius: 28px 28px 0 0; padding: 10px 16px 28px; animation: sheetin .24s cubic-bezier(.2,.8,.2,1) both; max-height: 80vh; overflow-y: auto; }
  .sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 14px; }
}
@keyframes sheetin { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 14px; }
.page-head h2 { font-size: 32px; margin: 0; line-height: 1.1; }
.page-head .eyebrow { margin-bottom: 10px; }
.mode-pill { font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--amber-bg);
  color: var(--amber); text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-mono); }
.mode-pill.live { background: var(--good-bg); color: var(--good); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 24px 26px; margin-bottom: 22px; }
.card h3 { font-size: 18px; margin: 0 0 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }

.grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 22px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow); }
.metric .label { color: var(--ink-2); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.metric .value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.metric .hint { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }

/* Tile de ícono (fondo crema, ícono dorado — como las cards "Why Meridiano") */
/* legacy: sale cuando migren las demás pantallas */

/* ---------- Forms ---------- */
label.field { display: block; margin-bottom: 16px; }
label.field .lab { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
input, select { width: 100%; height: 46px; border: 1px solid var(--line-2); border-radius: 14px; padding: 0 14px;
  font-size: 14.5px; background: var(--surface); color: var(--ink); font-family: var(--font-sans); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-weak); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--ink-3); }
textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; font-size: 13.5px;
  font-family: var(--font-mono); background: var(--surface); color: var(--ink); resize: vertical; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

/* ---------- Buttons (píldora, como la landing) ---------- */
.btn { height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--ink); font-weight: 700; font-size: 15px; letter-spacing: -.01em; cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
  transition: background .15s, transform .08s, box-shadow .15s, filter .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--on-dark); box-shadow: 0 8px 20px -10px rgba(11,21,38,.6); }
.btn.primary:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); box-shadow: 0 8px 20px -10px rgba(211,160,60,.75); }
.btn.block { width: 100%; justify-content: center; }
.btn.gold:hover { filter: brightness(1.05); background: var(--gold); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; }
/* En oscuro el navy no contrasta: el primario pasa a dorado. */

/* ---------- Quote strip ---------- */
.quote { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--surface-2);
  border-radius: 16px; padding: 14px 18px; margin: 6px 0 18px; font-size: 13.5px; color: var(--ink-2); }
.quote b { color: var(--ink); }
.quote .arrives { margin-left: auto; color: var(--ink); font-weight: 800; font-size: 15px; }

/* ---------- Table ---------- */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; color: var(--ink-3); font-weight: 700; padding: 10px 12px;
  border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .1em; }
.tbl td { padding: 14px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tbl tr:last-child td { border-bottom: none; }
.muted { color: var(--ink-3); font-size: 12.5px; }

/* ---------- Badges / status pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--good-bg); color: var(--good); }
.badge.pending { background: var(--amber-bg); color: var(--amber); }
.badge.fail { background: var(--red-bg); color: var(--red); }
.badge.wait { background: var(--gold-weak); color: var(--gold-ink); }

/* ---------- Misc ---------- */
.alert { padding: 13px 16px; border-radius: 14px; font-size: 13.5px; margin-bottom: 16px; }
.alert.err { background: var(--red-bg); color: var(--red); }
.alert.ok { background: var(--good-bg); color: var(--good); }
.empty { text-align: center; color: var(--ink-3); padding: 40px 20px; font-size: 13.5px; }
.spinner { color: var(--ink-3); font-size: 13.5px; padding: 24px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.summary-line { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 14px; }
.summary-line b { font-variant-numeric: tabular-nums; }
.link { color: var(--gold-ink); cursor: pointer; background: none; border: none; font-size: 13.5px; padding: 0; font-weight: 700; }
.link:hover { text-decoration: underline; }
.link:disabled { opacity: .5; cursor: not-allowed; text-decoration: none; }
.sect-title { font-size: 15px; font-weight: 800; margin: 22px 0 4px; color: var(--ink); letter-spacing: -.01em; }
.sect-note { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }
.pos { color: var(--good); }
.neg { color: var(--red); }
code { font-family: var(--font-mono); font-size: .92em; }

/* ---------- Login / pantallas sin sesión ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); color: var(--on-dark); font-weight: 600; font-size: 13.5px; background: rgba(255,255,255,.04); }
.chip .rail-code { font-family: var(--font-mono); font-size: 11.5px; color: rgba(255,255,255,.55); }
.globe-deco { pointer-events: none; color: var(--globe-line); }
.globe-deco .wire { stroke-width: 1.2; opacity: .9; }
.globe-deco .meridian-line { stroke: var(--gold); stroke-width: 2.4; opacity: .9; }
.globe-deco .spin { transform-box: view-box; transform-origin: 200px 200px; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .globe-deco .spin { animation: none !important; } }

/* Globo del login: grande, centrado en el panel, girando como en la landing */
@media (max-height: 780px) { .auth-stage { display: none; } .auth-art .eyebrow { margin-top: auto; } }
.invite-link { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.invite-link code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
@media (min-width: 901px) { .login-card .brand { display: none; } }

/* ---------- Dashboard: hero de saldo ---------- */
/* legacy: sale cuando migren las demás pantallas */
  padding: 28px 34px 28px; margin-bottom: 22px; box-shadow: var(--shadow-lg); }
.bal { font-size: clamp(40px, 5.2vw, 62px); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; margin: 6px 0 10px; }
.bal .cents { font-size: .5em; color: rgba(255,255,255,.5); letter-spacing: -.02em; }
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); font-size: 12px; font-weight: 600; color: rgba(255,255,255,.8); }
  cursor: pointer; font-size: 12.5px; font-weight: 600; width: 78px; padding: 0; line-height: 1.2; }
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); transition: background .15s, transform .12s; }
  border-radius: 18px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); cursor: pointer; width: 100%;
  color: var(--on-dark); text-align: left; font-size: 14px; font-weight: 600; }

/* Stat tiles */
/* legacy: sale cuando migren las demás pantallas */
  display: flex; flex-direction: column; gap: 14px; text-align: left; font: inherit; color: inherit; }
button.stat { cursor: pointer; transition: border-color .15s, transform .12s; }
button.stat:hover { border-color: var(--line-2); transform: translateY(-1px); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.delta.up { background: var(--good-bg); color: var(--good); }
.delta.down { background: var(--red-bg); color: var(--red); }
@media (max-width: 900px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -26px 4px; padding: 0 26px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .seg { flex-wrap: nowrap; flex: none; }
  .seg button { white-space: nowrap; }
  .filters select { flex: none; min-width: 0; }
  .card { padding: 20px 18px; border-radius: 22px; }
}

/* Section header (eyebrow + título) */
.sec { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 30px 0 14px; flex-wrap: wrap; }
.sec h3 { font-size: 22px; margin: 8px 0 0; }

/* Corredores: cards horizontales con sparkline (a lo "Mercado cripto") */
/* legacy: sale cuando migren las demás pantallas */
  padding: 18px 18px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 204px; }
.flag { font-size: 20px; line-height: 1; }
/* Banderas SVG (<Flag />, sprite en index.html). Con svg. para no tocar las banderas emoji de las
   pantallas que todavía no migraron (<span class="flag">). */
svg.flag { width: 26px; height: 17.5px; border-radius: 3.5px; overflow: hidden; flex: none; display: block;
  box-shadow: inset 0 0 0 1px var(--bal-ring); }
svg.flag-lg { width: 32px; height: 21.5px; border-radius: 4px; }
.rail { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); background: var(--surface-2); border-radius: 7px; padding: 3px 8px; margin-left: auto; }
@media (max-width: 900px) { .corridors > .cor { flex: 0 0 76%; } .corridors > .cor.soon { flex-basis: 56%; } }

/* Gráfico de volumen */
.tip { position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 16px)); background: var(--tip-bg);
  color: var(--tip-ink); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; white-space: nowrap; box-shadow: var(--shadow-lg); z-index: 2; }
.tip b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.tip span { color: var(--tip-ink-2); }
@media (max-width: 820px) { .charts-2 { grid-template-columns: 1fr; } .chart-kpis { gap: 18px; } .chart-kpis div { text-align: left; } }
/* compat (barras simples) */
.bar-row { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; margin: 10px 0; font-size: 13.5px; }
.bar-row .cur { color: var(--ink-2); font-weight: 600; }
.bar-track { background: var(--surface-2); border-radius: 6px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--gold); border-radius: 0 4px 4px 0; }
.bar-row .val { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }

/* Actividad: lista agrupada por día */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: none; background: none; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(17,26,46,.12); }
:root[data-theme="dark"] .seg button.on { background: var(--surface-3); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.filters select { width: auto; height: 42px; min-width: 150px; font-size: 13.5px; border-radius: 999px; padding: 0 16px; }
.filters .sp { margin-left: auto; }
.day { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em; padding: 18px 10px 6px; }
.tx { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 16px; cursor: pointer; width: 100%;
  background: none; border: none; text-align: left; color: inherit; font: inherit; transition: background .12s; }
.tx:hover { background: var(--surface-2); }
.tx-ava { width: 46px; height: 46px; border-radius: 15px; background: var(--gold-weak); color: var(--gold-ink); display: grid; place-items: center;
  font-weight: 800; font-size: 14px; flex: none; position: relative; letter-spacing: .02em; }
.tx-ava .fl { position: absolute; right: -5px; bottom: -5px; font-size: 13px; line-height: 1; background: var(--surface); border-radius: 50%; padding: 3px; }
.tx-main { flex: 1; min-width: 0; }
.tx-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt { text-align: right; flex: none; }
.tx-amt .usd { font-weight: 800; font-size: 15px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tx-amt .loc { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tx .badge { flex: none; min-width: 104px; justify-content: center; }
.tx .chev { color: var(--ink-3); flex: none; }
@media (max-width: 640px) { .tx .badge, .tx .chev { display: none; } .tx-dot { display: inline-block !important; } }
.tx-dot { display: none; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; }
.tx-dot.ok { color: var(--good); } .tx-dot.pending { color: var(--amber); } .tx-dot.fail { color: var(--red); } .tx-dot.wait { color: var(--gold); }
.more-row { display: flex; justify-content: center; padding-top: 14px; }

/* ---------- Toasts ---------- */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { background: var(--navy); color: var(--on-dark); padding: 13px 18px; border-radius: 16px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; max-width: 360px; display: flex; align-items: center; gap: 10px; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good-on-dark); flex: none; }
.toast.err::before { background: var(--red-on-dark); }
.toast.in { opacity: 1; transform: translateY(0); }
:root[data-theme="dark"] .toast { background: var(--surface-3); }
@media (max-width: 900px) { .toast-wrap { left: 16px; right: 16px; bottom: 96px; } .toast { max-width: none; } }

/* ---------- Drawer (detalle de pago) ---------- */
.drawer-scrim { position: fixed; inset: 0; background: rgba(8,12,24,.5); z-index: 90; opacity: 0; animation: fade .18s forwards; }
@keyframes fade { to { opacity: 1; } }
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 460px; max-width: calc(100vw - 24px); background: var(--surface);
  border-radius: var(--r-xl); z-index: 91; box-shadow: var(--shadow-lg); padding: 28px; overflow-y: auto;
  transform: translateX(110%); animation: slidein .26s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes slidein { to { transform: translateX(0); } }
.drawer .dclose { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2);
  border: none; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.drawer h3 { font-size: 21px; margin: 0; }
.drawer-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-right: 44px; }
.drawer-amt { background: var(--surface-2); border-radius: 20px; padding: 18px 20px; margin-bottom: 6px; }
.drawer-amt .usd { font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.drawer-amt .loc { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.drawer-amt .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 16px 0; font-size: 13.5px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; word-break: break-word; font-weight: 600; }
@media (max-width: 900px) { .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; max-height: 88vh;
  border-radius: 28px 28px 0 0; transform: translateY(100%); animation: sheetin .26s cubic-bezier(.2,.8,.2,1) forwards; } }

/* Aprobaciones: panel de decisión */
.tbl tr.row-open td { border-bottom: none; }
.decision-row td { background: var(--surface-2); }
.decision { padding: 6px 6px 10px; max-width: 640px; }
.dl.dl-inline { margin: 4px 0 12px; }
.dl.dl-inline dd { text-align: left; }
.tbl .note { font-style: italic; margin-top: 3px; max-width: 280px; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 14px 0 0; }
.timeline li { position: relative; padding: 0 0 20px 28px; }
.timeline li:before { content: ""; position: absolute; left: 3px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-2); box-sizing: border-box; }
.timeline li.done:before { background: var(--good); border-color: var(--good); }
.timeline li.fail:before { background: var(--red); border-color: var(--red); }
.timeline li.active:before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-weak); }
.timeline li:not(:last-child):after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 2px; width: 2px; background: var(--line); border-radius: 1px; }
.timeline .tl-lab { font-size: 14px; font-weight: 700; color: var(--ink); }
.timeline .tl-sub { font-size: 12.5px; color: var(--ink-3); }

/* ---------- Nuevo envío (flujo wallet) ---------- */
.pick .tx-main { min-width: 0; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-head h3 { margin: 0; }
.card.dim { opacity: .55; }
.search { margin-bottom: 12px; border-radius: 999px; padding: 0 18px; }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.pick { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; width: 100%; text-align: left; color: inherit; font: inherit; transition: border-color .15s, background .15s; }
.pick:hover { border-color: var(--line-2); background: var(--surface-2); }
.pick.on { border-color: var(--gold); background: var(--gold-weak); }
.pick-cur { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); flex: none; }
.pick-check { width: 22px; flex: none; color: var(--gold-ink); }
/* El clon invisible del valor define el ancho: el campo mide exactamente lo que se escribió. */
.summary { background: var(--hero); color: var(--on-dark); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow-lg); }
.btn.gold:disabled { opacity: .4; }

/* ---------- Fondos ---------- */
.fund-hero .bal { margin-top: 8px; }
.fund-steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 26px; }
.fund-step { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px; padding: 14px; }
.fund-step .n { width: 28px; height: 28px; border-radius: 9px; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.fund-step b { display: block; font-size: 14px; }
.fund-step span:not(.n) { font-size: 12.5px; color: rgba(255,255,255,.6); }
.fund-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.bank { display: grid; gap: 10px; }
.bank-field { background: var(--surface-2); border-radius: 16px; padding: 12px 12px 12px 16px; }
.bank-row { display: flex; align-items: center; gap: 12px; }
.bank-val { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 16px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.copy-pill { height: 34px; padding: 0 16px; border-radius: 999px; border: none; background: var(--gold); color: var(--on-gold); font-weight: 800; font-size: 13px; cursor: pointer; flex: none; transition: filter .15s; }
.copy-pill:hover { filter: brightness(1.05); }
.copy-pill.ok { background: var(--good-bg); color: var(--good); }
.rails { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.rails .rail { margin: 0; }
.tx-ava.dep { background: var(--good-bg); color: var(--good); }
.card.sandbox { border-style: dashed; box-shadow: none; background: transparent; }
.fund-tabs { margin: 0 0 18px; }
.danger-note { display: flex; gap: 11px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; margin-bottom: 18px;
  background: var(--red-bg); color: var(--red); font-size: 13.5px; line-height: 1.5; border: 1px solid color-mix(in srgb, var(--red) 25%, transparent); }
.danger-note .ico { margin-top: 1px; }
.addr-box { display: flex; gap: 22px; align-items: center; background: var(--surface-2); border-radius: 20px; padding: 18px; }
.qr { width: 168px; height: 168px; flex: none; border-radius: 14px; background: var(--qr-bg); }
.addr-info { min-width: 0; flex: 1; }
.addr-val { font-size: 15px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; line-height: 1.5; margin-top: 4px; }
.addr-empty { text-align: center; padding: 28px 16px; background: var(--surface-2); border-radius: 20px; }
.addr-empty p { color: var(--ink-2); margin: 0 0 14px; }
@media (max-width: 640px) { .addr-box { flex-direction: column; align-items: stretch; } .qr { align-self: center; } }
@media (max-width: 980px) { .fund-grid { grid-template-columns: minmax(0, 1fr); } .fund-steps { grid-template-columns: 1fr; } }

/* ---------- Beneficiarios ---------- */
/* Selector de país por región (demo-mercados): etiqueta de grupo y tope por operación en cada chip. */
/* El país elegido como una línea (spec-rediseno, fase 1, punto 3): el formulario aparece en el lugar de la lista. */
.ben { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; }
@media (max-width: 640px) { .filters .search { max-width: none !important; flex: none; width: 100%; } }

/* Beneficiario wallet: validación en vivo y advertencia de red */
.addr-check { display: block; font-size: 12.5px; font-weight: 600; margin-top: 7px; }
.addr-check.ok { color: var(--good); }
.addr-check.bad { color: var(--red); }

.endorsements { display: grid; gap: 8px; }
.endorsement { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Acción a la derecha del encabezado de un paso (Nuevo beneficiario, Envío USD / Recibe) */
.step-head { flex-wrap: wrap; }
.step-head .step-action { margin-left: auto; }
.step-head .seg button { height: 32px; padding: 0 12px; font-size: 12.5px; }

/* Pop-up (Modal) */
.modal-scrim { position: fixed; inset: 0; background: rgba(8,12,24,.4); z-index: 95; animation: fade .18s both; }
.modal { position: fixed; z-index: 96; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow-y: auto; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-card); animation: modalin .2s cubic-bezier(.2,.8,.2,1) both; }
.modal > .modal-body { padding: 24px; }
.modal > .modal-body h3 { margin: 0 0 8px; padding-right: 44px; }
.modal > .card { margin: 0; max-width: none !important; box-shadow: none; }
.modal-close { position: absolute; top: 18px; right: 18px; z-index: 1; width: 36px; height: 36px; border-radius: 12px; border: none;
  background: var(--surface-2); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.modal .card-head { padding-right: 48px; }
@keyframes modalin { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (max-width: 900px) {
  .modal { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 90vh; transform: none; border-radius: 28px 28px 0 0; animation: sheetin .24s cubic-bezier(.2,.8,.2,1) both; }
  .modal > .card { border-radius: 28px 28px 0 0; }
}

tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }

/* ---------- Cobros (cuentas virtuales por moneda) ---------- */
.col-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.col-main, .col-side { display: grid; gap: 18px; min-width: 0; }
.col-main > .card, .col-side > .card { margin-bottom: 0; }
@media (max-width: 1080px) { .col-grid { grid-template-columns: minmax(0, 1fr); } }
.col-grid { margin-bottom: 18px; }
.col-min { display: grid; gap: 2px; padding: 16px 18px; border-radius: 16px; margin-bottom: 16px;
  background: var(--amber-bg); color: var(--amber); }
.col-min .k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.col-min .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.col-min .note { font-size: 13px; line-height: 1.45; }
.col-min.none { background: var(--surface-2); color: var(--ink-3); }
.col-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.col-share input { flex: 1 1 200px; min-width: 0; height: 36px; border-radius: 999px; padding: 0 14px; }
.col-dest { display: flex; gap: 12px; align-items: center; }
.col-dest b { display: block; }
.col-declare { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.col-declare input { width: auto; height: auto; margin-top: 3px; }
.col-rules { margin-top: 10px; }
.col-links { display: grid; gap: 8px; margin-top: 16px; }
.col-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.col-reason { font-size: 12px; margin-top: 4px; max-width: 220px; }
.col-danger { padding: 0 4px; }
.link.danger { color: var(--red); }
.btn.danger { background: var(--red); color: var(--on-dark); border-color: var(--red); }
.tbl-wrap { overflow-x: auto; }

/* Cotización firme: la tasa se movió de más y el pago no salió */
.btn.ghost-light { background: transparent; color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.25); justify-content: center; }
.drift-card { border-color: color-mix(in srgb, var(--amber) 40%, var(--line)); }

/* Saldos en dólares y euros digitales + declaración de custodia */
@media (max-width: 520px) { .bal-pair { grid-template-columns: 1fr; } }
.convert { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.convert input { flex: 1 1 140px; min-width: 0; height: 40px; border-radius: 999px; padding: 0 16px; }
.convert .alert { flex-basis: 100%; }
.custody { margin-top: 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); }
.custody ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.custody b { color: var(--ink); }

/* Conciliación: resúmenes */
.statement-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.statement-form .field { margin: 0; }
.statement-form input[type=date] { height: 38px; }
.col-statement { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.col-statement .muted { margin-right: auto; font-size: 13px; }

/* Estado con motivo nombrado: qué pasó, por qué, qué falta, cuánto tarda */
.reason-card { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--amber-bg); color: var(--amber); font-size: 13px; line-height: 1.45; }
.reason-card.final { background: var(--red-bg); color: var(--red); }
.reason-card > b { display: block; font-size: 14px; margin-bottom: 8px; }
.reason-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; }
.reason-card dt { font-weight: 700; opacity: .8; }
.reason-card dd { margin: 0; color: var(--ink-2); }
.reason-card dd.mono { font-size: 12px; word-break: break-word; }

/* Pedidos de información de Bridge (RFI) */
.rfi { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.rfi:first-of-type { border-top: 0; padding-top: 4px; }
.rfi-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rfi-answer { font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 8px 12px; white-space: pre-wrap; }

/* Cola de lotes: progreso */
.batch-progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 4px 0 14px; }
.batch-progress span { display: block; height: 100%; background: var(--gold); transition: width .3s ease; }

/* =====================================================================
   Inicio (docs/spec-dashboard.md). El navy es acento: solo el panel de
   convertir. El resto sobre la superficie, con líneas de 1px.
   ===================================================================== */
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-top .who { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; min-width: 0; }
.dash-top .acts { display: flex; gap: 10px; }

/* saludo: una línea, no un bloque */
.hello { font-size: 19px; font-weight: 700; letter-spacing: -.025em; margin-bottom: 18px; }
.hello small { font-weight: 400; color: var(--ink-3); font-size: 15px; margin-left: 8px; }

/* saldo: el destaque */
.bal-row { display: grid; grid-template-columns: 1.25fr .95fr; gap: 22px; align-items: stretch; }
.bal-box { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 24px 26px 22px;
  background: var(--bal-wash);
  box-shadow: 0 1px 2px rgba(17,26,46,.04), 0 20px 46px -30px rgba(17,26,46,.24), inset 0 0 0 1px var(--bal-ring); }
.bal-box::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--bal-accent); }
.bal-head { display: flex; align-items: center; justify-content: flex-start; gap: 6px; }
.bal-head button { background: none; border: none; color: var(--ink-3); cursor: pointer; padding: 4px; display: grid; place-items: center; border-radius: 8px; }
.bal-head button.eye { width: 34px; height: 34px; padding: 0; border-radius: 10px; }
.bal-head button:hover { color: var(--ink); background: var(--surface-2); }
/* Saldo tapado: asteriscos, más chicos y livianos que el número real. */
.mask { font-weight: 600; letter-spacing: .06em; font-size: .82em; }
.bal-total { font-size: clamp(38px, 5vw, 56px); font-weight: 800; letter-spacing: -.045em; line-height: 1;
  font-variant-numeric: tabular-nums; margin-top: 10px; }
.bal-total-sub { font-size: 13.5px; color: var(--ink-3); margin-top: 8px; }
.bal-split-lab { display: block; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.ccy { display: flex; align-items: center; gap: 14px; padding: 13px 0; }
.ccy + .ccy { border-top: 1px solid var(--line); }
.ccy .cd { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--ink-3); width: 34px; }
.ccy .amt { font-size: 25px; font-weight: 800; letter-spacing: -.032em; font-variant-numeric: tabular-nums; line-height: 1; }
.ccy .asset { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--ink-3); }
.ccy .asset b { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); font-weight: 500; }
.bal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.bal-foot .ready { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
.bal-foot .ready::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.bal-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* panel de convertir: el único navy de la pantalla */
.conv { background: var(--hero); color: var(--on-dark); border-radius: var(--r-lg); padding: 24px 26px 22px;
  display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.conv .label, .conv .eyebrow { color: rgba(255,255,255,.66); }
.conv-lab { display: block; font-size: 12px; color: rgba(255,255,255,.6); font-weight: 600; }
.conv .seg { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); margin-top: 10px; }
.conv .seg button { color: var(--conv-ink-2); height: 32px; padding: 0 15px; gap: 8px; display: inline-flex; align-items: center; }
.conv .seg button.on { background: var(--on-dark); color: var(--navy); box-shadow: none; }
:root[data-theme="dark"] .conv .seg button.on { background: var(--on-dark); color: var(--navy); }
.conv .seg svg.flag { width: 20px; height: 13.5px; border-radius: 2.5px; }
.conv .amount { margin-top: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r); padding: 14px 18px; display: flex; align-items: center; gap: 10px; }
.conv .amount:focus-within { border-color: var(--gold); background: rgba(255,255,255,.12); }
.conv .amount .sym { font-size: 30px; font-weight: 800; color: var(--conv-sym); line-height: 1; }
.conv .amount input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--on-dark);
  font-family: inherit; font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1;
  font-variant-numeric: tabular-nums; padding: 0; height: auto; box-shadow: none; }
.conv .amount input::placeholder { color: var(--conv-ph); }
.conv .amount input:disabled { opacity: .6; }
.conv .amount .max { border: 0; background: rgba(255,255,255,.12); color: var(--conv-max); font-family: inherit;
  font-size: 12px; font-weight: 800; border-radius: 999px; padding: 6px 11px; cursor: pointer; flex: none; }
.conv .amount .max:hover:not(:disabled) { background: rgba(255,255,255,.2); color: var(--on-dark); }
.conv .amount .max:disabled { opacity: .45; cursor: not-allowed; }
.conv-to { border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px; }
.conv-to .v { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 30px; font-weight: 800;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1; }
.conv-rate { font-family: var(--font-mono); font-size: 12.5px; color: rgba(255,255,255,.66); margin-top: 10px; }
.conv .btn.gold:hover:not(:disabled) { background: var(--gold-2); }
.conv-fee { font-size: 12.5px; color: rgba(255,255,255,.58); margin-top: auto; }
.conv-off { font-size: 12.5px; color: rgba(255,255,255,.72); }

/* tabla con hairlines: el patrón para todas las listas de la app. Por ahora como modificador
   (.tbl.tbl-hair): .tbl ya la usan Lotes, Equipo, Aprobaciones y Cobros con otro padding, y no se
   tocan hasta que migren. Cuando migren, esto pasa a ser .tbl. */
.tbl.tbl-hair { width: 100%; border-collapse: collapse; }
.tbl.tbl-hair th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); padding: 14px 0 11px; border-bottom: 1px solid var(--line); background: none; white-space: nowrap; }
.tbl.tbl-hair td { font-size: 15px; padding: 15px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl-hair .nm { display: block; font-size: 15.5px; font-weight: 700; }
.tbl-hair .num { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-hair .mut { font-size: 13.5px; color: var(--ink-3); }
.tbl-hair .who .mut { display: block; }
.tbl-hair .rl { display: block; font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-3); }
.tbl-hair .badge { font-size: 12.5px; padding: 5px 11px; }
.tbl.tbl-hair th + th, .tbl.tbl-hair td + td { padding-left: 18px; }
.tbl.tbl-hair tr:last-child td { border-bottom: 0; }
.tbl.tbl-hair th.r, .tbl.tbl-hair td.r { text-align: right; }
.tbl-hair .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tbl-hair .who b { display: block; font-weight: 700; }
.tbl-hair .who small, .tbl-hair .sub { display: block; font-size: 12.5px; color: var(--ink-3); }
.tbl-hair .ref, .ref { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.tbl-hair .amt { font-weight: 700; white-space: nowrap; }
.tbl-hair tr.clickable { cursor: pointer; }
.tbl-hair tr.clickable:hover td { background: var(--surface-2); }
.ini { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-weak); color: var(--gold-ink); display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: none; }
.sec-link { background: none; border: none; padding: 0; color: var(--gold-ink); font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.sec-link:hover { text-decoration: underline; }

/* tarjeta por sección del inicio. Como modificador (.card.sect): .card ya la usan todas las pantallas con su
   propio padding y margen. */
.card.sect { padding: 0; overflow: hidden; margin: 26px 0 0; }
.card.sect > .hd { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card.sect > .hd h3 { font-size: 17.5px; margin: 4px 0 0; }
.card.sect > .hd .sp { margin-left: auto; }
.card.sect > .hd select { width: auto; height: 38px; min-width: 150px; font-size: 13.5px; border-radius: 999px; padding: 0 14px; }
.card.sect > .bd { padding: 6px 22px 14px; }
@media (max-width: 600px) {
  .card.sect > .hd .seg { max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .card.sect > .hd .seg::-webkit-scrollbar { display: none; }
  .card.sect > .hd .seg button { flex: none; }
}
.card.sect .more-row { padding-top: 10px; }
.spark-cell { width: 110px; }
.card.sect .tbl-wrap .tbl { min-width: 640px; }
.spark-cell .spark { display: inline-block; vertical-align: middle; }

/* avisos del inicio (pedidos de Bridge, aprobaciones): sobre la superficie, no en el navy */
.dash-alert { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: var(--ink);
  background: var(--gold-weak); border: 1px solid var(--gold-line); border-radius: var(--r); padding: 12px 16px; margin-bottom: 14px; cursor: pointer; }
.dash-alert > .ico:first-child { color: var(--gold-ink); }
.dash-alert .txt { flex: 1; font-weight: 700; }
.dash-alert .txt small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 500; }

@media (max-width: 1020px) { .bal-row { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .tbl-hair .hide-sm { display: none; } .tbl-hair .hide-sm + td, .tbl-hair th.hide-sm + th { padding-left: 18px; } }

/* =====================================================================
   Cuentas (docs/spec-app-v2.md, Alcance 1). El navy es el chip elegido.
   ===================================================================== */
:root[data-theme="dark"] .acc-chip.on { background: var(--surface-3); border-color: var(--gold-line); }

.card.acc-panel { padding: 0; overflow: hidden; margin: 0; }
.acc-hd { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.acc-title { min-width: 0; flex: 1; }
.acc-title h3 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.acc-title .rl { display: block; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.acc-help { position: relative; display: inline-flex; }
.acc-help > button { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-3);
  font: inherit; font-size: 12px; font-weight: 800; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.acc-help > button:hover { color: var(--ink); }
.acc-tip { position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: min(320px, 78vw); white-space: pre-line;
  background: var(--tip-bg); color: var(--tip-ink); font-size: 13px; font-weight: 500; line-height: 1.45; letter-spacing: 0;
  padding: 10px 12px; border-radius: 12px; box-shadow: var(--shadow-lg); }
.acc-dest { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 22px; background: var(--surface-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink-2); }
.acc-dest .seg { background: var(--surface); }
.acc-share { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 22px 16px; }
.acc-share input { flex: 1; min-width: 200px; }
.acc-extra { border-top: 1px solid var(--line); padding: 16px 22px; }
.acc-extra-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.acc-extra > p { margin: 6px 0 12px; }
.acc-sim { border-top: 1px dashed var(--line-2); padding: 14px 22px; display: grid; gap: 8px; }
.acc-sim .toolbar { margin: 0; }
.acc-danger { border-top: 1px solid var(--line); padding: 14px 22px; }

.tbl-hair .ini.own { background: var(--navy); color: var(--on-dark); }
/* Pie del panel de una cuenta: datos afirmativos y chicos (custodia, a qué tarifa se paga lo que entra). */
.acc-foot-line { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }


a.btn { text-decoration: none; }

/* =====================================================================
   Inicio: riel de monedas (docs/spec-app-v2.md, Alcance 2). La tarjeta
   elegida es el único navy de la pantalla.
   ===================================================================== */
.total { margin-bottom: 18px; }
.total .bal-total-sub:empty { display: none; }
.rail-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 14px 26px; margin: -6px -14px -12px; scroll-padding-left: 14px;
  scrollbar-width: none; }
.rail-row::-webkit-scrollbar { display: none; }
.wcard { flex: 0 0 min(330px, 82%); scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; text-align: left;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px 0;
  box-shadow: var(--shadow); cursor: pointer; font: inherit; transition: transform .12s, box-shadow .15s; }
.wcard:hover { transform: translateY(-1px); }
.wcard:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wcard.on { background: var(--hero); border-color: transparent; color: var(--on-dark); box-shadow: 0 12px 22px -16px rgba(11,21,38,.7); }
.wc-top { display: flex; align-items: center; gap: 10px; }
.wc-code { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.wcard.on .wc-code { color: rgba(255,255,255,.66); }
  display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.wc-amt { font-size: 33px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.wc-use { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.wcard.on .wc-use { color: rgba(255,255,255,.66); }
.wc-acts { display: flex; margin: auto -20px 0; border-top: 1px solid var(--line); }
.wcard.on .wc-acts { border-top-color: rgba(255,255,255,.14); }
.wc-acts button { flex: 1; height: 46px; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.wc-acts button + button { border-left: 1px solid var(--line); }
.wcard.on .wc-acts button + button { border-left-color: rgba(255,255,255,.14); }
.wc-acts button:hover { background: var(--surface-2); }
.wcard.on .wc-acts button:hover { background: rgba(255,255,255,.08); }
.wc-acts button.plus { flex: 0 0 56px; display: grid; place-items: center; color: var(--gold-ink); }
.wcard.on .wc-acts button.plus { color: var(--gold); }
.wcard.add { background: transparent; border: 1.5px dashed var(--line-2); box-shadow: none; padding-bottom: 18px; justify-content: center; }
.wcard.add:hover { background: var(--surface); }
.wc-add-ico { width: 36px; height: 36px; border-radius: 50%; background: var(--gold-weak); color: var(--gold-ink); display: grid; place-items: center; }
.wcard.add b { font-size: 16px; }
.wc-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.wc-flags svg.flag { width: 22px; height: 15px; border-radius: 3px; }
:root[data-theme="dark"] .wcard.on { border-color: var(--gold-line); }

.state-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.state-pills .pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 999px; font: inherit;
  font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.state-pills .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.state-pills .pill.wait { background: var(--gold-weak); border-color: var(--gold-line); color: var(--ink); cursor: pointer; }
.state-pills .pill.wait::before { background: var(--gold); }
.state-pills .pill.wait:disabled { cursor: default; }
.modal:has(> .conv) { width: min(480px, calc(100vw - 32px)); }
.modal > .conv { margin: 0; }
.modal > .conv .eyebrow { padding-right: 44px; }

/* =====================================================================
   Enviar en tres pasos (docs/spec-app-v2.md, Alcance 3). El navy es el
   resumen, pegado a la derecha.
   ===================================================================== */
.card.s2-step { margin: 0; }
.card.s2-step.dim { opacity: .55; }
.s2-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.s2-note .ico { color: var(--gold-ink); }
:root[data-theme="dark"] .s2-wallet.on, :root[data-theme="dark"] .ben-pick.on { border-color: var(--gold); }
:root[data-theme="dark"] .ben-pick .bp-check { color: var(--gold); }



/* App v3: el segmentado Un pago / Un lote va debajo del título de Enviar. */

/* =====================================================================
   App v3, Alcance 2: el encabezado del inicio es un solo bloque flotante,
   con el riel adentro. Todas las tarjetas de saldo en navy: el navy es la
   zona del riel, no una selección (que no cambiaba nada).
   ===================================================================== */
.home-hd { border-radius: var(--r-lg); padding: 22px 24px 4px; background: var(--surface); box-shadow: var(--home-hd-shadow); margin-bottom: 4px; }
.home-hd .hello { margin-bottom: 14px; }
.home-hd .total .eyebrow { color: var(--ink-2); }
.home-hd .bal-total { font-size: clamp(42px, 5.6vw, 60px); }
.home-hd .rail-row { margin: 0 -24px; padding: 8px 24px 20px; scroll-padding-left: 24px; }
.home-hd .state-pills { margin: 0 0 18px; }
.wcard:not(.add) { background: var(--hero); border-color: transparent; color: var(--on-dark); box-shadow: 0 12px 22px -16px rgba(11,21,38,.7); cursor: default; }
.wcard:not(.add):hover { transform: none; }
.wcard:not(.add) .wc-code, .wcard:not(.add) .wc-use { color: rgba(255,255,255,.66); }
.wcard:not(.add) .wc-acts { border-top-color: rgba(255,255,255,.14); }
.wcard:not(.add) .wc-acts button + button { border-left-color: rgba(255,255,255,.14); }
.wcard:not(.add) .wc-acts button:hover { background: rgba(255,255,255,.08); }
.wcard:not(.add) .wc-acts button.plus { color: var(--gold); }
:root[data-theme="dark"] .wcard:not(.add) { border-color: var(--gold-line); }
.wcard.add { background: var(--surface-2); }

/* App v3, Alcance 3: las dos maneras de usar la cuenta, dentro del panel y arriba de los datos; la
   elección de moneda solo en euros. */
.acc-dest-eur { padding: 16px 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 10px; }
.acc-dest-eur .seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); }
.acc-dest-eur .seg button { height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 14.5px; }
.acc-dest-eur .seg button .mono { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.acc-dest-eur .seg svg.flag { width: 20px; height: 13.5px; border-radius: 2.5px; }
/* Lo elegido va en navy, igual que el chip de moneda de arriba (spec-app-v4, punto 6). */
.acc-dest-eur .seg button.on { background: var(--navy); color: var(--on-dark); box-shadow: none; }
.acc-dest-eur .seg button.on .mono { color: var(--on-dark-2); }
:root[data-theme="dark"] .acc-dest-eur .seg button.on { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--gold-line); }
.acc-dest-eur p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* =====================================================================
   App v3, Alcance 4: Lotes sin escribir. Zona de soltar (vacío) y tabla
   de revisión (resultado). Pegar con ⌘V también carga.
   ===================================================================== */
.drop { min-height: 240px; border: 2px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px 20px; text-align: center;
  transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--gold); background: var(--gold-soft); }
.drop b { font-size: 19px; }
.drop-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); color: var(--gold-ink); display: grid; place-items: center;
  box-shadow: var(--shadow); }
.drop-hint { font-size: 13px; color: var(--ink-3); }
.batch2 .card.sect:first-of-type { margin-top: 0; }
.b-rows { font-size: 14px; font-weight: 500; }
.b-mets { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.b-mets > div { padding: 16px 22px; }
.b-mets > div + div { border-left: 1px solid var(--line); }
.b-mets .v { font-size: 28px; font-weight: 800; letter-spacing: -.035em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.b-mets .v.neg { color: var(--red); }
.b-tbl tr.bad td { background: var(--red-bg); }
.b-tbl tr.bad td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.b-err { color: var(--red); font-size: 13px; font-weight: 600; }
.b-note { margin: 14px 0 0; }
.b-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.b-fine { margin: 12px 0 2px; font-size: 13px; }
@media (max-width: 600px) {
  .b-mets { grid-template-columns: 1fr; }
  .b-mets > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
.b-tbl td:first-child, .b-tbl th:first-child { padding-left: 12px; }
.seg.seg-sm button { height: 30px; font-size: 13px; padding: 0 12px; }

/* App v3, Alcance 6: las herramientas de sandbox, al final de la pantalla. */
.sandbox-zone { margin-top: 34px; padding-top: 18px; border-top: 1px dashed var(--line-2); display: grid; gap: 10px; }
.sandbox-zone .acc-sim { border: 0; padding: 0; }
.acc-note { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 400; color: var(--ink-3); font-family: var(--font-sans); }

/* =====================================================================
   Cierre, Alcance 3: segundo factor (alta en Ajustes y paso del login).
   ===================================================================== */
.otp-setup { display: flex; gap: 20px; align-items: center; margin: 4px 0 16px; }
.otp-key { display: grid; gap: 8px; min-width: 0; }
.otp-key code { font-size: 14px; letter-spacing: .04em; word-break: break-all; color: var(--ink); }
.otp-input { font-size: 20px; letter-spacing: .2em; }
.rcodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin: 4px 0 16px; padding: 14px 18px 14px 36px;
  background: var(--surface-2); border-radius: var(--r); font-size: 14px; }
@media (max-width: 640px) { .otp-setup { flex-direction: column; align-items: stretch; } .otp-setup .qr { align-self: center; } }


/* =====================================================================
   Cierre, Alcance 4: kit de desarrollador (claves de API y webhooks, en Ajustes).
   ===================================================================== */
.dev-secret { display: grid; gap: 8px; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--r);
  background: var(--gold-weak); border: 1px solid var(--gold-line); font-size: 13.5px; }
.dev-secret code { font-size: 13px; word-break: break-all; color: var(--ink); }
.dev-form { display: grid; gap: 4px; margin-bottom: 16px; }
.dev-form.row-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.dev-scopes { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.dev-scopes label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dev-scopes input { width: auto; height: auto; }
.dev-hook { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.dev-hook .mono { flex: 1; min-width: 0; word-break: break-all; }
.dev-tbl td { vertical-align: top; }
.dev-detail { display: grid; gap: 6px; padding: 6px 0 10px; }
.dev-detail pre { margin: 0; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-all; font-size: 12px;
  background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }

/* pricing v2, Alcance 3: un depósito con cargo por recepción (wire) muestra recibido, cargo y disponible. */

/* pricing v2, Alcance 4: el precio en tres líneas, dentro del resumen navy. */
/* El segundo corte del mismo total (por origen del saldo) va en su propio bloque: apilado con el primero se
   lee como una suma que no cierra, porque son la misma plata mirada de dos maneras. */

/* spec-yellowcard, Alcance 4: tesorería (/ops). */
.ops-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ops-boxes .card { margin: 0; }


/* =====================================================================
   REDISEÑO v2 "Aire" (PR 1): componentes y shell. Pisa lo anterior.
   ===================================================================== */
body { font-family: var(--font-sans); font-weight: 500; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-sans); font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.num, .tbl .amt { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); gap: 0; }
.eyebrow::before { display: none; }
.card, .card.sect { background: var(--surface); border: 0; border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.card.sect .hd { border-bottom: 1px solid var(--divider); }
.btn { height: 48px; padding: 0 20px; border-radius: var(--r-btn); border: 0; background: var(--chip); color: var(--text); font-weight: 600; font-size: 15px; box-shadow: none; transition: transform .12s, background .15s; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn.primary, .btn.gold { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.btn.primary:hover, .btn.gold:hover { background: var(--primary); filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.sm { height: 40px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .45; transform: none; }
.link, .sec-link { border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
input, select, textarea { height: 50px; border: 0; border-radius: var(--r-input); background: var(--chip); color: var(--text); font-family: var(--font-sans); font-weight: 600; font-size: 15px; padding: 0 14px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; box-shadow: none; border: 0; }
input::placeholder, textarea::placeholder { color: var(--muted-2); font-weight: 500; }
.field .lab, .lab { font-size: 12px; font-weight: 600; color: var(--muted); }
.seg { background: transparent; border: 0; padding: 0; gap: 6px; }
.seg button { height: 32px; padding: 0 13px; border-radius: var(--r-chip); background: var(--chip); color: var(--text); font-weight: 500; font-size: 12.5px; }
.seg button.on { background: var(--primary); color: var(--on-primary); box-shadow: none; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: var(--r-chip); background: var(--chip); color: var(--text); font-size: 12.5px; font-weight: 500; white-space: nowrap; border: 0; font-family: inherit; cursor: pointer; text-decoration: none; }
.chip.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 8px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--chip); color: var(--text); }
.pill.wait { background: var(--warn-bg); color: var(--warn-text); }
.pill.err { background: var(--err-bg); color: var(--err-text); }
.badge { padding: 0 9px; height: 22px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.badge::before { display: none; }
.badge.ok { background: var(--chip); color: var(--text); }
.badge.pending, .badge.wait { background: var(--warn-bg); color: var(--warn-text); }
.badge.fail { background: var(--err-bg); color: var(--err-text); }
.tbl th { font-size: 11.5px; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: .4px; }
.tbl td { border-bottom: 1px solid var(--divider); }
.alert.err { background: var(--err-bg); color: var(--err-text); border: 0; }
.alert.ok { background: var(--chip); color: var(--text); }
.empty, .spinner, .sect-note, .muted { color: var(--muted); }
.avatar { background: var(--chip); color: var(--text); border-radius: 50%; font-weight: 600; }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--chip); color: var(--on-pastel); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.av.emoji { font-size: 20px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* --- Shell web: barra lateral sin fondo, ítem activo como tarjeta --- */
.app { background: var(--bg); }
.sidebar { width: var(--sidebar-w); background: transparent; border: 0; padding: 32px 24px; gap: 4px; }
.sidebar .brand { padding: 0 12px 32px; font-size: 17px; font-weight: 600; gap: 10px; }
.nav-item { height: 44px; padding: 0 12px; border-radius: 14px; color: var(--muted); font-weight: 500; font-size: 14px; gap: 12px; transition: none; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); font-weight: 600; }
.nav-item .ico { color: currentColor; }
.nav-item.active .ico { color: currentColor; }
.side-send { margin-top: 24px; height: 44px; font-size: 14px; width: 100%; justify-content: center; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 0; }
.sidebar-foot .nav-item { color: var(--muted); }
.sidebar-foot .me { border-top: 1px solid var(--divider); margin-top: 8px; padding: 12px 12px 0; gap: 10px; }
.me .avatar { width: 34px; height: 34px; font-size: 11px; }
.me .name { font-size: 13px; font-weight: 600; } .me .org { font-size: 11px; color: var(--muted); }
.foot-actions { padding: 10px 8px 0; gap: 6px; }
.icon-btn { border: 0; background: var(--chip); color: var(--text); border-radius: 12px; height: 36px; width: 36px; }
.icon-btn:hover { background: var(--surface-3); }
.foot-actions .icon-btn.wide { font-weight: 600; }
.lang-toggle { background: var(--chip); }
.lang-toggle button.on { background: var(--surface); color: var(--text); box-shadow: none; }
.badge-count { background: var(--gold); color: #121a2e; }
.main { padding: 32px 44px; }
.main-inner { max-width: 1200px; margin: 0 auto; }

/* --- Shell celular: tab bar de cinco con Enviar circular, sin fondo ni borde --- */
.tab { display: none; }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 0 20px calc(104px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0; margin-bottom: 6px; }
  .topbar .brand { font-size: 17px; font-weight: 600; }
  .topbar .avatar { width: 36px; height: 36px; font-size: 11px; }
  .app.route-dashboard .topbar, .app.route-activity .topbar { display: none; }
  .tab { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 20px calc(12px + env(safe-area-inset-bottom));
    justify-content: space-around; align-items: center; background: var(--bg); }
  .tab::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 16px; background: linear-gradient(to bottom, rgba(247,247,251,0), var(--bg)); pointer-events: none; }
  :root[data-theme="dark"] .tab::before { background: linear-gradient(to bottom, rgba(31,37,55,0), var(--bg)); }
  .tab button { width: 64px; border: 0; background: none; color: var(--muted-2); font: inherit; font-size: 10.5px; font-weight: 500; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 0; }
  .tab button.active { color: var(--text); font-weight: 600; }
  .tab .send-fab { width: 52px; height: 52px; border-radius: 26px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(18,26,46,.5); }
  .tab button:active .send-fab { transform: scale(.97); }
  .sheet { border-radius: var(--r-card) var(--r-card) 0 0; box-shadow: var(--shadow-lg); }
  .sheet .grab { background: var(--line-2); }
  .sheet .nav-item { height: 48px; }
  .page-head h2 { font-size: 22px; }
  .toast-wrap { bottom: calc(104px + env(safe-area-inset-bottom)); }
}
@media (min-width: 901px) { .only-m { display: none !important; } }
@media (max-width: 900px) { .only-d { display: none !important; } }

/* --- Movimientos: fila con avatar, título, detalle y monto (celular) --- */
.list { padding: 0; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--divider); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; color: var(--text); font: inherit; cursor: pointer; }
.li:first-child { border-top: 0; }
.li .li-main { flex: 1; min-width: 0; }
.li .t { margin: 0; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .d { margin: 2px 0 0; font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .amt { margin: 0; font-size: 14.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.li .sub { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); font-weight: 500; text-align: right; white-space: nowrap; }
.li .pill { margin-top: 3px; }
.group-lab { margin: 18px 0 0; font-size: 12px; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: .4px; }
.group-lab + .card { margin-top: 8px; }

/* --- Inicio --- */
.h-top { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; }
.h-user { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.h-user .av { width: 36px; height: 36px; font-size: 11px; }
.h-user small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.h-user b { display: block; font-size: 15px; font-weight: 600; }
.h-bell { position: relative; width: 38px; height: 38px; border-radius: 19px; background: var(--surface); box-shadow: var(--shadow-card); border: 0; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.h-bell .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 4px; background: var(--gold); }
.h-total { padding-top: 18px; }
.h-total .row2x { display: flex; justify-content: space-between; align-items: baseline; }
.h-total .lab { font-size: 13px; color: var(--muted); font-weight: 500; }
.h-total .n { font-size: 12px; color: var(--muted-2); font-weight: 500; }
.big-amt { margin: 4px 0 0; font-size: 40px; font-weight: 600; letter-spacing: -1.6px; line-height: 1; font-variant-numeric: tabular-nums; }
.big-amt span { font-size: 20px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.big-amt .eye { border: 0; background: none; color: var(--muted-2); margin-left: 8px; vertical-align: middle; cursor: pointer; padding: 0; }
.carousel { display: flex; gap: 12px; padding: 18px 20px 0; margin: 0 -20px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; overscroll-behavior: contain; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
.carousel::after { content: ''; flex: none; width: 8px; } /* el padding derecho se pierde al scrollear: esto lo repone */
.carousel::-webkit-scrollbar { display: none; }
.gc-wrap { flex: none; scroll-snap-align: start; position: relative; width: 318px; height: 182px; }
.gc-glow { position: absolute; inset: 14px -10px -10px 22px; border-radius: 24px; background: linear-gradient(135deg, rgba(211,160,60,.55), rgba(18,26,46,.6)); filter: blur(14px); opacity: .55; }
.gc { position: absolute; inset: 0; border-radius: 24px; padding: 20px 22px; box-sizing: border-box; color: #fff; text-align: left; border: 0; font: inherit; cursor: pointer; overflow: hidden;
  background: linear-gradient(135deg, rgba(24,36,66,.96) 0%, rgba(14,22,42,.96) 55%, rgba(60,48,30,.92) 100%);
  box-shadow: 0 24px 50px -20px rgba(18,26,46,.55), inset 0 1px 0 rgba(255,255,255,.18); display: flex; flex-direction: column; justify-content: space-between; }
.gc .glow-a { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(211,160,60,.45), rgba(211,160,60,0) 70%); right: -80px; top: -120px; }
.gc .glow-b { position: absolute; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.12), rgba(255,255,255,0) 70%); left: -60px; bottom: -90px; }
.gc .gc-top { display: flex; justify-content: space-between; align-items: center; position: relative; }
.gc .gc-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.gc .gc-last { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 1.5px; color: rgba(255,255,255,.75); font-weight: 500; font-variant-numeric: tabular-nums; }
.gc .gc-last.none { letter-spacing: 0; color: rgba(255,255,255,.45); }
.gc .gc-bot { position: relative; }
.gc .gc-lab { margin: 0; font-size: 11.5px; color: rgba(255,255,255,.7); font-weight: 500; }
.gc .gc-row { display: flex; justify-content: space-between; align-items: flex-end; }
.gc .gc-amt { margin: 2px 0 0; font-size: 30px; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.gc .gc-code { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: #e6b75a; }
.gc-add { flex: none; width: 120px; height: 182px; border-radius: 24px; border: 1px dashed var(--line-2); background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; scroll-snap-align: start; }
.dots { display: flex; justify-content: center; gap: 6px; padding-top: 14px; }
.dots span { width: 7px; height: 7px; border-radius: 4px; background: var(--line-2); }
.dots span.on { background: var(--gold); }
.h-actions { display: flex; gap: 10px; padding-top: 16px; }
.h-actions .btn { flex: 1; height: 48px; font-size: 14px; justify-content: center; }
.h-actions .btn.primary { flex: 1.4; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; padding: 22px 0 10px; }
.sec-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
/* web */
.w-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.w-top .date { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.w-top h1 { margin: 2px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -.5px; }
.w-top .tools { display: flex; align-items: center; gap: 12px; }
.search { height: 40px; border-radius: 12px; background: var(--chip); display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--muted-2); font-size: 13px; font-weight: 500; width: 320px; }
.search input { flex: 1; height: 40px; background: none; padding: 0; border-radius: 0; font-size: 13px; font-weight: 500; min-width: 0; }
.search input:focus { outline: none; }
.w-bell { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); border: 0; color: var(--text); display: grid; place-items: center; position: relative; cursor: pointer; }
.w-bell .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 4px; background: var(--gold); }
.w-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px; margin-top: 24px; }
.w-grid .gc-wrap { width: auto; height: 182px; }
.w-total { display: flex; flex-direction: column; justify-content: space-between; }
.w-total .lab { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.w-total { padding: 22px; }
.w-total .big-amt { font-size: 48px; letter-spacing: -1.9px; }
.w-total .big-amt span { font-size: 22px; }
.w-total .h-actions { padding-top: 16px; }
.w-total .h-actions .btn { height: 44px; font-size: 13.5px; }
.w-card { margin-top: 16px; display: flex; flex-direction: column; }
.w-card .w-hd { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; gap: 10px; flex-wrap: wrap; }
.w-card .w-hd .h2 { margin: 0; font-size: 15px; font-weight: 600; }
.w-card .w-hd .row { display: flex; align-items: center; gap: 6px; }
.w-card .w-hd .link { margin-left: 10px; }
.tr-h, .tr { display: grid; column-gap: 12px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--divider); font-size: 14px; }
.tr-h { padding: 10px 20px; font-size: 11.5px; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: .4px; }
.tr { border: 0; border-bottom: 1px solid var(--divider); background: none; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; font-size: 14px; }
.tr:last-child { border-bottom: 0; }
.tr .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tr .who .av { width: 36px; height: 36px; font-size: 11px; }
.tr .who .av.emoji { font-size: 18px; }
.tr .who .nm { margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr .who .sub { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.tr .pref { text-align: right; font-size: 11px; color: var(--muted-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr .rl { font-weight: 500; color: var(--muted); }
.tr .date { color: var(--muted); font-weight: 500; }
.tr .money { text-align: right; }
.tr .money p { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.tr .money .sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.month-line { display: flex; gap: 28px; align-items: center; margin-top: 14px; padding: 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; flex-wrap: wrap; }
.month-line b { font-weight: 600; color: var(--text); }
.month-line .link { margin-left: auto; font-size: 12.5px; }
@media (max-width: 1100px) { .w-grid { grid-template-columns: 1fr 1fr; } .w-grid .w-total { grid-column: 1 / -1; } }

/* --- Actividad --- */
.a-top { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; }
.a-top h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.a-search { margin-top: 14px; width: 100%; }
.a-search input { font-size: 14px; }
.chips-row { display: flex; gap: 6px; padding-top: 12px; overflow-x: auto; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chips-row .chip { flex: none; }
.chips-row .vsep { width: 1px; height: 22px; background: var(--line-2); margin: 5px 4px; flex: none; }
.chips-row select.chip { appearance: none; -webkit-appearance: none; height: 32px; padding: 0 28px 0 13px; width: auto; background: var(--chip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237b8194' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 11px center; font-size: 12.5px; }
.pager { padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: auto; }
.pager .row { display: flex; gap: 6px; }
.pager .chip { height: 28px; padding: 0 10px; }
@media (max-width: 900px) {
  .a-top { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { .btn, .tab button { transition: none; } }

/* Oscuro: el primario es claro (--primary), nunca dorado; el ítem activo del menú es la superficie. */
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.gold { background: var(--primary); color: var(--on-primary); box-shadow: none; }
:root[data-theme="dark"] .nav-item.active { background: var(--surface); }

/* =====================================================================
   REDISEÑO v2 (PR 2): Enviar, Cuentas, Beneficiarios, Login, avatar.
   ===================================================================== */
.page-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.h2 { margin: 0; font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); } .muted-2 { color: var(--muted-2); }
.link.muted { color: var(--muted); font-weight: 600; }
.link.danger { color: var(--err-text); }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.row-btns .btn { min-width: 120px; justify-content: center; }
.btn.danger { background: var(--err-bg); color: var(--err-text); }
.btn.sm.pill-btn { height: 36px; border-radius: 18px; padding: 0 14px; font-size: 13px; }
.chip.tall { height: 40px; border-radius: 12px; }
.chip.sq { width: 30px; padding: 0; justify-content: center; height: 30px; }
.chip svg.flag { width: 16px; height: 11px; border-radius: 2px; }
.icon-btn.ghost { background: transparent; }
.icon-btn.tiny { width: 28px; height: 28px; border-radius: 9px; background: var(--chip); }
.note { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--chip); font-size: 12.5px; font-weight: 500; line-height: 1.45; color: var(--text); }
.note.warn { background: var(--warn-bg); color: var(--warn-text); }
.note.err { background: var(--err-bg); color: var(--err-text); }
.note.drift b, .note.drift span { display: block; } .note.drift .kv { padding: 8px 0; } .note.drift .kv .muted { color: inherit; opacity: .8; }
.card.dashed { box-shadow: none; border: 1px dashed var(--line-2); background: transparent; }
.card.pad-card { padding: 24px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--divider); font-size: 13.5px; flex-wrap: wrap; }
.kv:first-child { border-top: 0; }
.kv .v { font-weight: 600; text-align: right; max-width: 62%; min-width: 0; display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; overflow-wrap: anywhere; }
.kv .kv-val { border: 0; background: none; font: inherit; font-weight: 600; color: var(--text); padding: 0; cursor: default; text-align: right; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.kv .kv-val.mono { font-family: var(--font-mono); font-size: 13px; cursor: pointer; }
.kv .acc-note { flex-basis: 100%; font-size: 11.5px; color: var(--muted-2); font-weight: 500; }
.kv-card { padding: 4px 16px; }
.kv-card.pad { padding: 18px 22px; }
.kv-card .h2 { margin-bottom: 8px; }
.kv-list { margin-top: 12px; border-top: 1px solid var(--divider); }
.kv-list .kv { padding: 8px 0; border-top: 0; font-size: 13px; }
.group-lab + .list, .group-lab + .nb-chips, .group-lab + .recents { margin-top: 8px; }
.li.static { cursor: default; }
.li .amt.small { font-size: 13px; }
.spinner { padding: 24px 0; }

/* --- Cabecera de paso (celular) y barras --- */
.step-head { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; min-height: 44px; }
.step-head.right { justify-content: flex-end; }
.step-head b { font-size: 15px; font-weight: 600; }
.step-head .step-n, .w-top .step-n { font-size: 12px; font-weight: 600; color: var(--muted-2); background: none; width: auto; height: auto; border-radius: 0; display: inline; }
.step-bars { display: flex; gap: 4px; margin-top: 12px; }
.step-bars span { flex: 1; height: 3px; border-radius: 2px; background: var(--line-2); }
.step-bars span.on { background: var(--primary); }
.w-top .link.muted { font-size: 13px; }
.w-top h1 { margin-top: 6px; }

/* --- Avatar y selector --- */
.av { position: relative; }
.av.plus { background: var(--primary); color: var(--on-primary); font-size: 20px !important; font-weight: 500; }
.av .av-flag { position: absolute; bottom: -2px; right: -4px; line-height: 0; }
.av .av-flag svg.flag { width: 18px; height: 13px; border-radius: 3px; box-shadow: 0 0 0 2px var(--surface); }
.avf { position: relative; display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; }
.avf-btn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.avf-edit { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 11px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.avf-lab { font-size: 13px; font-weight: 600; color: var(--muted); }
.avp-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(8,12,24,.35); }
.avp { position: absolute; z-index: 91; left: 0; top: calc(100% + 8px); width: 320px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-lg); padding: 16px; }
.avp-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.avp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avp-cell { aspect-ratio: 1; border: 0; border-radius: 50%; font-size: 22px; cursor: pointer; display: grid; place-items: center; }
.avp-cell.on { outline: 2px solid var(--gold); outline-offset: 2px; }
.avp-search { display: flex; gap: 8px; margin-top: 12px; }
.avp-search input { flex: 1; height: 40px; font-size: 14px; min-width: 0; }
.avp-colors { display: flex; gap: 10px; margin: 14px 0 12px; }
.avp-color { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(18,26,46,.08); }
.avp-color.on { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 900px) {
  .avp { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: var(--r-card) var(--r-card) 0 0; padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); }
  .avp-grid { grid-template-columns: repeat(6, 1fr); }
}

/* --- Login --- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 640px 1fr; background: var(--bg); }
.auth-art { position: relative; overflow: hidden; background: var(--navy-2); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; }
.auth-art .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(211,160,60,.25); }
.auth-art .ring.r1 { width: 520px; height: 520px; right: -200px; bottom: -200px; }
.auth-art .ring.r2 { width: 360px; height: 360px; right: -120px; bottom: -120px; border-color: rgba(211,160,60,.18); }
.auth-art .brand { color: #fff; font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; position: relative; }
.auth-art-body { margin-top: auto; position: relative; }
.auth-art h1 { margin: 0; font-size: 40px; font-weight: 600; letter-spacing: -1.6px; line-height: 1.1; max-width: 480px; color: #fff; }
.auth-art p { margin: 18px 0 0; font-size: 16px; color: rgba(242,241,237,.75); font-weight: 500; line-height: 1.55; max-width: 460px; }
.auth-regions { margin-top: 28px; max-width: 460px; font-size: 13.5px; font-weight: 600; }
.auth-regions div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid rgba(242,241,237,.14); }
.auth-regions .rails { color: rgba(242,241,237,.65); font-weight: 500; text-align: right; }
.auth-foot { margin: 28px 0 0; font-size: 12px; color: rgba(242,241,237,.5); font-weight: 500; position: relative; }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; padding: 36px; margin: 0; }
.login-hd { display: flex; justify-content: space-between; align-items: center; }
.login-hd h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.login-card .sub { margin: 6px 0 22px; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.login-card .field { margin-top: 14px; }
.login-card .btn.primary { width: 100%; justify-content: center; margin-top: 22px; }
.login-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 13px; flex-wrap: wrap; }
.login-hint { margin: 18px 0 0; font-size: 12px; color: var(--muted-2); text-align: center; line-height: 1.5; }
.auth-m-top, .auth-m-hero { display: none; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 100dvh; }
  .auth-art { display: none; }
  .auth-panel { align-items: stretch; justify-content: flex-start; padding: 10px 24px calc(24px + env(safe-area-inset-bottom)); min-height: 100dvh; }
  .auth-m-top { display: flex; justify-content: space-between; align-items: center; }
  .auth-m-top .brand { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
  .auth-m-hero { display: block; padding-top: 40px; }
  .auth-m-hero h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -1.1px; line-height: 1.15; }
  .auth-m-hero p { margin: 14px 0 0; font-size: 14.5px; color: var(--muted); font-weight: 500; line-height: 1.5; }
  .auth-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
  .auth-chips .chip { height: 30px; font-size: 12px; }
  .login-card { margin-top: auto; padding: 0; box-shadow: none; background: transparent; border-radius: 0; max-width: none; }
  .login-hd h2 { display: none; }
  .login-card .sub { display: none; }
  .login-card .btn.primary { margin-top: 6px; }
}

/* --- Enviar --- */
.send .who-col { max-width: 760px; }
.recents { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.recents::-webkit-scrollbar { display: none; }
.recent { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; font: inherit; color: var(--text); font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; cursor: pointer; padding: 0; }
.new-ben { margin-top: 18px; border-top: 0; }
.ben-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; }
.ben-row .link { flex: none; }
.send-grid { display: grid; grid-template-columns: 1fr 420px; gap: 24px; margin-top: 24px; }
.send-main { display: flex; flex-direction: column; gap: 12px; }
.send-side { display: flex; flex-direction: column; gap: 16px; }
.amt-card { padding: 16px; }
.amt-card .lab { margin: 0 0 4px; }
.amt-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.amt-in { display: flex; align-items: baseline; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.amt-in .sym { font-size: 34px; font-weight: 600; letter-spacing: -1.4px; color: var(--text); }
.amt-in input { width: 100%; min-width: 0; height: auto; font-size: 34px; font-weight: 600; letter-spacing: -1.4px; background: none; padding: 0; border-radius: 0; font-variant-numeric: tabular-nums; }
.amt-in input:focus { outline: none; }
.amt-in input::placeholder { color: var(--muted-2); font-weight: 600; }
.amt-out { font-size: 34px; font-weight: 600; letter-spacing: -1.4px; font-variant-numeric: tabular-nums; }
.amt-out .dec { color: var(--muted); }
.amt-out.stale { opacity: .45; }
.amt-row .chip { height: 36px; font-size: 14px; flex: none; width: 110px; justify-content: center; font-weight: 600; }
.amt-row select.chip { appearance: none; -webkit-appearance: none; padding-right: 26px; background: var(--chip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237b8194' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.amt-meta { margin: 8px 0 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.amt-meta.neg { color: var(--err-text); }
.amt-meta .link { font-size: 12px; }
.amt-div { margin: 14px 0; border-top: 1px solid var(--divider); position: relative; height: 0; }
.amt-div span { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); display: grid; place-items: center; font-size: 14px; color: var(--muted); }
.send-foot { margin-top: 6px; }
.send-foot .btn { width: 100%; justify-content: center; }
.send-foot .btn + .btn { margin-top: 8px; height: 44px; color: var(--muted); }
.send-foot .row-btns .btn { width: auto; }
.send-foot .row-btns .btn.primary { min-width: 220px; }
.review-hero { padding: 28px 0 0; text-align: center; }
.review-hero p { margin: 0; font-size: 13px; font-weight: 600; }
.review-hero .big { margin: 6px 0; font-size: 38px; font-weight: 600; letter-spacing: -1.6px; font-variant-numeric: tabular-nums; }
.review-hero + .kv-card { margin-top: 22px; }
.send.review .send-main .card.pad-card .review-hero { padding-top: 8px; }
.done { max-width: 560px; margin: 0 auto; }
.done-hero { padding: 40px 0 0; text-align: center; }
.done-ring { width: 76px; height: 76px; border-radius: 38px; background: var(--navy-2); color: var(--gold); margin: 0 auto; display: grid; place-items: center; }
.done-hero h1 { margin: 22px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -.5px; }
.done-hero p { margin: 8px 0 0; font-size: 14px; color: var(--muted); font-weight: 500; line-height: 1.5; }
.done-hero p b { color: var(--text); font-weight: 600; }
.done .kv-card { margin-top: 28px; }
.done-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.done-btns .btn { justify-content: center; }
@media (max-width: 1100px) { .send-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .send-grid { margin-top: 14px; }
  .app.route-send .topbar, .app.route-send-batch .topbar, .app.route-beneficiaries .topbar, .app.route-accounts .topbar { display: none; }
  .ben-row { margin-top: 16px; }
}

/* --- Nuevo beneficiario --- */
.nb-kind { display: flex; background: var(--chip); border-radius: 12px; padding: 3px; margin-top: 12px; }
.nb-kind button { flex: 1; height: 34px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: transparent; }
.nb-kind button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.nb-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; margin-top: 22px; }
.nb-col { padding: 24px 28px; }
.nb-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.nb-region { margin-top: 4px; }
.nb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nb-chip { height: 34px; gap: 8px; }
.nb-chip .rl { font-size: 10.5px; color: var(--muted-2); font-weight: 600; }
.nb-chip.on { background: var(--warn-bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--gold); }
.nb-chip.on .rl { color: var(--muted); }
.nb-chosen { display: flex; align-items: center; gap: 12px; padding: 0 0 14px; }
.nb-chosen svg.flag.flag-lg { width: 32px; height: 22px; border-radius: 4px; }
.nb-step2 .field { margin-top: 12px; }
.nb-step2 .field .lab { margin-bottom: 6px; display: block; }
.nb-note { margin: 10px 0 0; font-size: 11.5px; color: var(--muted-2); font-weight: 500; line-height: 1.5; }
.nb-note.center { text-align: center; }
.nb-foot { margin-top: 16px; }
.nb-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; padding: 10px 20px calc(18px + env(safe-area-inset-bottom)); background: var(--bg); }
.nb-bar::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 16px; background: linear-gradient(to bottom, rgba(247,247,251,0), var(--bg)); pointer-events: none; }
:root[data-theme="dark"] .nb-bar::before { background: linear-gradient(to bottom, rgba(31,37,55,0), var(--bg)); }
.nb-bar-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.nb-bar-line span { display: inline-flex; align-items: center; gap: 6px; }
.nb-bar-line .muted { font-size: 12px; font-weight: 500; }
.nb-bar .btn { width: 100%; justify-content: center; }
.edit-ben h3 { margin: 0 0 12px; }
@media (max-width: 900px) {
  .nb-grid { grid-template-columns: 1fr; gap: 0; margin-top: 14px; }
  .nb-col { padding: 18px; }
  .nb.embedded .nb-grid { margin-top: 14px; }
  .nb .nb-grid { padding-bottom: 120px; }
  /* El flujo de Enviar y el alta de beneficiario tienen su propio pie: sin tab bar, como en el prototipo. */
  .app.route-send .tab, .app.route-send-batch .tab, .app:has(.nb) .tab { display: none; }
  .app.route-send .main, .app.route-send-batch .main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .send-foot .row-btns .btn.primary { flex: 1; min-width: 0; }
}

/* --- Beneficiarios --- */
.bens .tr .acts { display: flex; justify-content: flex-end; gap: 6px; align-items: center; }
.bens .tr .acts .chip { height: 30px; font-size: 12px; }
.bens .tr { cursor: default; }
.bens .tr .rl svg.flag { width: 16px; height: 11px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.li .d svg.flag, .tr .rl svg.flag, .nb-bar-line svg.flag, .chip svg.flag { display: inline-block; }
.li .d svg.flag { width: 14px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.more-wrap { position: relative; }
.more-wrap .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 150px; }
.more-wrap .menu button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--text); text-align: left; }
.more-wrap .menu button.danger { color: var(--err-text); }
.more-wrap .menu button:hover { background: var(--chip); }
.more-wrap .menu button:disabled { opacity: .45; cursor: not-allowed; }
.more-wrap .menu .menu-note { display: block; padding: 4px 12px 8px; font-size: 11.5px; color: var(--muted-2); font-weight: 500; }
.edit-del { margin: 18px 0 0; text-align: center; }
.acc-hd .more-wrap { margin-left: 4px; }

/* --- Cuentas --- */
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.acc-card { padding: 22px; min-width: 0; }
.acc-hd { display: flex; align-items: flex-start; gap: 10px; }
.acc-hd svg.flag.flag-lg { width: 32px; height: 22px; border-radius: 5px; flex: none; margin-top: 2px; }
.acc-title { flex: 1; min-width: 0; }
.acc-title .t { margin: 0; font-size: 15px; font-weight: 600; }
.acc-title .d { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.acc-bal { margin: 14px 0 0; font-size: 28px; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.acc-bal-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.acc-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.acc-btns .btn { flex: 1; height: 40px; font-size: 13px; justify-content: center; }
.acc-share { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.acc-share input { flex: 1; min-width: 180px; height: 40px; font-size: 13px; }
.acc-more { margin-top: 16px; border-top: 1px solid var(--divider); padding-top: 4px; }
.acc-more .list { margin-top: 8px; }
.acc-more .li { padding: 10px 0; }
.acc-extra { margin-top: 16px; }
.acc-extra-hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.acc-danger { margin-top: 16px; }
.acc-fee-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.acc-fee-chips .chip { height: 28px; font-size: 12px; cursor: default; }
.acc-help { position: relative; display: inline-block; }
.acc-help button { width: 18px; height: 18px; border-radius: 9px; border: 0; background: var(--chip); color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; vertical-align: 2px; }
.acc-tip { position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: 260px; padding: 10px 12px; border-radius: 12px; background: var(--tip-bg); color: var(--tip-ink); font-size: 12px; font-weight: 500; white-space: pre-line; box-shadow: var(--shadow-lg); }
.acc-open-card { margin-top: 16px; padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.acc-open-card .t { margin: 0; font-size: 15px; font-weight: 600; }
.acc-open-card .d { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.acc-open-card .nb-chips { margin-top: 0; }
.acc-open .acc-hd { margin-bottom: 8px; }
.acc-open .btn.primary { margin-top: 12px; }
.acc-foot-line { margin: 14px 0 0; font-size: 11.5px; color: var(--muted-2); font-weight: 500; line-height: 1.5; }
.addr-box { display: flex; gap: 18px; align-items: center; margin-top: 14px; }
.addr-box .qr { width: 120px; height: 120px; flex: none; border-radius: 12px; }
.addr-info { min-width: 0; flex: 1; }
.addr-info .lab { margin-bottom: 4px; }
.addr-val { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; margin-bottom: 10px; }
.addr-empty { margin-top: 14px; padding: 18px; border-radius: 14px; background: var(--chip); text-align: center; }
.addr-empty p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.col-declare { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin-top: 12px; }
.col-declare input { width: 18px; height: 18px; margin-top: 2px; }
@media (max-width: 900px) {
  .acc-grid { grid-template-columns: 1fr; margin-top: 16px; }
  .acc-card { padding: 18px; }
  .acc-btns .btn:nth-child(3) { flex-basis: 100%; }
  .acc-open-card { margin-top: 12px; padding: 16px 18px; flex-direction: column; align-items: stretch; }
}

/* =====================================================================
   REDISEÑO v2 (PR 3): detalles tipo Apple (§5).
   ===================================================================== */
/* Micro-interacciones: las listas entran en cascada (opacidad + 10 px, 380 ms, 50 ms entre filas). */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.list .li, .w-card .tr, .acc-grid > .card, .recents .recent, .nb-region { animation: rise .38s cubic-bezier(.2,.7,.2,1) both; }
.list .li:nth-child(2), .w-card .tr:nth-child(3), .acc-grid > .card:nth-child(2), .recents .recent:nth-child(2), .nb-region:nth-child(2) { animation-delay: 50ms; }
.list .li:nth-child(3), .w-card .tr:nth-child(4), .acc-grid > .card:nth-child(3), .recents .recent:nth-child(3), .nb-region:nth-child(3) { animation-delay: 100ms; }
.list .li:nth-child(4), .w-card .tr:nth-child(5), .acc-grid > .card:nth-child(4), .recents .recent:nth-child(4), .nb-region:nth-child(4) { animation-delay: 150ms; }
.list .li:nth-child(5), .w-card .tr:nth-child(6), .recents .recent:nth-child(5), .nb-region:nth-child(5) { animation-delay: 200ms; }
.list .li:nth-child(6), .w-card .tr:nth-child(7), .recents .recent:nth-child(6), .nb-region:nth-child(6) { animation-delay: 250ms; }
.list .li:nth-child(7), .w-card .tr:nth-child(8) { animation-delay: 300ms; }
.list .li:nth-child(8), .w-card .tr:nth-child(9) { animation-delay: 350ms; }
.list .li:nth-child(9), .w-card .tr:nth-child(10) { animation-delay: 400ms; }
.list .li:nth-child(10), .w-card .tr:nth-child(11) { animation-delay: 450ms; }
/* Parallax de la tarjeta de saldo: la inclinación la pone el JS; acá solo la transición. */
.gc { transition: transform .18s ease-out; transform-style: preserve-3d; will-change: transform; }
/* Isla: pastilla flotante arriba para los estados de un pago, con el avatar del beneficiario. */
.island-wrap { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 120; pointer-events: none; }
.island { display: inline-flex; align-items: center; gap: 10px; max-width: min(92vw, 420px); padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-size: 13.5px; font-weight: 600; box-shadow: 0 18px 40px -16px rgba(18,26,46,.55); opacity: 0; transform: translateY(-14px) scale(.96); transition: opacity .26s, transform .26s cubic-bezier(.2,.7,.2,1); pointer-events: auto; }
.island.in { opacity: 1; transform: none; }
.island-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.island-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--on-pastel); flex: none; }
.island-av.emoji { font-size: 17px; }
.island-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-left: 8px; flex: none; animation: pulse 1.2s ease-in-out infinite; }
.island.err .island-dot { background: var(--err-text); animation: none; }
@keyframes pulse { 0%, 100% { opacity: .5; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }
/* Copiar con feedback: "Copiado" en el mismo lugar. */
.kv .kv-val { cursor: pointer; }
.kv .kv-val.copied { color: var(--gold-ink); }
@media (prefers-reduced-motion: reduce) {
  .list .li, .w-card .tr, .acc-grid > .card, .recents .recent, .nb-region, .island, .island-dot { animation: none; transition: none; }
  .gc { transition: none; transform: none !important; }
}
