/* QatuCheck — interfaz */
:root {
  --ink: #1b1640;
  --ink-2: #2a2360;
  --ink-soft: #4b4675;
  --paper: #f5f4fa;
  --surface: #ffffff;
  --line: #e6e3f1;
  --muted: #6e6a8a;
  --text: #1b1640;
  --yape: #7c3aed;
  --yape-soft: #efe7ff;
  --plin: #06b6d4;
  --plin-soft: #dcf7fc;
  --transf: #f97316;
  --transf-soft: #ffeddc;
  --ok: #00c27a;
  --ok-soft: #dcfaee;
  --bad: #ff3b5c;
  --bad-soft: #ffe4e9;
  --warn: #ffb020;
  --warn-soft: #fff3d6;
  --focus: #7c3aed;
  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 0 rgba(27, 22, 64, .04), 0 8px 24px -12px rgba(27, 22, 64, .18);
  --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', ui-sans-serif, system-ui, sans-serif;
  --rail: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #100d26; --surface: #1a1638; --line: #2c2756; --muted: #a29dc4; --text: #f1effb;
    --yape-soft: #2c1a55; --plin-soft: #0f3640; --transf-soft: #45230c; --ok-soft: #0b3a2a; --bad-soft: #4a1422; --warn-soft: #43320e;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 10px 30px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #100d26; --surface: #1a1638; --line: #2c2756; --muted: #a29dc4; --text: #f1effb;
  --yape-soft: #2c1a55; --plin-soft: #0f3640; --transf-soft: #45230c; --ok-soft: #0b3a2a; --bad-soft: #4a1422; --warn-soft: #43320e;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 10px 30px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  background: var(--paper);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--yape); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Botones y campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-md);
  padding: 10px 16px; font-weight: 650; cursor: pointer; text-decoration: none;
  background: var(--surface); color: var(--text); border-color: var(--line);
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  min-height: 42px; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
:root[data-theme="dark"] .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { background: #fff; color: #1b1640; border-color: #fff; } }
.btn-primary:hover { filter: brightness(1.15); }
.btn-ok { background: var(--ok); color: #04261a; border-color: var(--ok); }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.btn-lg { min-height: 56px; font-size: 17px; border-radius: var(--r-lg); padding: 14px 22px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; min-width: 42px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface);
  border-radius: var(--r-md); padding: 11px 13px; min-height: 44px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--yape); box-shadow: 0 0 0 4px color-mix(in srgb, var(--yape) 18%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--yape); flex: none; }
.hint { font-size: 13px; color: var(--muted); }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: var(--r-md); font-size: 14px; font-weight: 600; }
.form-error:empty { display: none; }

