/* Evanbank — tema claro
   Paleta: lienzo #F5F7FB · superficie #FFF · tinta #10182B · acento cobalto #2450E6 */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #10182b;
  --muted: #5c6578;
  --line: #e4e9f2;
  --accent: #2450e6;
  --accent-ink: #1a3cb0;
  --accent-soft: #eaf0ff;
  --ok: #0e9f6e;
  --ok-soft: #e7f7f0;
  --warn-ink: #92510a;
  --warn-soft: #fff4e2;
  --danger: #d92d20;
  --danger-soft: #feeceb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 43, .05), 0 8px 24px rgba(16, 24, 43, .06);
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-display: "Sora", var(--font-body);
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.mono { font-family: var(--font-mono); }
.hidden { display: none !important; }

/* ---------- Marca ---------- */
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: -.01em;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #4f7cff);
  color: #fff; font-size: 1.05rem;
}

/* ---------- Componentes base ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 600 .95rem/1 var(--font-body);
  padding: .7rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-danger-ghost { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.btn-danger-ghost:hover { background: #fdd8d5; }
.btn-file { position: relative; overflow: hidden; }
.btn-sm { padding: .45rem .75rem; font-size: .85rem; border-radius: 8px; }

.form-grid { display: grid; gap: .9rem; }
.form-grid label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
.form-grid input {
  font: 400 1rem/1.3 var(--font-body);
  color: var(--ink);
  padding: .68rem .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.form-grid input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form-grid input:disabled { background: var(--bg); color: var(--muted); }

.alert {
  border-radius: 10px; padding: .8rem 1rem; font-size: .92rem; margin-bottom: 1rem;
}
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warn { background: var(--warn-soft); color: var(--warn-ink); }

/* ---------- Toasts (sin alert nativos) ---------- */
.toasts {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  display: grid; gap: .5rem; z-index: 200; width: min(92vw, 420px);
}
.toast {
  background: var(--ink); color: #fff;
  padding: .75rem 1rem; border-radius: 10px;
  font-size: .92rem; box-shadow: var(--shadow);
  animation: toast-in .2s ease;
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Modales ---------- */
.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(94vw, 460px);
         box-shadow: 0 24px 64px rgba(16,24,43,.22); }
.modal-wide { width: min(94vw, 560px); }
.modal::backdrop { background: rgba(16, 24, 43, .45); }
.modal-body { padding: 1.5rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: .4rem; flex-wrap: wrap; }
.modal-hint { font-size: .85rem; color: var(--muted); margin: -.4rem 0 .8rem; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0; }
.check { display: flex; gap: .55rem; align-items: center; font-size: .9rem; margin: .9rem 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Instalador ---------- */
.page-install { display: grid; place-items: start center; padding: 3rem 1rem; }
.install-shell { width: min(94vw, 620px); display: grid; gap: 1.3rem; }
.install-head { text-align: center; display: grid; gap: .4rem; justify-items: center; }
.install-sub { color: var(--muted); margin: 0; }
.steps {
  display: flex; gap: .4rem; list-style: none; margin: 0; padding: 0;
  justify-content: center; flex-wrap: wrap;
}
.steps li {
  display: flex; align-items: center; gap: .45rem;
  font-size: .85rem; font-weight: 600; color: var(--muted);
  padding: .4rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
}
.steps li span {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; background: var(--bg); font-size: .75rem;
}
.steps li.active { color: var(--accent); border-color: var(--accent); }
.steps li.active span { background: var(--accent-soft); }
.steps li.done { color: var(--ok); }
.steps li.done span { background: var(--ok-soft); }
.req-list { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .55rem; }
.req-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem .7rem; border-radius: 10px; background: var(--bg); }
.req-list small { display: block; color: var(--muted); }
.req-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: .45rem; }
.req-list li.ok .req-dot { background: var(--ok); }
.req-list li.fail .req-dot { background: var(--danger); }
.req-list li.fail { background: var(--danger-soft); }
.install-foot { text-align: center; color: var(--muted); font-size: .8rem; }

