/* FIROVA · app del cliente. Móvil primero, con el tema del Mundo Prosperia (rojo quemado y oro). */
/* Tema Mundo Prosperia, el mismo de la página de bienvenida: noche en rojo quemado, oro y Cinzel. */
:root {
  --bg: #1a0402; --surface: #2a0805; --surface-2: #3a0d07; --surface-3: #4a120a;
  --text: #f2ecdb; --muted: #c2ab93; --line: rgba(227, 197, 120, .16); --line-2: rgba(227, 197, 120, .32);
  --ink: #6e170b; --ink-2: #2a0805; --on-ink: #f6e7b4; --on-ink-muted: #d6b99a;
  --copper: #e3c578; --copper-hi: #f6e7b4; --copper-soft: rgba(227, 197, 120, .14);
  --gold-grad: linear-gradient(135deg, #f6e7b4 0%, #e3c578 35%, #c9a44c 70%, #f0d58d 100%);
  --good: #6fd39a; --good-soft: rgba(111, 211, 154, .13); --bad: #ff8f84; --bad-soft: rgba(255, 143, 132, .13); --warn: #f2c05c; --warn-soft: rgba(242, 192, 92, .13); --info: #9cc0ff; --info-soft: rgba(156, 192, 255, .13);
  --c-usd: #2a9d8f; --c-btc: #f2930f; --c-eth: #7d8fe6; --c-sol: #a77be6; --c-alt: #b9b0a2; --c-defi: #e07a3a; --c-out: #b4aca0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px -16px rgba(0, 0, 0, .75);
  --radius: 20px; --font: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif; --brand: 'Cinzel', Georgia, serif; --deco: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --num: 'Lato', system-ui, sans-serif;
  --nav-h: 66px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--copper); text-decoration: none; }
