/* router/assets/router.css — 🔀 Bytgon API Router · sistema de diseño (v168)
   Azul y blanco corporativo de Bytgon. Claro/oscuro, movimiento sutil,
   componentes reutilizables por las 5 páginas (landing, precios, panel,
   docs, admin). Sin frameworks. */

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

:root {
  --b-50: #f2f6ff; --b-100: #e3ecff; --b-200: #c2d4ff; --b-300: #94b3ff; --b-400: #5f8dff;
  --b-500: #1d5cff; --b-600: #1247d9; --b-700: #0c36ad; --b-800: #0a2a82; --b-900: #071f5c;
  --ink: #0b1a3a; --ink-2: #33456b; --muted: #6b7a99; --faint: #9aa8c4;
  --bg: #ffffff; --bg-2: #f6f8fd; --bg-3: #eef2fb; --surface: #ffffff; --surface-2: #f8faff;
  --border: #e2e8f5; --border-2: #cdd7ec;
  --ok: #12a05e; --ok-bg: #e7f8ef; --warn: #d98a06; --warn-bg: #fff5e1; --bad: #d92d20; --bad-bg: #fdecea; --info: #1d5cff; --info-bg: #e3ecff;
  --shadow-1: 0 1px 2px rgba(11, 26, 58, .05), 0 1px 3px rgba(11, 26, 58, .06);
  --shadow-2: 0 6px 24px -8px rgba(29, 92, 255, .18), 0 2px 8px rgba(11, 26, 58, .06);
  --shadow-3: 0 24px 60px -20px rgba(29, 92, 255, .35);
  --r: 14px; --r-sm: 9px; --r-lg: 22px; --r-pill: 999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --nav-h: 66px; --side-w: 256px;
  /* gráficos: azul secuencial + categórico fijo (orden inmutable) */
  --c1: #1d5cff; --c2: #f59e0b; --c3: #10b981; --c4: #8b5cf6; --c5: #ef4444; --c6: #06b6d4; --c7: #ec4899; --c8: #84cc16; --c-other: #94a3b8;
  --seq-1: #dbe6ff; --seq-2: #a9c3ff; --seq-3: #6f97ff; --seq-4: #1d5cff; --seq-5: #0c36ad;
  --grid: #e9eef8;
  color-scheme: light;
}
[data-theme="dark"] {
  --ink: #e9eefc; --ink-2: #c6d0ea; --muted: #93a3c4; --faint: #6c7ea3;
  --bg: #070d1c; --bg-2: #0b1428; --bg-3: #0f1a33; --surface: #0e1730; --surface-2: #121e3b;
  --border: #1b2847; --border-2: #263659;
  --ok-bg: rgba(18, 160, 94, .16); --warn-bg: rgba(217, 138, 6, .16); --bad-bg: rgba(217, 45, 32, .16); --info-bg: rgba(29, 92, 255, .18);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 8px 28px -10px rgba(0, 0, 0, .6); --shadow-3: 0 24px 60px -20px rgba(29, 92, 255, .35);
  --b-50: #0f1a33; --b-100: #13224a; --b-200: #1a2f66;
  --seq-1: #16264d; --seq-2: #1f3f8a; --seq-3: #3866d9; --seq-4: #5f8dff; --seq-5: #a9c3ff;
  --grid: #1b2847;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: var(--b-500); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(30px, 5vw, 54px); } h2 { font-size: clamp(22px, 3vw, 34px); } h3 { font-size: 19px; } h4 { font-size: 15px; }
p { margin: 0 0 1em; } p.lead { font-size: 18px; color: var(--ink-2); }
code, pre, .mono { font-family: var(--mono); }
code { background: var(--bg-3); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
pre { background: #0b1a3a; color: #e9eefc; padding: 16px 18px; border-radius: var(--r); overflow: auto; font-size: 13px; line-height: 1.55; margin: 0 0 14px; position: relative; }
[data-theme="dark"] pre { background: #060c1a; border: 1px solid var(--border); }
pre code { background: transparent; padding: 0; color: inherit; }
pre .cp { position: absolute; top: 8px; right: 8px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
img { max-width: 100%; }
::selection { background: var(--b-200); color: var(--b-900); }
.sr { position: absolute; left: -9999px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .ink2 { color: var(--ink-2); }
.small { font-size: 13px; } .tiny { font-size: 12px; } .big { font-size: 18px; }
.b { font-weight: 700; } .sb { font-weight: 600; }
.right { text-align: right; } .center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0 } .mt1 { margin-top: 8px } .mt2 { margin-top: 16px } .mt3 { margin-top: 24px } .mt4 { margin-top: 40px }
.mb0 { margin-bottom: 0 } .mb1 { margin-bottom: 8px } .mb2 { margin-bottom: 16px } .mb3 { margin-bottom: 24px }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.wrap.narrow { max-width: 860px; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--nav-h); backdrop-filter: saturate(160%) blur(14px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--b-500), var(--b-700)); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -6px rgba(29, 92, 255, .6); }
.brand small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; line-height: 1; margin-top: 2px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { padding: 8px 12px; border-radius: var(--r-pill); color: var(--ink-2); font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--bg-3); text-decoration: none; }
.nav a.active { background: var(--b-100); color: var(--b-700); }
.topbar .spacer { flex: 1; }
.burger { display: none; }
@media (max-width: 860px) { .nav { display: none; } .burger { display: inline-flex; } .topbar .hide-m { display: none; } }
.mobile-nav { display: none; position: fixed; inset: var(--nav-h) 0 0; background: var(--bg); z-index: 49; padding: 20px; flex-direction: column; gap: 6px; }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 14px; border-radius: var(--r); font-weight: 700; font-size: 17px; border: 1px solid var(--border); }

/* ---------- botones ---------- */
.btn { --bg-btn: var(--b-500); --fg-btn: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--bg-btn); color: var(--fg-btn); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease, filter .2s; white-space: nowrap; line-height: 1.2; text-decoration: none; }
.btn:hover { filter: brightness(1.06); text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(29, 92, 255, .6); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { --bg-btn: transparent; --fg-btn: var(--ink); border-color: var(--border-2); }
.btn.ghost:hover { background: var(--bg-3); box-shadow: none; }
.btn.soft { --bg-btn: var(--b-100); --fg-btn: var(--b-700); }
.btn.soft:hover { box-shadow: none; }
.btn.danger { --bg-btn: var(--bad); }
.btn.danger.soft { --bg-btn: var(--bad-bg); --fg-btn: var(--bad); }
.btn.ok { --bg-btn: var(--ok); }
.btn.white { --bg-btn: #fff; --fg-btn: var(--b-700); }
.btn.lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.xs { padding: 3px 8px; font-size: 12px; border-radius: 7px; }
.btn.icon { padding: 8px; width: 36px; height: 36px; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn .spin { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.btn.ghost .spin, .btn.soft .spin { border-color: var(--b-200); border-top-color: var(--b-600); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 10px 12px; outline: none; transition: border .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--b-400); box-shadow: 0 0 0 3px var(--b-100); }
.input.mono { font-family: var(--mono); font-size: 13px; }
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7a99' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.help { font-size: 12.5px; color: var(--muted); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--border-2); cursor: pointer; transition: background .2s; flex: none; border: 0; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch[aria-checked="true"] { background: var(--b-500); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--b-500); }

/* ---------- tarjetas y superficies ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-1); }
.card.pad0 { padding: 0; overflow: hidden; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card.hl { border-color: var(--b-300); box-shadow: 0 0 0 4px var(--b-50), var(--shadow-2); }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); transition: transform .2s, box-shadow .2s; }
.card > h3:first-child, .card > .card-h:first-child { margin-bottom: 12px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-h h3 { margin: 0; }
.glass { background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(14px); }
.stat { padding: 18px 20px; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.stat .v.money { font-family: var(--mono); font-size: 26px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; background: var(--bg-3); color: var(--ink-2); line-height: 1.2; white-space: nowrap; }
.pill.blue { background: var(--info-bg); color: var(--b-700); } [data-theme="dark"] .pill.blue { color: var(--b-300); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.mono { font-family: var(--mono); font-weight: 600; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: var(--b-100); color: var(--b-700); text-transform: uppercase; }
[data-theme="dark"] .badge { color: var(--b-300); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--border); color: var(--ink-2); background: var(--surface); }
.tag svg { width: 12px; height: 12px; }
.tag.cap-tools { color: #7c3aed; border-color: #ddd6fe; background: #f5f3ff; } .tag.cap-vision { color: #0369a1; border-color: #bae6fd; background: #f0f9ff; }
.tag.cap-image { color: #be185d; border-color: #fbcfe8; background: #fdf2f8; } .tag.cap-reasoning { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.tag.cap-cache { color: #047857; border-color: #a7f3d0; background: #ecfdf5; } .tag.cap-json { color: #334155; border-color: #cbd5e1; background: #f8fafc; }
.tag.cap-code { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; } .tag.cap-audio { color: #9333ea; border-color: #e9d5ff; background: #faf5ff; } .tag.cap-video { color: #c2410c; border-color: #fed7aa; background: #fff7ed; }
[data-theme="dark"] .tag[class*="cap-"] { background: transparent; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--border-2); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s; user-select: none; }
.chip:hover { border-color: var(--b-300); color: var(--b-700); }
.chip.on { background: var(--b-500); border-color: var(--b-500); color: #fff; box-shadow: 0 6px 14px -8px rgba(29, 92, 255, .8); }
.chip img, .chip .vicon { width: 16px; height: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); font-size: 14px; }
.callout.info { background: var(--info-bg); border-color: var(--b-200); color: var(--ink); }
.callout.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.callout.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.callout.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 8px; }
.skeleton { background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-2) 50%, var(--bg-3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; min-height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.progress { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--b-400), var(--b-600)); border-radius: 999px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--b-400), var(--b-700)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.vicon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--bg-3); flex: none; overflow: hidden; font-size: 11px; font-weight: 800; color: #fff; }
.vicon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vicon.lg { width: 34px; height: 34px; border-radius: 9px; }
.vicon.lg img { padding: 4px; }
[data-theme="dark"] .vicon { background: #fff; }

/* ---------- tablas ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; z-index: 2; white-space: nowrap; }
.t th.sortable { cursor: pointer; user-select: none; } .t th.sortable:hover { color: var(--b-600); }
.t th .arr { opacity: .35; margin-left: 4px; } .t th.on .arr { opacity: 1; color: var(--b-600); }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .12s; } .t tbody tr:hover { background: var(--bg-2); }
.t tr.clickable { cursor: pointer; }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.t td.mono { font-family: var(--mono); font-size: 12.5px; }
.t .sub { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.t.compact td { padding: 8px 12px; } .t.compact th { padding: 8px 12px; }
.price { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.price small { color: var(--muted); font-weight: 500; font-family: var(--font); }
.strike { text-decoration: line-through; color: var(--faint); font-family: var(--mono); font-size: 12px; }
.save { display: inline-flex; padding: 2px 7px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); font-weight: 800; font-size: 11.5px; font-family: var(--mono); }
.save.neg { background: var(--bad-bg); color: var(--bad); }
.bar { height: 6px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--b-500); border-radius: 999px; }

/* ---------- tabs ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-3); border-radius: var(--r-pill); }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: var(--r-pill); font: inherit; font-weight: 700; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.tabs button.on { background: var(--surface); color: var(--b-700); box-shadow: var(--shadow-1); }
[data-theme="dark"] .tabs button.on { color: var(--b-300); }
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--r-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 12px; font: inherit; font-weight: 700; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border-2); }
.seg button.on { background: var(--b-500); color: #fff; }

/* ---------- layout del panel ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: calc(100vh - var(--nav-h)); }
.side { border-right: 1px solid var(--border); background: var(--surface-2); padding: 16px 12px; position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow: auto; }
.side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; padding: 14px 12px 6px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.side a:hover { background: var(--bg-3); text-decoration: none; }
.side a.active { background: var(--b-100); color: var(--b-700); } [data-theme="dark"] .side a.active { color: var(--b-300); }
.side a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.side .bal { margin: 4px 12px 8px; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, var(--b-600), var(--b-800)); color: #fff; box-shadow: var(--shadow-2); }
.side .bal .k { font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.side .bal .v { font-size: 24px; font-weight: 800; font-family: var(--mono); letter-spacing: -.02em; margin: 2px 0 8px; }
.side .bal .btn { --bg-btn: #fff; --fg-btn: var(--b-700); width: 100%; }
.main { padding: 26px 28px 60px; min-width: 0; }
.main > section { animation: fadeUp .35s ease both; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-h h2 { margin: 0; } .page-h p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; } .side { position: fixed; inset: var(--nav-h) auto 0 0; width: min(300px, 86vw); z-index: 48; transform: translateX(-105%); transition: transform .25s; box-shadow: var(--shadow-3); } .side.open { transform: none; } .main { padding: 18px 16px 90px; } }
.side-backdrop { display: none; position: fixed; inset: 0; background: rgba(4, 10, 30, .5); z-index: 47; } .side-backdrop.open { display: block; }

/* ---------- modales y toasts ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(4, 10, 30, .55); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .18s ease; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); width: min(560px, 100%); max-height: 92vh; overflow: auto; box-shadow: var(--shadow-3); animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.modal.wide { width: min(880px, 100%); }
.modal .mh { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.modal .mh h3 { margin: 0; }
.modal .mb { padding: 16px 22px 22px; }
.modal .mf { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 20px; }
@keyframes fade { from { opacity: 0 } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98) } }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-3); animation: pop .25s ease; max-width: 380px; display: flex; gap: 10px; align-items: center; }
[data-theme="dark"] .toast { background: #e9eefc; color: #0b1a3a; }
.toast.ok { background: var(--ok); color: #fff; } .toast.bad { background: var(--bad); color: #fff; } .toast.warn { background: var(--warn); color: #fff; }

/* ---------- gráficos ---------- */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--grid); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar-r { transition: opacity .15s; } .chart:hover .bar-r { opacity: .55; } .chart .bar-r:hover { opacity: 1 !important; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; line-height: 1.4; box-shadow: var(--shadow-2); transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 5; }
[data-theme="dark"] .chart-tip { background: #e9eefc; color: #0b1a3a; }
.chart-tip.on { opacity: 1; }
.chart-tip b { font-family: var(--mono); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 1fr) 3fr auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 13.5px; }
.hbar .n { display: flex; align-items: center; gap: 8px; min-width: 0; } .hbar .n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .v { font-family: var(--mono); font-weight: 600; font-size: 12.5px; }

/* ---------- landing ---------- */
.hero { position: relative; padding: 84px 0 60px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(60% 60% at 30% 20%, rgba(29, 92, 255, .18), transparent 60%), radial-gradient(40% 50% at 80% 10%, rgba(95, 141, 255, .18), transparent 60%); pointer-events: none; z-index: -1; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-1); }
.hero .eyebrow .badge { border-radius: 999px; }
.hero h1 { margin: 18px 0 14px; max-width: 860px; }
.hero h1 .g { background: linear-gradient(90deg, var(--b-500), var(--b-700) 60%, #5f8dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 680px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.hero .trust { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.hero .trust b { color: var(--ink); font-size: 22px; display: block; letter-spacing: -.02em; }
.orbit { position: absolute; right: -60px; top: 40px; width: 560px; height: 560px; pointer-events: none; opacity: .9; }
@media (max-width: 1100px) { .orbit { display: none; } }
.feature { padding: 22px; }
.feature .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--b-100); color: var(--b-600); margin-bottom: 12px; }
.feature .ic svg { width: 20px; height: 20px; }
[data-theme="dark"] .feature .ic { color: var(--b-300); }
.steps { counter-reset: s; }
.step { position: relative; padding: 22px 22px 22px 66px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 20px; top: 20px; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--b-500), var(--b-700)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.section { padding: 56px 0; }
.section.alt { background: var(--bg-2); }
.section-h { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.section-h .badge { margin-bottom: 12px; }
.faq details { border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px; margin-bottom: 8px; background: var(--surface); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: '+'; font-size: 20px; color: var(--muted); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
footer.foot { border-top: 1px solid var(--border); padding: 36px 0; color: var(--muted); font-size: 13.5px; }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.foot a { color: var(--ink-2); margin-right: 14px; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 30px 0 80px; }
.docs .toc { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; max-height: calc(100vh - var(--nav-h) - 40px); overflow: auto; }
.docs .toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.docs .toc a:hover { background: var(--bg-3); text-decoration: none; } .docs .toc a.active { color: var(--b-600); background: var(--b-50); font-weight: 700; }
.docs .toc .g { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; padding: 14px 10px 4px; }
.docs article h2 { margin-top: 44px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 26px; }
.docs article h2:first-child { margin-top: 0; border: 0; }
.docs article h3 { margin-top: 26px; }
.docs article p, .docs article li { color: var(--ink-2); }
.docs .t td { vertical-align: top; }
@media (max-width: 900px) { .docs { grid-template-columns: 1fr; } .docs .toc { position: static; max-height: none; } }
.code-tabs { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.code-tabs .ct { display: flex; gap: 2px; background: var(--surface-2); padding: 6px; border-bottom: 1px solid var(--border); overflow: auto; }
.code-tabs .ct button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.code-tabs .ct button.on { background: var(--surface); color: var(--b-700); box-shadow: var(--shadow-1); }
.code-tabs pre { margin: 0; border-radius: 0; }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: calc(100vh - var(--nav-h) - 100px); min-height: 520px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.chat .ch { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.chat .cm { overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 16px; line-height: 1.55; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.msg.u { align-self: flex-end; background: var(--b-500); color: #fff; border-bottom-right-radius: 5px; }
.msg.a { align-self: flex-start; background: var(--bg-3); border-bottom-left-radius: 5px; }
.msg.a .meta { font-size: 11.5px; color: var(--muted); margin-top: 8px; font-family: var(--mono); }
.msg img { border-radius: 10px; max-width: 100%; margin-top: 6px; }
.chat .ci { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat .ci textarea { flex: 1; min-height: 44px; max-height: 160px; }
.chat-side { border-left: 1px solid var(--border); padding: 12px; overflow: auto; }
.chat-side .conv { padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; }
.chat-side .conv:hover { background: var(--bg-3); } .chat-side .conv.on { background: var(--b-100); color: var(--b-700); }

/* ---------- animaciones ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s } .reveal.d2 { transition-delay: .16s } .reveal.d3 { transition-delay: .24s } .reveal.d4 { transition-delay: .32s }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes floaty { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
.floaty { animation: floaty 5s ease-in-out infinite; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(29, 92, 255, .45) } 100% { box-shadow: 0 0 0 14px rgba(29, 92, 255, 0) } }
.pulse { animation: pulse-ring 1.8s infinite; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* ---------- utilidades varias ---------- */
.copyable { cursor: pointer; border-bottom: 1px dashed var(--border-2); }
.copyable:hover { color: var(--b-600); border-color: var(--b-400); }
.keybox { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px dashed var(--b-300); border-radius: var(--r); background: var(--b-50); font-family: var(--mono); font-size: 13.5px; word-break: break-all; }
[data-theme="dark"] .keybox { background: var(--b-100); }
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.amount-grid button { border: 1px solid var(--border-2); background: var(--surface); border-radius: 12px; padding: 16px 8px; font: inherit; font-weight: 800; font-size: 18px; color: var(--ink); cursor: pointer; transition: all .15s; position: relative; }
.amount-grid button small { display: block; font-size: 11px; color: var(--ok); font-weight: 700; margin-top: 2px; }
.amount-grid button:hover { border-color: var(--b-400); transform: translateY(-2px); }
.amount-grid button.on { background: var(--b-500); color: #fff; border-color: var(--b-500); box-shadow: var(--shadow-2); }
.amount-grid button.on small { color: #dfe9ff; }
@media (max-width: 560px) { .amount-grid { grid-template-columns: repeat(2, 1fr); } }
.method { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 12px; cursor: pointer; font-weight: 700; }
.method.on { border-color: var(--b-500); background: var(--b-50); }
.big-num { font-size: 44px; font-weight: 800; letter-spacing: -.03em; font-family: var(--mono); }
.sticky-bottom { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 0; }
.two { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .two { grid-template-columns: 1fr; } }
.model-card { display: flex; gap: 12px; align-items: center; padding: 14px; }
.model-card .nm { font-weight: 700; font-family: var(--mono); font-size: 13.5px; }
.model-card .pr { margin-left: auto; text-align: right; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
details.adv { margin-top: 10px; } details.adv summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; }
.num-in { font-family: var(--mono); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13.5px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; font-family: var(--mono); }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.loading-page { display: grid; place-items: center; min-height: 40vh; color: var(--muted); }
.login-wrap { max-width: 460px; margin: 40px auto; }
.login-wrap .card { padding: 28px; }
.gbtn { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
[data-theme="dark"] .gbtn { background: #fff; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.otp { display: flex; gap: 6px; }
.otp input { width: 100%; text-align: center; font-family: var(--mono); font-size: 22px; letter-spacing: .3em; }
.onboard li { margin-bottom: 8px; }
.notice-bar { background: linear-gradient(90deg, var(--b-600), var(--b-800)); color: #fff; font-size: 13.5px; padding: 8px 0; text-align: center; }
.notice-bar a { color: #fff; text-decoration: underline; }
.mini-table td { padding: 6px 8px; font-size: 13px; border-bottom: 1px solid var(--border); }