.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100dvh; }
.rail {
  background: var(--ink); color: #e8e5ff; padding: 22px 14px; position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; text-decoration: none; }
.brand b { font-family: var(--display); font-size: 21px; letter-spacing: -0.03em; }
.mark { width: 34px; height: 34px; flex: none; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-md);
  color: #c9c4ef; text-decoration: none; font-weight: 600; position: relative;
}
.nav-item svg { width: 20px; height: 20px; flex: none; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.nav-item[aria-current="page"]::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--yape), var(--plin)); }
.nav-badge { margin-left: auto; font-size: 12px; background: var(--bad); color: #fff; border-radius: 99px; padding: 1px 8px; }
.rail-foot { margin-top: auto; display: grid; gap: 10px; }
.biz-chip { padding: 12px; border-radius: var(--r-md); background: rgba(255,255,255,.06); font-size: 13px; }
.biz-chip b { display: block; color: #fff; font-size: 14px; }
.rail .btn { background: rgba(255,255,255,.08); color: #fff; border-color: transparent; }

.main { min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.receiver-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650;
  padding: 7px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line);
}
.receiver-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.receiver-pill.on i { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2s infinite; }
.receiver-pill.off { background: var(--warn-soft); border-color: transparent; }
.receiver-pill.off i { background: var(--warn); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* barra inferior en móvil */
.tabbar { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .main { padding: 16px 16px 96px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(var(--tabs, 5), 1fr); position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30;
    background: var(--ink); border-radius: 20px; padding: 6px; box-shadow: 0 12px 30px -10px rgba(27,22,64,.6);
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; color: #b8b3e6; text-decoration: none; font-size: 11px; font-weight: 600; border-radius: 14px; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .mobile-brand { display: flex !important; }
}
.mobile-brand { display: none; align-items: center; gap: 8px; }
.mobile-brand b { font-family: var(--display); font-size: 19px; }

/* ---------- Caja ---------- */
.till { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .till { grid-template-columns: 1fr; } }
.till-form { display: grid; gap: 18px; }
.amount-box {
  display: flex; align-items: baseline; gap: 8px; border-radius: var(--r-lg); padding: 16px 18px;
  background: var(--paper); border: 2px solid var(--line); transition: border-color .15s;
}
.amount-box:focus-within { border-color: var(--yape); }
.amount-box .cur { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--muted); }
.amount-box input {
  border: 0; background: transparent; outline: none; width: 100%;
  font-family: var(--display); font-size: clamp(40px, 7vw, 56px); font-weight: 750; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; padding: 0; min-width: 0;
}
.amount-box input::placeholder { color: color-mix(in srgb, var(--muted) 45%, transparent); }
.code-boxes { display: flex; gap: 10px; }
.code-boxes input {
  width: 58px; height: 62px; text-align: center; font-family: var(--display); font-size: 28px; font-weight: 700;
  border: 2px solid var(--line); border-radius: var(--r-md); background: var(--paper); outline: none;
}
.code-boxes input:focus { border-color: var(--yape); }
.keypad { display: none; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button {
  min-height: 56px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
  font-family: var(--display); font-size: 24px; font-weight: 650; cursor: pointer;
}
.keypad button:active { background: var(--paper); }
@media (pointer: coarse) { .keypad { display: grid; } .amount-box input { caret-color: transparent; } }
.till-more summary { cursor: pointer; font-weight: 650; color: var(--muted); font-size: 14px; list-style: none; }
.till-more summary::-webkit-details-marker { display: none; }
.till-more summary::before { content: '+ '; }
.till-more[open] summary::before { content: '– '; }
.till-more .stack { margin-top: 12px; }

.feed { display: grid; gap: 0; }
.feed-item {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 6px;
  border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; cursor: pointer;
  border-radius: 0;
}
.feed-item:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.feed-item:last-child { border-bottom: 0; }
.feed-item.is-new { animation: arrive 1.6s ease; }
@keyframes arrive {
  0% { background: color-mix(in srgb, var(--ok) 28%, transparent); transform: translateY(-8px); opacity: 0; }
  20% { transform: none; opacity: 1; }
  100% { background: transparent; }
}
.src-dot { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 13px; color: #fff; }
.src-dot.yape { background: var(--yape); }
.src-dot.plin { background: var(--plin); }
.src-dot.transferencia { background: var(--transf); font-size: 10px; }
.feed-item .who { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .meta { font-size: 13px; color: var(--muted); }
.feed-item .amt { font-family: var(--display); font-weight: 750; font-size: 20px; text-align: right; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.pill.nuevo { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.pill.validado { background: var(--ok-soft); color: color-mix(in srgb, var(--ok) 70%, var(--text)); }
.pill.anulado { background: var(--bad-soft); color: var(--bad); }
.pill.yape { background: var(--yape-soft); color: var(--yape); }
.pill.plin { background: var(--plin-soft); color: color-mix(in srgb, var(--plin) 70%, var(--text)); }
.pill.transferencia { background: var(--transf-soft); color: color-mix(in srgb, var(--transf) 75%, var(--text)); }
.pill.demo { background: var(--line); color: var(--muted); }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty svg { width: 44px; height: 44px; opacity: .5; }

/* ---------- Veredicto (pantalla completa) ---------- */
.verdict {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  color: #fff; text-align: center; animation: flood .35s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}
.verdict.ok { background: radial-gradient(120% 90% at 50% 0%, #19e295 0%, #00a865 55%, #007a4b 100%); }
.verdict.bad { background: radial-gradient(120% 90% at 50% 0%, #ff6b83 0%, #e8203f 55%, #a10f28 100%); }
.verdict.warn { background: radial-gradient(120% 90% at 50% 0%, #ffcb5c 0%, #f29a00 60%, #b86a00 100%); color: #2a1a00; }
.verdict.multi { background: radial-gradient(120% 90% at 50% 0%, #4c3fb0 0%, #2a2360 60%, #16123a 100%); }
@keyframes flood { from { clip-path: circle(0% at 50% 60%); } to { clip-path: circle(150% at 50% 60%); } }
.verdict-inner { max-width: 560px; width: 100%; display: grid; gap: 18px; justify-items: center; }
.verdict-icon { width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; animation: pop .5s .15s both cubic-bezier(.2,1.6,.4,1); }
.verdict-icon svg { width: 54px; height: 54px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.verdict-title { font-family: var(--display); font-size: clamp(34px, 7vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.verdict-amount { font-family: var(--display); font-size: clamp(56px, 13vw, 104px); font-weight: 800; letter-spacing: -0.04em; line-height: .95; font-variant-numeric: tabular-nums; }
.verdict-who { font-size: 20px; font-weight: 650; }
.verdict-sub { font-size: 16px; opacity: .9; max-width: 44ch; }
.verdict-card { background: rgba(255,255,255,.14); border-radius: var(--r-lg); padding: 14px 16px; width: 100%; display: grid; gap: 4px; text-align: left; }
.verdict-card .k { font-size: 13px; opacity: .8; }
.verdict-actions { display: grid; gap: 10px; width: 100%; }
.verdict .btn-lg { border: 0; }
.verdict .btn-white { background: #fff; color: #10301f; }
.verdict.bad .btn-white { color: #6b0a1b; }
.verdict.multi .btn-white { color: var(--ink); }
.verdict .btn-glass { background: rgba(255,255,255,.16); color: inherit; }
.choice { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; text-align: left; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-md); padding: 12px 14px; color: inherit; cursor: pointer; width: 100%; }
.choice:hover { background: rgba(255,255,255,.2); }
.choice b { font-family: var(--display); font-size: 20px; }

/* ---------- Dashboard ---------- */
.periods { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.periods button { border: 0; background: none; padding: 7px 14px; border-radius: 99px; font-weight: 650; font-size: 14px; color: var(--muted); cursor: pointer; }
.periods button[aria-pressed="true"] { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .periods button[aria-pressed="true"] { background: #fff; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .periods button[aria-pressed="true"] { background: #fff; color: #1b1640; } }
.custom-range { display: none; gap: 8px; align-items: center; }
.custom-range.show { display: flex; }
.custom-range .input { min-height: 38px; padding: 6px 10px; width: auto; }

.hero-total {
  background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: 26px 28px; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr minmax(220px, 42%); gap: 20px; align-items: end;
}
.hero-total::after { content: ''; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--yape) 55%, transparent), transparent); pointer-events: none; }
.hero-total .lbl { color: #c9c4ef; font-weight: 600; }
.hero-total .big { font-family: var(--display); font-size: clamp(42px, 6vw, 68px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.hero-total .big small { font-size: .45em; color: #c9c4ef; margin-right: 6px; font-weight: 700; }
.delta { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 14px; padding: 4px 10px; border-radius: 99px; }
.delta.up { background: rgba(0,194,122,.18); color: #5ff2b8; }
.delta.down { background: rgba(255,59,92,.18); color: #ff8fa3; }
.delta.flat { background: rgba(255,255,255,.1); color: #ddd; }
.hero-total svg.spark { width: 100%; height: 90px; position: relative; z-index: 1; }
@media (max-width: 700px) { .hero-total { grid-template-columns: 1fr; } }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.stat { padding: 16px 18px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .v { font-family: var(--display); font-size: 26px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: 13px; font-weight: 600; }
@media (max-width: 700px) { .stats-strip { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.chart { width: 100%; display: block; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); white-space: nowrap; opacity: 0; transition: opacity .12s; }
.chart-tip.show { opacity: 1; }

.split-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--line); }
.split-bar span { display: block; height: 100%; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.split-rows { display: grid; gap: 14px; margin-top: 18px; }
.split-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.split-row b { font-family: var(--display); font-size: 20px; }

.insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.insights > div { display: grid; gap: 2px; padding: 14px; border-radius: var(--r-md); background: var(--paper); }
.insights b { font-family: var(--display); font-size: 19px; letter-spacing: -0.01em; }
@media (max-width: 600px) { .insights { grid-template-columns: 1fr; } }
.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; }
.heat div { aspect-ratio: 1 / 1.6; border-radius: 6px; background: var(--yape); position: relative; }
.heat-labels { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.heat-labels span { text-align: center; }
@media (max-width: 600px) { .heat-labels span:nth-child(odd) { visibility: hidden; } }

.top-list { display: grid; gap: 12px; }
.top-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.top-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--paper); overflow: hidden; }
.top-row .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--yape), var(--plin)); border-radius: 99px; }
.top-row .n { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 650; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.r, table.data th.r { text-align: right; }
table.data .amt { font-family: var(--display); font-weight: 700; font-size: 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .input { width: auto; min-height: 40px; padding: 8px 12px; }
.filters .grow { flex: 1 1 220px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 10px; }

/* ---------- Receptores ---------- */
.pair-code { font-family: var(--display); font-size: clamp(44px, 9vw, 72px); font-weight: 800; letter-spacing: .12em; text-align: center; padding: 12px; border-radius: var(--r-lg); background: var(--paper); font-variant-numeric: tabular-nums; }
.steps { counter-reset: s; display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--yape-soft); color: var(--yape); font-weight: 800; display: grid; place-items: center; font-family: var(--display); }
.device { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.device:last-child { border-bottom: 0; }
.device .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--paper); display: grid; place-items: center; }
.device .ico svg { width: 24px; height: 24px; }

/* ---------- Ajustes ---------- */
.setting { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }

/* ---------- Autenticación ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art {
  background: var(--ink); color: #fff; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden;
}
.auth-art::before { content: ''; position: absolute; width: 520px; height: 520px; left: -160px; bottom: -220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(6,182,212,.35), transparent); }
.auth-art::after { content: ''; position: absolute; width: 460px; height: 460px; right: -140px; top: -140px; border-radius: 50%; background: radial-gradient(closest-side, rgba(124,58,237,.5), transparent); }
.auth-art > * { position: relative; z-index: 1; }
.auth-headline { font-family: var(--display); font-size: clamp(38px, 5.2vw, 66px); font-weight: 800; letter-spacing: -0.04em; line-height: .98; max-width: 12ch; }
.auth-lede { color: #c9c4ef; font-size: 17px; max-width: 42ch; margin-top: 16px; }
.mock-phone { width: min(300px, 100%); align-self: center; background: #fff; color: var(--ink); border-radius: 28px; padding: 14px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.mock-verdict { border-radius: 18px; padding: 22px 16px; text-align: center; color: #fff; background: radial-gradient(120% 90% at 50% 0%, #19e295 0%, #00a865 60%, #007a4b 100%); display: grid; gap: 6px; justify-items: center; animation: mockcycle 7s infinite; }
.mock-verdict .t { font-family: var(--display); font-weight: 800; font-size: 22px; }
.mock-verdict .a { font-family: var(--display); font-weight: 800; font-size: 46px; letter-spacing: -0.04em; line-height: 1; }
.mock-verdict .w { font-size: 13px; opacity: .9; }
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 6px 2px; font-size: 13px; }
@keyframes mockcycle { 0%, 45% { filter: none; } 50%, 95% { filter: hue-rotate(-150deg) saturate(1.3); } }
@media (prefers-reduced-motion: reduce) { .mock-verdict { animation: none; } }
.auth-form-wrap { display: grid; place-items: center; padding: 32px 20px; }
.auth-form { width: min(420px, 100%); display: grid; gap: 16px; }
.auth-switch { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.auth-switch button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 99px; font-weight: 700; cursor: pointer; color: var(--muted); }
.auth-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.demo-box { background: var(--yape-soft); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 20px 32px; }
  .mock-phone { display: none; }
  .auth-headline { font-size: 38px; }
}

/* ---------- Diálogos y avisos ---------- */
dialog.sheet { border: 0; border-radius: var(--r-xl); padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog.sheet::backdrop { background: rgba(16, 13, 38, .55); backdrop-filter: blur(3px); }
dialog.sheet form, dialog.sheet .sheet-body { padding: 22px; display: grid; gap: 16px; }
dialog.sheet .sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--shadow); font-weight: 600; animation: toast .25s ease; display: flex; gap: 10px; align-items: center; }
.toast.ok { background: #046b45; }
.toast.err { background: #a10f28; }
.toast.pay { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
@keyframes toast { from { transform: translateY(-10px); opacity: 0; } }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--r-lg); margin-bottom: 18px; font-weight: 600; }
.banner.warn { background: var(--warn-soft); }
.banner.info { background: var(--yape-soft); }
.banner .btn { margin-left: auto; }
.banner > svg { width: 22px; height: 22px; flex: none; }
.toast svg { width: 18px; height: 18px; flex: none; }
.skeleton { background: linear-gradient(90deg, var(--line), color-mix(in srgb, var(--line) 50%, transparent), var(--line)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; min-height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }
.legal { max-width: 760px; margin: 0 auto; padding: 32px 20px 80px; }
.legal h1 { margin-bottom: 8px; }
.legal h2 { margin: 28px 0 8px; font-size: 19px; }
.legal p, .legal li { line-height: 1.7; }
.legal p + p { margin-top: 10px; }
.pending { background: var(--warn-soft); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.legal ul { padding-left: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .9s linear infinite; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