h1, h2, h3 { font-family: var(--brand); letter-spacing: -.01em; margin: 0; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.up { color: var(--good); } .down { color: var(--bad); }
.hidden { display: none !important; }
svg { flex: none; }

.boot { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--line-2); border-top-color: var(--copper); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Estructura ---------- */
.shell { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-in { max-width: 1080px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.logo img { width: 34px; height: 34px; }
.logo b { font: 700 17px var(--brand); letter-spacing: .2em; }
.logo small { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .02em; margin-top: -2px; }
.topnav { display: none; gap: 4px; margin-left: 18px; }
.topnav a { padding: 8px 14px; border-radius: 12px; color: var(--muted); font-weight: 500; }
.topnav a.on { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font: 600 13px var(--brand); border: 0; cursor: pointer; }
main.content { max-width: 1080px; margin: 0 auto; padding: 8px 16px 24px; }

.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 500; padding: 6px 0; border-radius: 12px; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.on { color: var(--copper); }
@media (min-width: 820px) {
  .shell { padding-bottom: 32px; }
  .tabbar { display: none; }
  .topnav { display: flex; }
}

/* ---------- Tarjetas y bloques ---------- */
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 14px 2px 16px; }
.page-title h1 { font-size: 24px; }
.page-title p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 16px; }
.grid > *, .stack > *, .alloc > * { min-width: 0; }
@media (min-width: 900px) { .grid.two { grid-template-columns: 1.35fr 1fr; align-items: start; } .grid.halves { grid-template-columns: 1fr 1fr; align-items: start; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card h2 { font-size: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row > .ic, .row > .avatar { flex: none; }
.row > .ic svg { width: 20px; height: 20px; }
.between { justify-content: space-between; }
.sep { height: 1px; background: var(--line); margin: 4px 0; border: 0; }

.hello { margin: 14px 2px 14px; }
.hello h1 { font-size: 22px; }
.hello p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.hello p::first-letter { text-transform: uppercase; }
.card-head.wrap { flex-wrap: wrap; align-items: flex-start; }

.hero { position: relative; overflow: hidden; background: linear-gradient(140deg, var(--ink) 0%, var(--ink-2) 100%); color: var(--on-ink); border: 0; padding: 24px 22px 22px; }
.hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(227, 154, 87, .35), transparent 65%); pointer-events: none; }
.hero .label { font-size: 13px; color: var(--on-ink-muted); display: flex; align-items: center; gap: 8px; }
.hero .value { font: 700 clamp(34px, 9vw, 44px)/1.1 var(--brand); letter-spacing: -.02em; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.hero .value .cents { font-size: .55em; opacity: .75; }
.hero .gain { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 30px; background: rgba(255, 255, 255, .09); font-weight: 600; font-size: 14px; }
.hero .gain.up { color: #7fe0a3; } .hero .gain.down { color: #ffa198; }
.hero .asof { margin-top: 14px; font-size: 12px; color: var(--on-ink-muted); }
.eye { background: none; border: 0; color: var(--on-ink-muted); cursor: pointer; padding: 2px; display: inline-grid; }
.eye svg { width: 18px; height: 18px; }
body.private .hide-amt { filter: blur(9px); user-select: none; }

.actions-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bigbtn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: 16px; cursor: pointer; color: var(--text); transition: transform .12s; }
.bigbtn:active { transform: scale(.98); }
.bigbtn .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.bigbtn .ico svg { width: 19px; height: 19px; }
.bigbtn.in .ico { background: var(--good-soft); color: var(--good); }
.bigbtn.out .ico { background: var(--copper-soft); color: var(--copper); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; font-size: 13.5px; background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.banner svg { color: var(--warn); width: 20px; height: 20px; margin-top: 1px; }
.banner.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); } .banner.info svg { color: var(--info); }
.banner b { display: block; margin-bottom: 1px; }

/* ---------- Gráfico ---------- */
.chips { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.chips button { border: 0; background: none; padding: 6px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.chips button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.chart-box { position: relative; height: 230px; margin: 0 -6px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }

/* ---------- Listas ---------- */
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); cursor: default; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; }
.item:first-child { border-top: 0; }
button.item, a.item { cursor: pointer; color: inherit; }
.item .main span span { display: inline; }
.card.flush .item { padding: 14px 20px; }
.item .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.item .ic svg { width: 19px; height: 19px; }
.item .ic.in { background: var(--good-soft); color: var(--good); }
.item .ic.out { background: var(--copper-soft); color: var(--copper); }
.item .ic.fee { background: var(--surface-2); color: var(--muted); }
.item .ic.bad { background: var(--bad-soft); color: var(--bad); }
.item .main { flex: 1; min-width: 0; }
.item .main b { display: block; font-weight: 600; font-size: 14.5px; }
.item .main span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item .amt small { display: block; font-weight: 500; margin-top: 2px; }
.month { font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 18px 20px 6px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.info { background: var(--info-soft); color: var(--info); }
.pill.copper { background: var(--copper-soft); color: var(--copper); }

.empty { text-align: center; color: var(--muted); padding: 28px 16px; font-size: 14px; }
.empty svg { width: 34px; height: 34px; display: block; margin: 0 auto 8px; opacity: .6; }

/* ---------- Inversión ---------- */
.alloc { display: grid; gap: 20px; align-items: center; }
@media (min-width: 560px) { .alloc { grid-template-columns: 190px 1fr; } }
.donut { width: 190px; height: 190px; margin: 0 auto; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .mid b { font: 700 18px var(--brand); font-variant-numeric: tabular-nums; }
.donut .mid span { font-size: 11.5px; color: var(--muted); }
.lines .item { padding: 12px 0; align-items: flex-start; }
.lines .item .dot { margin-top: 5px; }
.lines .item .main span { white-space: normal; }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.bar { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; border-radius: 4px; }
.model-tag { display: inline-flex; align-items: center; gap: 8px; font: 700 12px var(--brand); letter-spacing: .08em; color: var(--copper); text-transform: uppercase; }
.stance { display: flex; gap: 10px; padding: 12px 14px; background: var(--surface-2); border-radius: 14px; font-size: 13.5px; }
.stance svg { color: var(--copper); width: 20px; height: 20px; margin-top: 1px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.stat { background: var(--surface); padding: 14px 16px; }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat b { display: block; font: 700 18px var(--brand); font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat small { font-size: 11.5px; color: var(--muted); }
@media (min-width: 900px) { .stats.four { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Formularios y botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; cursor: pointer; color: var(--text); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.btn.copper { background: var(--copper); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn:disabled { opacity: .55; cursor: default; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--muted); }
.input { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); outline: none; font-size: 16px; }
.input:focus { border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); }
.amount-in { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 18px; padding: 8px 16px; background: var(--surface); }
.amount-in:focus-within { border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); }
.amount-in b { font: 700 30px var(--brand); color: var(--muted); }
.amount-in input { border: 0; outline: 0; background: none; font: 700 34px var(--brand); width: 100%; min-width: 0; font-variant-numeric: tabular-nums; padding: 4px 0; }
.amount-in em { font-style: normal; color: var(--muted); font-weight: 600; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 20px; padding: 7px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.hint { font-size: 12.5px; color: var(--muted); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--copper); margin-top: 1px; }
.rules { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.rules .ok { color: var(--good); }

/* Datos para copiar (transferencia) */
.copyrows { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.copyrow { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line); }
.copyrow:first-child { border-top: 0; }
.copyrow .k { font-size: 12px; color: var(--muted); }
.copyrow .v { font-weight: 600; word-break: break-all; }
.copyrow > div { flex: 1; min-width: 0; }
.copyrow button { border: 0; background: var(--surface-2); color: var(--text); border-radius: 10px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; flex: none; }
.copyrow button svg { width: 17px; height: 17px; }
.copyrow.key { background: var(--copper-soft); }
.copyrow.key .v { font-size: 18px; letter-spacing: .06em; color: var(--copper); }

/* ---------- Hoja inferior (móvil) / diálogo (escritorio) ---------- */
#sheet-root { position: fixed; inset: 0; z-index: 50; background: rgba(8, 12, 20, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
#sheet-root[hidden] { display: none; }
.sheet { background: var(--bg); width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto; border-radius: 26px 26px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); animation: up .26s cubic-bezier(.2, .9, .3, 1); }
.sheet .grab { width: 40px; height: 5px; border-radius: 4px; background: var(--line-2); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { font-size: 19px; }
.xbtn { border: 0; background: var(--surface-2); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.xbtn svg { width: 18px; height: 18px; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps span { flex: 1; height: 4px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--copper); }
.done-mark { width: 74px; height: 74px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; margin: 8px auto 14px; }
.done-mark svg { width: 38px; height: 38px; }
.center { text-align: center; }
@media (min-width: 640px) {
  #sheet-root { align-items: center; }
  .sheet { border-radius: 26px; padding: 22px 26px 26px; }
  .sheet .grab { display: none; }
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.timeline { display: grid; gap: 0; margin: 6px 0 4px; }
.tl { display: grid; grid-template-columns: 22px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.tl::before { content: ''; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); display: grid; place-items: center; }
.tl.done i { background: var(--good); border-color: var(--good); color: #fff; }
.tl.now i { border-color: var(--copper); box-shadow: 0 0 0 4px var(--copper-soft); }
.tl.bad i { background: var(--bad); border-color: var(--bad); color: #fff; }
.tl i svg { width: 13px; height: 13px; }
.tl b { font-size: 14px; font-weight: 600; display: block; }
.tl span { font-size: 12.5px; color: var(--muted); }

/* ---------- Acceso ---------- */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px; background:
  radial-gradient(900px 500px at 85% -10%, rgba(227, 154, 87, .22), transparent 60%),
  radial-gradient(700px 500px at -10% 110%, rgba(36, 87, 166, .14), transparent 60%), var(--bg); }
.gate-card { width: 100%; max-width: 410px; }
.gate-brand { display: grid; justify-items: center; gap: 10px; margin-bottom: 26px; text-align: center; }
.gate-brand img { width: 64px; height: 64px; }
.gate-brand b { font: 700 26px var(--brand); letter-spacing: .26em; margin-left: .26em; }
.gate-brand span { color: var(--muted); font-size: 14px; }
.gate .card { padding: 24px; }
.gate h1 { font-size: 20px; margin-bottom: 4px; }
.gate .foot { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; }
.secure svg { width: 14px; height: 14px; }

/* ---------- Reportes / documentos ---------- */
.doc { background: #fff; color: #18202c; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 34px clamp(18px, 5vw, 46px); max-width: 860px; margin: 0 auto; }
.doc .muted { color: #6b7280; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 2px solid #18202c; padding-bottom: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.doc-head .brand { display: flex; align-items: center; gap: 12px; }
.doc-head .brand img { width: 44px; height: 44px; }
.doc-head .brand b { font: 700 20px var(--brand); letter-spacing: .22em; display: block; }
.doc-head .brand span { font-size: 11.5px; color: #6b7280; }
.doc h2 { font-size: 21px; margin-bottom: 2px; }
.doc h3 { font: 600 13px var(--font); text-transform: uppercase; letter-spacing: .07em; color: #6b7280; margin: 26px 0 8px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doc th, .doc td { padding: 9px 6px; border-bottom: 1px solid #e8e4dd; text-align: left; }
.doc th { font-size: 11.5px; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.doc td.r, .doc th.r { text-align: right; font-variant-numeric: tabular-nums; }
.doc tr.total td { font-weight: 700; border-bottom: 0; border-top: 2px solid #18202c; font-size: 15px; }
.doc .kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.doc .kv div { background: #f6f3ee; border-radius: 12px; padding: 12px 14px; }
.doc .kv span { display: block; font-size: 11.5px; color: #6b7280; }
.doc .kv b { font: 700 18px var(--brand); font-variant-numeric: tabular-nums; }
.doc .up { color: #157a3d; } .doc .down { color: #b42318; }
.doc .legal { font-size: 11px; color: #6b7280; margin-top: 28px; border-top: 1px solid #e8e4dd; padding-top: 12px; line-height: 1.55; }
.doc-bar { display: flex; gap: 10px; justify-content: space-between; align-items: center; max-width: 860px; margin: 6px auto 14px; flex-wrap: wrap; }
.year-tag { font: 700 13px var(--brand); color: var(--muted); margin: 20px 4px 8px; }

/* ---------- Avisos ---------- */
#toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 820px) { #toasts { bottom: 24px; } }
.toast { background: var(--ink); color: var(--on-ink); padding: 13px 16px; border-radius: 14px; font-size: 14px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); animation: up .2s; }
.toast.bad { background: #8f1d14; } .toast.good { background: #10592d; }

/* ---------- Impresión (reportes en PDF) ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; }
  .topbar, .tabbar, .no-print, #toasts, #sheet-root { display: none !important; }
  .shell { padding: 0; }
  main.content { padding: 0; max-width: none; }
  .doc { border: 0; box-shadow: none; padding: 0; max-width: none; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Tema Mundo Prosperia ---------- */
body {
  background: radial-gradient(120% 70% at 50% -10%, #a32a14 0%, #5c1209 30%, var(--bg) 70%) fixed, var(--bg);
  font-size: 15.5px; letter-spacing: .005em;
}
h1, h2, h3 { color: var(--copper); font-weight: 600; letter-spacing: .02em; }
.page-title h1, .hello h1 { font-size: 23px; }
.card { background: linear-gradient(160deg, rgba(70, 14, 8, .78), rgba(36, 6, 3, .88)); border-color: var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card h2 { font-size: 15.5px; }
.topbar { background: linear-gradient(180deg, rgba(26, 4, 2, .9), rgba(26, 4, 2, .55)); }
.logo b { font: 700 18px var(--deco); letter-spacing: .14em; color: #f2ecdb; }
.logo img, .gate-brand img, .boot img { filter: drop-shadow(0 0 12px rgba(227, 197, 120, .35)); }
.topnav a { font-family: var(--brand); font-size: 13px; letter-spacing: .08em; }
.topnav a.on { color: var(--copper); background: var(--copper-soft); box-shadow: none; }
.avatar { background: var(--gold-grad); color: #1a1406; font-family: var(--brand); font-weight: 700; }
.tabbar { background: rgba(26, 4, 2, .92); }
.tabbar a { font-family: var(--brand); letter-spacing: .04em; }

/* Números siempre en Lato (legibles y alineados) */
.hero .value, .stat b, .donut .mid b, .amount-in b, .amount-in input, .item .amt, .doc .kv b { font-family: var(--num); }

/* Tarjeta de saldo */
.hero { background: linear-gradient(140deg, #8a1f0e 0%, #5c1209 45%, #2a0805 100%); border: 1px solid var(--line-2); }
.hero::after { background: radial-gradient(circle, rgba(246, 231, 180, .32), transparent 65%); }
.hero .gain { background: rgba(26, 4, 2, .35); }
.hero .gain.up { color: #9df0bf; } .hero .gain.down { color: #ffb3aa; }

/* Botones */
.btn { border-color: var(--line-2); background: rgba(26, 4, 2, .45); }
.btn.primary, .btn.copper { background: var(--gold-grad); color: #1a1406; border-color: transparent; font-family: var(--brand); font-weight: 700; letter-spacing: .08em; box-shadow: 0 10px 30px -12px rgba(227, 197, 120, .6), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.ghost { background: transparent; }
.bigbtn { background: linear-gradient(160deg, rgba(70, 14, 8, .78), rgba(36, 6, 3, .88)); border-color: var(--line); font-family: var(--brand); letter-spacing: .04em; }
.bigbtn.out .ico { background: var(--copper-soft); color: var(--copper); }
.chips { background: rgba(26, 4, 2, .5); }
.chips button.on { background: var(--copper-soft); color: var(--copper); box-shadow: none; }
.input, .amount-in, .quick button { background: rgba(26, 4, 2, .55); border-color: var(--line-2); color: var(--text); }
.input::placeholder { color: #9c8672; }
.input:focus, .amount-in:focus-within { border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); }
.stats { background: var(--line); }
.stat { background: rgba(36, 6, 3, .92); }
.copyrow button, .xbtn { background: var(--surface-2); }
.month, .year-tag { font-family: var(--brand); color: var(--copper); letter-spacing: .12em; }
.model-tag { font-family: var(--brand); }
#sheet-root { background: rgba(10, 2, 1, .6); }
.sheet { background: linear-gradient(180deg, #3a0d07, var(--bg)); border: 1px solid var(--line); border-bottom: 0; }
.toast { background: #3a0d07; color: var(--text); border: 1px solid var(--line-2); }
.toast.bad { background: #6e170b; } .toast.good { background: #14452a; }

/* Acceso */
.gate { background: radial-gradient(900px 520px at 50% -12%, rgba(227, 197, 120, .2), transparent 62%), transparent; }
.gate-brand b { font: 900 30px var(--deco); letter-spacing: .14em; margin-left: .14em; background: linear-gradient(100deg, #8c6f24 0%, #e3c578 30%, #fff5d6 50%, #e3c578 70%, #8c6f24 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate-brand span { font-family: var(--brand); letter-spacing: .06em; }
.gate .card { border-color: var(--line-2); }
.gate .back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--brand); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.gate .back:hover { color: var(--copper); }

/* Documentos (estados de cuenta y certificados): papel claro para imprimir, con la marca FIROVA en rojo quemado y oro */
.doc-head { border-bottom-color: #8a1f0e; }
.doc-head .brand b { font-family: var(--deco); color: #5c1209; letter-spacing: .14em; }
.doc h2 { color: #5c1209; }
.doc h3 { font-family: var(--brand); color: #8a6a2a; }
.doc tr.total td { border-top-color: #8a1f0e; }
