:root {
  --bg: #f6f7f9; --panel: #fff; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --accent: #0369a1; --accent-ink: #fff;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7; --err: #b91c1c; --err-bg: #fee2e2; --info: #1d4ed8; --info-bg: #dbeafe;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 14px; letter-spacing: -0.01em; } h2 { font-size: 16px; margin: 22px 0 10px; } h3 { font-size: 14px; margin: 16px 0 8px; }
.container { max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; } .container.wide { max-width: 1500px; }
.topbar { display: flex; align-items: center; gap: 18px; padding: 0 18px; height: 52px; background: var(--ink); color: #cbd5e1; position: sticky; top: 0; z-index: 10; }
.brand { color: #fff; font-weight: 500; display: flex; align-items: center; gap: 8px; white-space: nowrap; } .brand strong { font-weight: 700; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: #38bdf8; display: inline-block; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav a { color: #cbd5e1; padding: 6px 10px; border-radius: 6px; white-space: nowrap; } .nav a:hover { background: #1e293b; text-decoration: none; color: #fff; }
.nav a.active { background: #1e293b; color: #fff; }
.userbox { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12px; } .mono { font-family: var(--mono); font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; } .neg { color: var(--err); } .pos { color: var(--ok); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.grid { display: grid; gap: 14px; } .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } } @media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; } .stat .value { font-size: 22px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; } th { background: #f8fafc; font-weight: 600; font-size: 12px; color: #334155; white-space: nowrap; }
tr:last-child td { border-bottom: 0; } tbody tr:hover td { background: #f8fafc; } td.num, th.num { text-align: right; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; }
.btn:hover { background: #f1f5f9; text-decoration: none; } .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } .btn-primary:hover { background: #075985; }
.btn-danger { background: var(--err); color: #fff; border-color: var(--err); } .btn-ghost { background: transparent; border-color: #334155; color: #cbd5e1; } .btn-ghost:hover { background: #1e293b; }
.btn-sm { padding: 4px 9px; font-size: 12px; } .btn[disabled] { opacity: .5; cursor: not-allowed; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; } .toolbar .spacer { flex: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 14px; } .filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bae6fd; border-color: var(--accent); }
label.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 13px; } label.field > span { color: var(--muted); font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; } .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; } .alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; } .alert-err { background: var(--err-bg); color: var(--err); border-color: #fecaca; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; } .alert-info { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); } .badge-err { background: var(--err-bg); color: var(--err); } .badge-info { background: var(--info-bg); color: var(--info); } .badge-muted { background: #e2e8f0; color: #334155; }
.empty { padding: 30px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.raw { margin-top: 14px; } .raw summary { cursor: pointer; color: var(--muted); font-size: 12px; } .raw pre, pre.code { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px; overflow: auto; font-size: 12px; line-height: 1.4; }
.auth-wrap { min-height: 90vh; display: flex; align-items: center; justify-content: center; } .auth-card { width: 380px; max-width: 100%; } .auth-card h1 { font-size: 18px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-all; }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 800px) { .dl { grid-template-columns: 1fr; } }
.preview { border: 2px solid var(--warn); background: #fffbeb; border-radius: var(--radius); padding: 16px; }
.hint { font-size: 12px; color: var(--muted); } .id { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.wallet-name .tipo { font-size: 11px; font-weight: 600; color: var(--info); margin-right: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; } .tabs a { padding: 8px 12px; border-bottom: 2px solid transparent; color: var(--muted); } .tabs a.active { color: var(--ink); border-color: var(--accent); }
.bar { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; } .bar > span { display: block; height: 100%; background: var(--accent); }
.inline-form { display: inline; }
.timeline td:first-child { white-space: nowrap; }
.env-select { background: #1e293b; color: #e2e8f0; border-color: #334155; padding: 4px 8px; font-size: 12px; border-radius: 6px; }

/* ===== Móvil ===== */
.nav-toggle { display: none; background: transparent; border: 1px solid #334155; color: #e2e8f0; border-radius: 6px; padding: 4px 9px; font-size: 16px; cursor: pointer; }
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; height: auto; min-height: 52px; padding: 8px 12px; gap: 10px; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; gap: 2px; order: 10; padding-bottom: 6px; }
  .nav.open { display: flex; }
  .nav a { padding: 9px 10px; }
  .userbox { flex-basis: 100%; justify-content: space-between; order: 11; }
  .container { padding: 14px 12px 60px; }
  h1 { font-size: 19px; }
  .filters { flex-direction: column; align-items: stretch; } .filters label { width: 100%; } .filters input, .filters select { width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; } .toolbar .spacer { display: none; }
  .stat .value { font-size: 18px; }
  .kv { grid-template-columns: 1fr; gap: 0 } .kv dt { margin-top: 6px; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .table-wrap table { display: table; white-space: normal; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { padding: 7px 8px; }
  .pager { flex-wrap: wrap; gap: 8px; }
  pre.code, .raw pre { font-size: 11px; }
  .preview { padding: 12px; }
}