/* ---------- Autenticación ---------- */
.page-auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-shell {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: 1.1fr .9fr; width: min(96vw, 980px);
}
.auth-hero h1 { margin: 1.2rem 0 1.4rem; }
.auth-hero em { font-style: normal; color: var(--accent); }
.hero-points { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .7rem; }
.hero-points li { padding-left: 1.1rem; position: relative; color: var(--muted); }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: .5rem;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
}
.hero-points strong { color: var(--ink); }
.hero-addr { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.tabs { display: flex; gap: .4rem; margin-bottom: 1.2rem; background: var(--bg); padding: .3rem; border-radius: 12px; }
.tab {
  flex: 1; border: 0; background: none; padding: .6rem;
  font: 600 .92rem var(--font-body); color: var(--muted);
  border-radius: 9px; cursor: pointer;
}
.tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Dashboard ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar-right { display: flex; gap: .8rem; align-items: center; }
.avatar-btn {
  border: 2px solid var(--line); background: none; padding: 0;
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; cursor: pointer;
}
.avatar-btn img, .profile-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.dash-main { padding: clamp(1.2rem, 3vw, 2.2rem) clamp(1rem, 4vw, 2.5rem); max-width: 1180px; margin: 0 auto; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat { display: grid; gap: .2rem; padding: 1.1rem 1.3rem; }
.stat-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; }
.stat-hint { font-size: .82rem; color: var(--muted); }

.wallet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.1rem; }
.wallet-card { display: grid; gap: .85rem; }
.wallet-head { display: flex; gap: .8rem; align-items: center; }
.wallet-identicon { flex: none; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line); }
.wallet-title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-date { font-size: .78rem; color: var(--muted); }
.wallet-addr {
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: .55rem .7rem; font-size: .82rem;
  overflow: hidden;
}
.wallet-addr code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
.copy-mini { flex: none; border: 0; background: none; cursor: pointer; color: var(--accent); font-weight: 600; font-size: .8rem; padding: .2rem .3rem; }
.copy-mini:hover { text-decoration: underline; }
.wallet-balance { font-size: .88rem; color: var(--muted); }
.wallet-balance strong { color: var(--ink); font-family: var(--font-mono); }
.wallet-balance .tag-inactive { color: var(--warn-ink); background: var(--warn-soft); border-radius: 6px; padding: .1rem .45rem; font-size: .78rem; font-weight: 600; }
.wallet-balance .tag-active { color: var(--ok); background: var(--ok-soft); border-radius: 6px; padding: .1rem .45rem; font-size: .78rem; font-weight: 600; }
.wallet-actions { display: flex; gap: .45rem; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty-mark {
  font-size: 2rem; color: var(--accent); background: var(--accent-soft);
  display: inline-grid; place-items: center; width: 84px; height: 84px;
  border-radius: 22px; margin-bottom: 1.2rem;
}
.empty-state h2 { color: var(--ink); }

/* ---------- Semilla ---------- */
.seed-box {
  background: var(--ink); color: #d9e2ff;
  border-radius: 12px; padding: 1.1rem 1.2rem;
  font-size: 1.05rem; letter-spacing: .03em;
  word-break: break-all; text-align: center;
  user-select: all;
}
.seed-meta { display: grid; gap: .5rem; margin: 1rem 0 0; font-size: .85rem; }
.seed-meta div { display: grid; gap: .1rem; }
.seed-meta dt { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.seed-meta dd { margin: 0; word-break: break-all; }

/* ---------- Perfil ---------- */
.profile-row { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.3rem; }
.profile-avatar { width: 76px; height: 76px; border-radius: 50%; border: 2px solid var(--line); flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; gap: 1.6rem; }
  .auth-hero { text-align: center; }
  .hero-points li { text-align: left; }
}
@media (max-width: 480px) {
  .topbar { flex-wrap: wrap; gap: .6rem; }
  .wallet-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------- Sistema (admin) */

.btn-ghost {
  background: transparent;
  border-color: var(--line, #DCE2EF);
  color: var(--ink-soft, #4A5570);
}
.btn-ghost:hover { border-color: #B9C4DE; color: var(--ink, #10182B); }

.admin-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 22px;
  margin: 14px 0 4px;
  padding: 14px 16px;
  background: #F5F7FB;
  border: 1px solid #E4E9F4;
  border-radius: 12px;
}
.admin-meta dt {
  font-size: 12px;
  letter-spacing: .02em;
  color: #6B768F;
  margin-bottom: 3px;
}
.admin-meta dd { margin: 0; font-size: 13.5px; color: #10182B; }

.admin-subtitle {
  margin: 20px 0 4px;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
}

.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: 18px;
  text-align: center;
  border: 2px dashed #C4CDE3;
  border-radius: 12px;
  background: #FAFBFE;
  color: #6B768F;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.file-drop:hover, .file-drop.dragging { border-color: #2450E6; background: #F0F4FF; }
.file-drop.has-file {
  border-style: solid;
  border-color: #2450E6;
  color: #10182B;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}

.update-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #F0F4FF;
  color: #1D3FB8;
  font-size: 14px;
}
.spinner {
  width: 20px; height: 20px;
  border: 3px solid #C9D6FA;
  border-top-color: #2450E6;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* --------------------------------------------- Estado de cuenta y envío */

.stat-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #6B768F;
}

.acct-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.acct-head h3 { margin: 0 0 2px; }
.acct-head svg { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto; }
.acct-explorer { margin-left: auto; align-self: flex-start; white-space: nowrap; }
.acct-meta { margin-top: 10px; }

.tx-list {
  border: 1px solid #E4E9F4;
  border-radius: 12px;
  overflow: hidden;
  max-height: 340px;
  overflow-y: auto;
}
.tx-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #EEF1F8;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  transition: background .12s ease;
}
.tx-row:last-child { border-bottom: 0; }
.tx-row:hover { background: #F5F7FB; }
.tx-date { color: #6B768F; font-size: 12px; }
.tx-dir { color: #6B768F; }
.tx-addr {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
  display: inline-block;
  vertical-align: bottom;
}
.tx-detail { overflow: hidden; }
.tx-amount { text-align: right; white-space: nowrap; }
.tx-in  { color: #0E8A4C; }
.tx-out { color: #10182B; }
.tx-type {
  font-size: 12px;
  color: #6B768F;
  border: 1px solid #DCE2EF;
  border-radius: 6px;
  padding: 1px 7px;
}
.tx-fail { color: #C0392B; font-size: 11px; }
.tx-empty { padding: 22px; text-align: center; color: #6B768F; font-size: 13.5px; }
.tx-hash { word-break: break-all; font-size: 12px; }

.amount-row { display: flex; gap: 8px; }
.amount-row input { flex: 1; }
.label-opt { color: #8A93AB; font-weight: 400; font-size: 12px; }

.send-result .send-ok, .send-result .send-warn {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 4px;
}
.send-result .send-ok   { background: #EAF7F0; color: #0E6B3D; }
.send-result .send-warn { background: #FFF6E8; color: #8A5A00; }

@media (max-width: 560px) {
  .tx-row { grid-template-columns: 1fr auto; }
  .tx-date { grid-column: 1 / -1; }
  .tx-addr { max-width: 150px; }
}

/* ------------------------------------------------------- Tokenización */

.tokens-section { margin-top: 34px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: 'Sora', sans-serif;
  font-size: 19px;
  margin: 0;
}

.token-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2450E6, #1D3FB8);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  flex: 0 0 auto;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.token-docs-count { color: #6B768F; font-size: 12.5px; margin-left: 8px; }

.doc-list {
  border: 1px solid #E4E9F4;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.doc-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #EEF1F8;
  font-size: 13.5px;
}
.doc-row:last-child { border-bottom: 0; }
.doc-name { color: #10182B; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.doc-name:hover { color: #2450E6; text-decoration: underline; }
.doc-size { color: #6B768F; font-size: 12px; white-space: nowrap; }
.doc-hash { font-size: 11.5px; color: #6B768F; }

textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #DCE2EF;
  border-radius: 10px;
  background: #fff;
  color: #10182B;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}
textarea:focus { outline: 2px solid #2450E6; outline-offset: 1px; border-color: #2450E6; }

select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #DCE2EF;
  border-radius: 10px;
  background: #fff;
  color: #10182B;
  width: 100%;
  box-sizing: border-box;
}
select:focus { outline: 2px solid #2450E6; outline-offset: 1px; }

/* ----------------------------------------------- Ficha pública del token */

.page-token { background: #F5F7FB; }
.token-main {
  max-width: 760px;
  margin: 34px auto 60px;
  padding: 0 18px;
}
.token-card-public { padding: 28px; }
.token-card-public h1 {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  margin: 0 0 2px;
}
.token-pub-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.token-pub-head .token-code-badge { min-width: 56px; height: 56px; font-size: 15px; }
.token-issued { color: #6B768F; margin: 0; font-size: 13.5px; }
.token-desc { color: #333D55; line-height: 1.55; }
.token-addr { word-break: break-all; font-size: 12.5px; }
.token-howto { padding-left: 20px; color: #333D55; line-height: 1.6; font-size: 14.5px; }
.token-howto li { margin-bottom: 10px; }
.trust-data {
  background: #F5F7FB;
  border: 1px solid #E4E9F4;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 12.5px;
  word-break: break-all;
}
.token-disclaimer {
  margin-top: 22px;
  padding: 12px 16px;
  background: #FFF6E8;
  border-radius: 10px;
  color: #8A5A00;
  font-size: 13px;
}

/* ================================================================
   SHELL DE APLICACIÓN (v1.4) — panel tipo software de escritorio
   ================================================================ */

.page-app {
  margin: 0;
  background: #EEF1F6;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13.5px;
  color: #10182B;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- Barra superior ---- */
.appbar {
  height: 46px;
  flex: 0 0 46px;
  background: #FFFFFF;
  border-bottom: 1px solid #D9DFEA;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 16px;
}
.page-app .brand {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-app .brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #2450E6, #1D3FB8);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.appbar-center {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  color: #5A6478;
  letter-spacing: .04em;
}
.appbar-right { display: flex; align-items: center; gap: 10px; }
.net-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #0E8A4C;
  box-shadow: 0 0 0 3px #E7F6ED;
}
.net-label { font-size: 11.5px; color: #5A6478; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid #D9DFEA;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}
.user-chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* ---- Distribución ---- */
.app-shell { flex: 1; display: flex; min-height: 0; }

.sidebar {
  width: 208px;
  flex: 0 0 208px;
  background: #FFFFFF;
  border-right: 1px solid #D9DFEA;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #8A93A8;
  padding: 0 10px 5px;
}
.side-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #333D55;
  cursor: pointer;
}
.side-item:hover { background: #F1F4FA; }
.side-item.active {
  background: #EAF0FE;
  color: #2450E6;
  font-weight: 600;
}
.side-danger { color: #C0392B; }
.side-danger:hover { background: #FDECEA; }
.side-foot {
  margin-top: auto;
  padding: 8px 10px 2px;
  font-size: 10.5px;
  color: #A2AABD;
}

.workspace {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 18px 22px 40px;
}

/* ---- Vistas ---- */
.view.hidden { display: none; }
.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
.view-head h1 {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.view-actions { display: flex; gap: 8px; }
.btn-back {
  border: 1px solid #D9DFEA;
  background: #fff;
  border-radius: 7px;
  width: 26px; height: 26px;
  font-size: 16px;
  line-height: 1;
  color: #5A6478;
  cursor: pointer;
}
.btn-back:hover { background: #F1F4FA; }

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  padding: 8px 14px;
  background: #FFFFFF;
  border: 1px solid #D9DFEA;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 11.5px;
  color: #5A6478;
}
.status-strip b { color: #10182B; font-weight: 600; }
.status-strip em { font-style: normal; color: #8A93A8; }

/* ---- Paneles ---- */
.panel {
  background: #FFFFFF;
  border: 1px solid #D9DFEA;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
}
.panel-form { padding: 16px 18px; max-width: 620px; }
.panel-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #5A6478;
  padding: 12px 16px 10px;
  border-bottom: 1px solid #EDF0F7;
}
.panel-form .panel-title { padding: 0 0 12px; border-bottom: 0; }
.panel .hint, .panel-form .hint { padding: 0 16px 12px; margin: 8px 0 0; }
.panel-form .hint { padding: 0 0 12px; }
.hint { color: #5A6478; font-size: 12.5px; line-height: 1.5; margin: 8px 0; }
.panel-foot { padding: 8px 16px 12px; }
.btn-row { display: flex; gap: 8px; padding: 12px 16px 4px; flex-wrap: wrap; }

/* ---- Tabla de datos ---- */
table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.grid thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #5A6478;
  background: #F6F8FC;
  border-bottom: 1px solid #D9DFEA;
  padding: 9px 14px;
  white-space: nowrap;
}
table.grid tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid #EDF0F7;
  vertical-align: middle;
}
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover { background: #F8FAFD; }
.t-num { text-align: right; }
.t-actions { text-align: right; white-space: nowrap; }
.t-dim { color: #8A93A8; }
.cell-id { display: inline-flex; align-items: center; gap: 9px; }
.cell-id .wallet-identicon { width: 22px; height: 22px; border-radius: 5px; flex: 0 0 auto; }
.cell-name { font-weight: 500; }
.cell-addr { font-size: 12px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: #F1F4FA;
  color: #5A6478;
}
.badge-ok { background: #E7F6ED; color: #0E8A4C; }
.badge-warn { background: #FFF6E4; color: #B7791F; }

.btn-xs {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 6px;
  margin-left: 4px;
}

.empty { padding: 26px 18px; text-align: center; color: #5A6478; }
.empty p { margin: 0 0 12px; }

/* ---- Detalle / registros ---- */
.record-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 6px;
}
.panel-form .record-head { padding: 0 0 12px; }
.record-head .wallet-identicon { width: 40px; height: 40px; border-radius: 9px; }
.record-title { font-size: 15px; font-weight: 600; }
.record-sub { font-size: 12px; color: #5A6478; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; word-break: break-all; }

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  margin: 8px 0 0;
  border-top: 1px solid #EDF0F7;
}
.data-grid > div {
  padding: 10px 16px;
  border-bottom: 1px solid #EDF0F7;
  border-right: 1px solid #EDF0F7;
}
.data-grid dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8A93A8;
  margin-bottom: 3px;
}
.data-grid dd { margin: 0; font-size: 13px; }

.doc-list.flat { border: 0; border-radius: 0; margin: 0; }
.doc-list.flat .doc-row { padding: 9px 16px; }
#acct-txs .tx-row { padding: 8px 16px; }
#acct-txs .tx-empty, .doc-list.flat .tx-empty { padding: 14px 16px; }

/* ---- Formularios de vista ---- */
.panel-form .form-grid { gap: 12px; }
.panel-form label { font-size: 12.5px; font-weight: 500; }
.field-note { font-size: 11.5px; color: #5A6478; }
.field-note b { color: #10182B; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 4px; }
.amount-wrap { display: flex; gap: 8px; }
.amount-wrap input { flex: 1; }

/* ---- Diálogos compactos de sistema ---- */
.page-app .modal {
  border: 1px solid #C7CFDE;
  border-radius: 9px;
  padding: 0;
  box-shadow: 0 18px 50px rgba(16, 24, 43, .22);
}
.page-app .modal::backdrop { background: rgba(16, 24, 43, .35); }
.modal-title {
  padding: 10px 16px;
  background: #F6F8FC;
  border-bottom: 1px solid #D9DFEA;
  font-size: 13px;
  font-weight: 600;
}
.page-app .modal-body { padding: 16px; }
.page-app .modal h3 { display: none; }

/* ---- Responsivo ---- */
@media (max-width: 900px) {
  .sidebar { width: 168px; flex-basis: 168px; }
  .appbar-center { display: none; }
}
@media (max-width: 680px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%; flex: 0 0 auto;
    flex-direction: row; gap: 4px;
    overflow-x: auto; padding: 6px 8px;
    border-right: 0; border-bottom: 1px solid #D9DFEA;
  }
  .side-group { flex-direction: row; gap: 2px; }
  .side-label, .side-foot { display: none; }
  .side-item { white-space: nowrap; }
  .workspace { padding: 12px; }
  table.grid { font-size: 12px; }
  table.grid thead th, table.grid tbody td { padding: 7px 8px; }
}

/* Convertir */
.swap-asset { max-width: 150px; flex: 0 0 auto; }

/* v1.8 — marca, cierre de cuenta y landing mínima */
.brand-logo { height: 30px; max-width: 190px; object-fit: contain; display: block; }
.logo-preview {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 56px; height: 56px; padding: 4px 10px;
  border: 1px solid #D9DFEA; border-radius: 9px; background: #F6F8FC;
}
.logo-preview img { max-height: 44px; max-width: 200px; object-fit: contain; }
.logo-preview .brand-mark { width: 34px; height: 34px; font-size: 17px; }

.btn-danger {
  background: #C0392B; border: 1px solid #C0392B; color: #fff;
}
.btn-danger:hover { background: #A93226; }
.panel-close { border-color: #F1D2CD; }
.panel-close .panel-title { color: #C0392B; border-color: #F8E3E0; }

.page-auth-minimal {
  min-height: 100vh; margin: 0;
  display: flex; align-items: center; justify-content: center;
  background: #EEF1F6;
  font-family: 'Instrument Sans', sans-serif;
}
.auth-minimal {
  width: min(380px, 92vw);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 40px 0 60px;
}
.auth-brandblock { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.brand-xl { font-size: 26px; }
.brand-xl .brand-mark { width: 42px; height: 42px; font-size: 21px; border-radius: 11px; }
.auth-logo { max-height: 64px; max-width: 260px; object-fit: contain; }
.auth-slogan { margin: 0; color: #5A6478; font-size: 14.5px; letter-spacing: .01em; }
.page-auth-minimal .auth-card { width: 100%; box-sizing: border-box; }
.auth-foot { color: #A2AABD; font-size: 12px; margin: 0; }

.form-inset { padding: 12px 16px 16px; border-bottom: 1px solid #EDF0F7; background: #FAFBFE; }

/* KYC */
.kyc-row { grid-template-columns: 1fr auto auto; align-items: start; }
.kyc-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.kyc-note-input {
  font: inherit; font-size: 11.5px; padding: 4px 8px;
  border: 1px solid #DCE2EF; border-radius: 6px; width: 150px;
}

.field-suffix {
  display: inline-flex; align-items: center;
  padding: 0 12px; border: 1px solid #DCE2EF; border-radius: 10px;
  background: #F6F8FC; color: #5A6478; font-size: 13px; white-space: nowrap;
}

/* Importación */
.sn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 0 4px; }
.sn-cell { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: #5A6478; }
.sn-cell input { width: 100%; box-sizing: border-box; text-align: center; letter-spacing: .08em; }
.key-chip {
  display: inline-block; padding: 1px 7px; border-radius: 20px;
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  background: #EEF1F8; color: #5A6478; border: 1px solid #E0E5F0;
}

/* Métricas y análisis */
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.chart-grid-inner { grid-template-columns: repeat(3, 1fr); padding: 12px 16px 16px; }
.chart-panel canvas { width: 100%; display: block; }
.chart-sub { font-size: 11px; color: #5A6478; text-transform: uppercase; letter-spacing: .05em; padding: 0 0 8px; }
.stat-strip { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid #EDF0F7; }
.stat { flex: 1 1 120px; padding: 12px 16px; border-right: 1px solid #EDF0F7; }
.stat:last-child { border-right: 0; }
.stat-k { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #8A93A8; }
.stat-v { font-size: 15px; color: #1B2334; }
.data-grid-3 { grid-template-columns: repeat(3, 1fr); }
.flag-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 20px;
  font-size: 10.5px; background: #EEF3FF; color: #2450E6; border: 1px solid #D7E1FB; }
.modal-wide { width: min(680px, 94vw); }
.txd-grid { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; padding: 8px 0; font-size: 12.5px; }
.txd-grid dt { color: #8A93A8; } .txd-grid dd { margin: 0; word-break: break-all; }
@media (max-width: 960px) { .chart-grid, .chart-grid-inner { grid-template-columns: 1fr; } }

/* Cobros */
.pay-page .auth-card { width: min(430px, 94vw); }
.pay-concept { font-family: Sora, sans-serif; font-weight: 600; font-size: 16px; color: #1B2334; text-align: center; }
.pay-amount { text-align: center; font-size: 26px; font-weight: 600; color: #2450E6; padding: 4px 0 10px; }
.pay-xrp { text-align: center; padding-bottom: 10px; }
.pay-qr { display: block; margin: 0 auto; image-rendering: pixelated; border: 1px solid #E7EBF3; border-radius: 10px; }
.badge-paid { background: #E7F7EE; color: #12A150; border-color: #C8ECD8; }
.badge-cancelled { background: #F6F7FA; color: #8A93A8; }

/* ============ v1.15 — rediseño de diálogos ============ */
.page-app .modal {
  border: 0;
  border-radius: 16px;
  padding: 0 0 20px;
  width: min(94vw, 480px);
  box-shadow: 0 32px 90px rgba(13, 20, 38, .30), 0 4px 18px rgba(13, 20, 38, .12);
  overflow: hidden;
}
.page-app .modal-wide { width: min(94vw, 660px); }
.page-app .modal::backdrop {
  background: rgba(13, 20, 38, .42);
  backdrop-filter: blur(3px);
}
.page-app .modal[open] { animation: eb-modal-in .16s ease-out; }
@keyframes eb-modal-in {
  from { transform: translateY(10px) scale(.985); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.page-app .modal-title {
  padding: 18px 22px 14px;
  margin: 0 0 16px;
  background: #fff;
  border-bottom: 1px solid #EDF0F7;
  font-family: Sora, sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  color: #14192B;
  letter-spacing: -0.01em;
}
.page-app .modal > :not(.modal-title) { margin-left: 22px; margin-right: 22px; }
.page-app .modal > .form-grid,
.page-app .modal .form-grid { gap: 14px; }
.page-app .modal .hint { color: #6A7590; line-height: 1.5; }
.page-app .modal .form-actions {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid #EDF0F7;
}
.page-app .modal input,
.page-app .modal select,
.page-app .modal textarea {
  border-radius: 10px;
  border-color: #D9DFEA;
  padding: 10px 12px;
}
.page-app .modal input:focus,
.page-app .modal select:focus { border-color: #2450E6; box-shadow: 0 0 0 3px rgba(36, 80, 230, .12); }
.txd-grid { grid-template-columns: 150px 1fr; gap: 0 14px; }
.txd-grid dt, .txd-grid dd { padding: 7px 0; border-bottom: 1px solid #F1F3F8; }
.txd-grid dt:last-of-type, .txd-grid dd:last-of-type { border-bottom: 0; }
.send-ok, .send-warn { border-radius: 10px; }

/* ============ v1.16 — acceso rediseñado, fondo y páginas ============ */
.page-auth-minimal .auth-card {
  border: 0; border-radius: 18px;
  padding: 22px 26px 26px;
  box-shadow: 0 26px 70px rgba(13, 20, 38, .16), 0 4px 16px rgba(13, 20, 38, .08);
  box-sizing: border-box;
}
.page-auth-minimal .auth-card input,
.page-auth-minimal .auth-card select {
  width: 100%; box-sizing: border-box;
  border-radius: 10px; border: 1px solid #D9DFEA;
  padding: 11px 13px; font-size: 14px;
}
.page-auth-minimal .auth-card input:focus {
  border-color: #2450E6; outline: 0;
  box-shadow: 0 0 0 3px rgba(36, 80, 230, .12);
}
.page-auth-minimal .auth-card .form-grid { gap: 15px; }
.page-auth-minimal .auth-card label { font-size: 13px; color: #414B61; display: grid; gap: 6px; }
.page-auth-minimal .auth-card .label-opt { display: inline; color: #98A1B5; font-weight: 400; }
.page-auth-minimal .auth-card .amount-wrap { display: flex; gap: 8px; align-items: stretch; }
.page-auth-minimal .auth-card .amount-wrap input { flex: 1 1 auto; min-width: 0; }
.page-auth-minimal .auth-card .field-suffix { flex: 0 0 auto; border-radius: 10px; }
.page-auth-minimal .tabs {
  display: flex; gap: 4px; padding: 4px; margin: 0 0 18px;
  background: #EFF2F8; border-radius: 12px;
}
.page-auth-minimal .tab {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  padding: 9px 0; border-radius: 9px;
  font: 600 13.5px 'Instrument Sans', sans-serif; color: #5A6478;
}
.page-auth-minimal .tab.active { background: #fff; color: #14192B; box-shadow: 0 1px 4px rgba(13,20,38,.10); }
.btn-block { width: 100%; padding: 12px 0; font-size: 14.5px; border-radius: 10px; }

/* Fondo de imagen o video */
.auth-bg { position: fixed; inset: 0; z-index: 0; }
.auth-bg img, .auth-bg video { width: 100%; height: 100%; object-fit: cover; }
.auth-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,20,38,.30), rgba(13,20,38,.55));
}
.page-auth-minimal .auth-minimal { position: relative; z-index: 1; }
.has-bg .auth-slogan { color: #F2F5FB; text-shadow: 0 1px 10px rgba(13,20,38,.5); }
.has-bg .auth-foot, .has-bg .auth-links a { color: #D9E0EE; }
.has-bg .brand-xl { color: #fff; }

/* Pie con páginas */
.auth-footblock { display: grid; gap: 8px; justify-items: center; }
.auth-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.auth-links a { color: #7C86A0; font-size: 12px; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* Página de contenido */
.page-doc { width: min(680px, 94vw); }
.page-doc .doc-card { width: 100%; }
.brand-link { text-decoration: none; color: inherit; }
.doc-title { font-family: Sora, sans-serif; font-size: 21px; margin: 0 0 14px; color: #14192B; }
.doc-body p { line-height: 1.65; color: #333C51; font-size: 14.5px; }
.doc-updated { color: #98A1B5; font-size: 12px; margin: 18px 0 0; }

/* Datos de pago en Enviar */
.magic-box { background: #F4F7FE; border: 1px solid #DCE5F9; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 16px; }
.magic-title { font: 600 13px Sora, sans-serif; color: #2450E6; margin-bottom: 2px; }
.magic-row { display: flex; gap: 8px; margin-top: 8px; }
.magic-row input { flex: 1; min-width: 0; }
.field-flash { animation: eb-flash 1.2s ease-out; }
@keyframes eb-flash { 0% { background: #DCE9FF; } 100% { background: #fff; } }

/* Accesos y eliminación */
.badge-danger { background: #FDEBEA; color: #C0392B; border-color: #F5CFCB; }
.btn-danger-ghost { color: #C0392B; border-color: #EAC8C4; }
.btn-danger-ghost:hover { background: #FDEBEA; }

/* ============ v1.20 — Tarjetas EvanBank ============ */
.cards-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.ebcard {
  position: relative; width: 340px; height: 208px; border-radius: 18px;
  padding: 20px 22px; color: #F4F6FB; overflow: hidden;
  box-shadow: 0 18px 44px rgba(13,20,38,.30), inset 0 1px 0 rgba(255,255,255,.18);
  display: flex; flex-direction: column; justify-content: space-between;
}
.ebcard::after { /* brillo diagonal */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.10) 45%, transparent 62%);
}
.ebcard-noche     { background: linear-gradient(135deg, #141B31 0%, #23315E 55%, #2450E6 130%); }
.ebcard-oro       { background: linear-gradient(135deg, #6B4A12 0%, #B98A2F 55%, #E7C56A 130%); }
.ebcard-esmeralda { background: linear-gradient(135deg, #0A3D2E 0%, #12805B 60%, #35C08E 135%); }
.ebcard-rubi      { background: linear-gradient(135deg, #4A0F1D 0%, #99203C 60%, #E4506F 135%); }
.ebcard-brand { font: 700 17px Sora, sans-serif; letter-spacing: .01em; }
.ebcard-brand span { opacity: .78; font-weight: 500; }
.ebcard-chip {
  width: 42px; height: 31px; border-radius: 6px;
  background: linear-gradient(135deg, #E8D9A0, #C9A94F 60%, #E8D9A0);
  box-shadow: inset 0 0 0 1.5px rgba(90,70,20,.45), inset 0 6px 0 -4px rgba(90,70,20,.35), inset 0 -6px 0 -4px rgba(90,70,20,.35);
}
.ebcard-pan { font-size: 19.5px; letter-spacing: .12em; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.ebcard-row { display: flex; justify-content: space-between; align-items: flex-end; }
.ebcard-holder { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.ebcard-net { font: 600 10px Sora, sans-serif; letter-spacing: .14em; opacity: .75; }
.ebcard-off { filter: grayscale(1) brightness(.72); }
.ebcard-off .ebcard-pan::after { content: ' · DESACTIVADA'; font-size: 10px; letter-spacing: .05em; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.card-meta { font-size: 11.5px; color: #7C86A0; margin-top: 6px; }
.theme-row { display: flex; gap: 14px; flex-wrap: wrap; }
.theme-pick { display: flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.theme-dot { width: 22px; height: 22px; border-radius: 7px; display: inline-block; }
.th-noche { background: linear-gradient(135deg, #141B31, #2450E6); }
.th-oro { background: linear-gradient(135deg, #6B4A12, #E7C56A); }
.th-esmeralda { background: linear-gradient(135deg, #0A3D2E, #35C08E); }
.th-rubi { background: linear-gradient(135deg, #4A0F1D, #E4506F); }

/* ============ Billete del estado de cuenta ============ */
.banknote-panel { padding: 16px; background: transparent; border: 0; box-shadow: none; }
.banknote {
  position: relative; border-radius: 14px; overflow: hidden;
  transition: filter .6s ease;
  box-shadow: 0 16px 40px rgba(13,20,38,.18);
}
.bn-border {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.14) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.10) 0 2px, transparent 2px 9px);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  mask-composite: exclude; padding: 12px;
  pointer-events: none;
}
.bn-inner { position: relative; padding: 18px 26px 14px; }
.bn-head, .bn-foot { display: flex; justify-content: space-between; align-items: center; }
.bn-brand { font: 700 13px Sora, sans-serif; letter-spacing: .28em; }
.bn-series { font-size: 11px; opacity: .8; }
.bn-center { display: flex; align-items: center; gap: 20px; padding: 14px 0 10px; }
.bn-portrait { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  border: 3px solid rgba(255,255,255,.55); background: rgba(255,255,255,.25);
  display: grid; place-items: center; }
.bn-portrait svg, .bn-portrait img { width: 100%; height: 100%; }
.bn-amount-wrap { flex: 1; text-align: center; }
.bn-amount { font-size: clamp(30px, 6vw, 46px); font-weight: 700; letter-spacing: .01em;
  text-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .25s ease; }
.bn-amount.bn-pop { transform: scale(1.06); }
.bn-unit { font: 600 10px Sora, sans-serif; letter-spacing: .22em; opacity: .8; }
.bn-denom { font-size: 22px; font-weight: 700; opacity: .9; align-self: flex-start; }
.bn-foot { font-size: 12px; opacity: .9; }
/* Denominaciones: el billete cambia con el saldo */
.banknote { color: #F4F6FB; }
.bn-t0 { background: linear-gradient(120deg, #5C6474, #8A93A8); }                  /* < 1 XRP */
.bn-t1 { background: linear-gradient(120deg, #1F6E43, #3DA36C, #6CC493); }        /* 1–9 */
.bn-t2 { background: linear-gradient(120deg, #1D3E8F, #2450E6, #5B82F2); }        /* 10–49 */
.bn-t3 { background: linear-gradient(120deg, #4A2A7E, #6D42B8, #9A6FE0); }        /* 50–99 */
.bn-t4 { background: linear-gradient(120deg, #8A4A12, #C56E1E, #E89B4A); }        /* 100–499 */
.bn-t5 { background: linear-gradient(120deg, #7E1F32, #B03049, #DE5E74); }        /* 500–999 */
.bn-t6 { background: linear-gradient(120deg, #6B4A12, #B98A2F, #EFD07A); }        /* 1000+ */

/* ============ v1.21 — Mercado ============ */
.mkt-layout { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.mkt-chart-panel { padding-bottom: 10px; }
.mkt-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 6px; }
.mkt-symbol { font: 600 16px Sora, sans-serif; color: #14192B; margin-right: 10px; }
.mkt-price { font-size: 17px; color: #14192B; }
.mkt-change { font-size: 13px; margin-left: 8px; }
.mkt-up { color: #12A150; } .mkt-down { color: #C0392B; }
#mkt-canvas { width: 100%; display: block; cursor: crosshair; }
.tf-row { display: flex; gap: 4px; }
.tf-btn.tf-active { background: #2450E6; color: #fff; border-color: #2450E6; }
.mkt-watch-grid td { cursor: pointer; }
.mkt-watch-grid tr.mkt-sel td { background: #EEF3FF; }
.mkt-watch-grid .t-num { text-align: right; }
@media (max-width: 1080px) { .mkt-layout { grid-template-columns: 1fr; } }

/* ============ v1.22 — billete rediseñado ============ */
.banknote { max-width: 720px; margin: 0 auto; aspect-ratio: 2.35 / 1; border-radius: 10px; }
.bn-guilloche {
  position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background:
    radial-gradient(circle at 18% 50%, transparent 54px, rgba(255,255,255,.28) 55px, transparent 56px, transparent 62px, rgba(255,255,255,.22) 63px, transparent 64px, transparent 70px, rgba(255,255,255,.16) 71px, transparent 72px),
    radial-gradient(circle at 84% 50%, transparent 44px, rgba(255,255,255,.25) 45px, transparent 46px, transparent 54px, rgba(255,255,255,.18) 55px, transparent 56px, transparent 64px, rgba(255,255,255,.12) 65px, transparent 66px),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(255,255,255,.05) 5px 6px),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(255,255,255,.05) 5px 6px);
}
.bn-frame {
  position: absolute; inset: 7px; pointer-events: none; border-radius: 6px;
  border: 1.6px solid rgba(255,255,255,.65);
  outline: 1px solid rgba(255,255,255,.30);
  outline-offset: 3px;
  box-shadow: inset 0 0 0 6px rgba(255,255,255,.06);
}
.bn-border { display: none; }
.bn-corner {
  position: absolute; font-weight: 700; font-size: 19px; opacity: .95; z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,.3); letter-spacing: -.02em;
}
.bn-c-tl { top: 12px; left: 18px; }
.bn-c-tr { top: 12px; right: 18px; }
.bn-c-bl { bottom: 10px; left: 18px; }
.bn-c-br { bottom: 10px; right: 18px; }
.bn-watermark {
  position: absolute; right: 7%; top: 50%; transform: translateY(-50%);
  font-size: clamp(60px, 12vw, 110px); font-weight: 700; opacity: .12; z-index: 1;
  letter-spacing: -.04em; pointer-events: none;
}
.bn-inner { position: relative; z-index: 2; height: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: space-between; padding: 20px 44px 16px; }
.bn-brand { font: 700 12px Sora, sans-serif; letter-spacing: .34em; }
.bn-series { font-size: 10.5px; opacity: .85; letter-spacing: .1em; }
.bn-center { padding: 4px 0; }
.bn-portrait { width: 76px; height: 76px; border: 0; background: transparent;
  box-shadow: 0 3px 14px rgba(0,0,0,.28); border-radius: 50%; }
.bn-amount { font-size: clamp(28px, 5.2vw, 44px); }
.bn-unit { letter-spacing: .26em; font-size: 9px; }
.bn-foot { align-items: flex-end; gap: 14px; }
.bn-sign { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 11px; }
.bn-sign-line { width: 120px; border-top: 1px solid rgba(255,255,255,.75); }
.bn-fiat { font-size: 12px; }
@media (max-width: 620px) {
  .banknote { aspect-ratio: auto; }
  .bn-watermark { display: none; }
  .bn-inner { padding: 16px 30px 12px; }
}

/* Sello de billetera */
.wallet-seal { border-radius: 50%; }

/* Zona de riesgo */
.panel-risk { border: 1px solid #F0D4D0; background: #FFFBFA; }
.panel-risk summary { list-style: none; cursor: pointer; padding: 16px 18px; }
.panel-risk summary::-webkit-details-marker { display: none; }
.risk-summary-title { display: block; font: 600 14px Sora, sans-serif; color: #C0392B; }
.risk-summary-sub { display: block; font-size: 12.5px; color: #8A6560; margin-top: 3px; }
.panel-risk details[open] summary { border-bottom: 1px solid #F0D4D0; }
.risk-item { padding: 14px 18px 16px; }
.risk-item + .risk-item, .risk-item + form { border-top: 1px dashed #EBD8D4; }
.risk-item-title { font: 600 13px Sora, sans-serif; color: #7E2A1E; margin-bottom: 4px; }
.panel-risk #form-close { padding: 0 18px 16px; }

/* ============ v1.23 — tarjetas de billetera y retratos ============ */
.wallet-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.wcard { background: #fff; border: 1px solid #E7EBF3; border-radius: 16px; padding: 16px 18px 14px;
  box-shadow: 0 4px 18px rgba(13,20,38,.05); display: flex; flex-direction: column; gap: 10px; }
.wcard-head { display: flex; align-items: center; gap: 12px; }
.wcard-seal { width: 44px; height: 44px; flex: 0 0 auto; }
.wcard-seal svg { width: 100%; height: 100%; }
.wcard-title { flex: 1; display: grid; gap: 1px; }
.wcard-title .cell-name { font: 600 14.5px Sora, sans-serif; color: #14192B; }
.wcard-title .t-dim { font-size: 11px; }
.wcard-addr { font-size: 12px; color: #414B61; word-break: break-all; line-height: 1.5;
  background: #F6F8FC; border-radius: 8px; padding: 7px 10px; }
.wcard-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wcard-stats > div { display: grid; gap: 1px; }
.wcard-k { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #8A93A8; }
.wcard-v { font-size: 15.5px; color: #14192B; }
.wspark { width: 100%; display: none; height: 44px; }
.wcard-actions { display: flex; gap: 6px; border-top: 1px solid #F0F2F8; padding-top: 10px; }

/* Retratos con tamaño garantizado (arregla el cuadro vacío del estado de cuenta) */
#acct-icon { width: 52px; height: 52px; display: inline-grid; flex: 0 0 auto; }
#acct-icon svg, #acct-icon img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.portrait-img { border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(13,20,38,.18); }
.bn-portrait .portrait-img { width: 100%; height: 100%; border: 3px solid rgba(255,255,255,.65); box-sizing: border-box; }

/* ============ v1.25 — Agente ============ */
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.agt-reasons { background: #F6F8FC; border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.6; white-space: pre-line; }
.badge-apto { background: #E7F7EE; color: #12A150; border-color: #C8ECD8; }
.badge-riesgo { background: #FFF4E5; color: #B9671A; border-color: #F5DEC0; }
.badge-descartado { background: #FDEBEA; color: #C0392B; border-color: #F5CFCB; }
.badge-esperar { background: #F1F3F8; color: #5A6478; }
.ag-yes { color: #12A150; font-weight: 600; } .ag-no { color: #C0392B; font-weight: 600; }
@media (max-width: 760px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* Bitácora del agente */
.agent-log { padding: 10px 16px 14px; font-size: 11.5px; line-height: 1.7; max-height: 260px; overflow: auto; }
.agent-log-row { border-bottom: 1px dashed #EDF0F7; padding: 2px 0; }
.agent-log-bad { color: #C0392B; }
.agent-log-running { color: #2450E6; font-weight: 600; }
.data-credit { float: right; font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: #2450E6; text-decoration: none; border: 1px solid #D7E1FB; border-radius: 20px; padding: 2px 10px; }
.data-credit:hover { background: #EEF3FF; }

/* TradingView embebido */
.tv-tape { height: 46px; margin-bottom: 14px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #E7EBF3; }
.tradingview-widget-container { height: 100%; }
#tv-screener, #tv-ta, #mkt-tv, #agc-chart { border-radius: 10px; overflow: hidden; }
#agc-symbols { flex-wrap: wrap; justify-content: flex-end; }
