/* ───────── Tokens ───────── */
:root {
  --bg: #fbfbfd; --bg-soft: #f3f4fa; --card: #ffffff; --ink: #0f172a; --ink-2: #334155; --muted: #64748b;
  --line: #e5e7f0; --line-2: #d6d9e8;
  --brand: #5b5bf0; --brand-2: #a855f7; --brand-ink: #ffffff; --brand-soft: #eef0ff;
  --ok: #059669; --ok-soft: #d9f7ec; --warn: #b45309; --warn-soft: #fff3d6; --err: #dc2626; --err-soft: #fde4e4;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 30px rgba(36,40,96,.08);
  --shadow-lg: 0 20px 60px rgba(55,48,163,.18);
  --radius: 16px; --radius-sm: 10px;
  --grad: linear-gradient(135deg, #5b5bf0 0%, #a855f7 100%);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e1c; --bg-soft: #0f1428; --card: #121936; --ink: #eef0fb; --ink-2: #c3c9e4; --muted: #8a93b8;
    --line: #222b4d; --line-2: #2c3760;
    --brand: #8b8cff; --brand-2: #c084fc; --brand-ink: #0a0e1c; --brand-soft: #1a2150;
    --ok: #34d399; --ok-soft: #0d3a2e; --warn: #fbbf24; --warn-soft: #3a2b08; --err: #f87171; --err-soft: #451a1a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.55);
    --grad: linear-gradient(135deg, #7c7dff 0%, #c084fc 100%);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ───────── Botones e inputs ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; font: 600 .95rem var(--font); cursor: pointer; text-decoration: none !important; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(99,102,241,.35); }
.btn-primary:hover { box-shadow: 0 10px 28px rgba(99,102,241,.5); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
input, select { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--muted); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; font-weight: 400; color: var(--muted); margin-top: 16px; cursor: pointer; }
.check input { width: 18px; min-height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.field-msg { margin-top: 12px; font-size: .9rem; min-height: 1.4em; }
.field-msg.err { color: var(--err); } .field-msg.ok { color: var(--ok); }

/* ───────── Logo y navegación ───────── */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; color: var(--ink); text-decoration: none !important; }
.logo svg { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 4px 14px rgba(99,102,241,.4); }
.nav { position: sticky; top: 0; z-index: 30; backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a.plain { color: var(--ink-2); font-weight: 500; font-size: .95rem; }

/* ───────── Landing ───────── */
.hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); opacity: .55; }
.hero::before { width: 520px; height: 520px; background: #8b5cf6; top: -180px; right: -120px; opacity: .28; }
.hero::after { width: 460px; height: 460px; background: #22d3ee; bottom: -200px; left: -160px; opacity: .2; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .82rem; border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
h1.display { font-size: clamp(2.2rem, 5.2vw, 3.7rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; margin: 18px 0 16px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .9rem; }
.ticks li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 6px; }

.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-lg); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg-soft); border-radius: 12px; }
.tabs button { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 600 .9rem var(--font); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.auth-card h2 { margin: 18px 0 2px; font-size: 1.25rem; letter-spacing: -.02em; }
.auth-card .sub { margin: 0 0 4px; color: var(--muted); font-size: .92rem; }
.auth-card .btn { width: 100%; margin-top: 18px; }

/* Mock de producto */
.mock-wrap { margin-top: 56px; }
.mock { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-lg); }
.mock .col { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.mock .col h3 { margin: 0 0 12px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.mock .arrow { display: grid; place-items: center; color: var(--brand); }
.mock .arrow svg { width: 40px; height: 40px; }
.line { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: .93rem; }
.chip-s { flex: none; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); margin-top: 2px; white-space: nowrap; }
.chip-s.b { background: var(--ok-soft); color: var(--ok); }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; margin: 8px 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: .92rem; }
.task .box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.task small { display: block; color: var(--muted); }
.ex-badge { position: absolute; right: 18px; top: -12px; background: var(--ink); color: var(--bg); font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .06em; }
.mock { position: relative; }

.section { padding: 80px 0; }
.section.alt { background: var(--bg-soft); }
.eyebrow { color: var(--brand); font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
h2.title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -.03em; margin: 10px 0 12px; }
.sec-lead { color: var(--ink-2); max-width: 38em; font-size: 1.05rem; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; counter-reset: paso; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.step::before { counter-increment: paso; content: counter(paso); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 14px; }
.step h3, .feat h3 { margin: 0 0 6px; font-size: 1.1rem; letter-spacing: -.01em; }
.step p, .feat p { margin: 0; color: var(--ink-2); font-size: .96rem; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feat .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.feat .ico svg { width: 22px; height: 22px; }
.cta-band { margin: 0 auto; padding: 44px; border-radius: 28px; background: var(--grad); color: #fff; text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.03em; }
.cta-band p { margin: 0 0 22px; opacity: .9; }
.cta-band .btn { background: #fff; color: #4338ca; }
footer.site { padding: 36px 0 48px; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); }
footer.site .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }

/* ───────── Panel ───────── */
.app-top .container { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.who { display: flex; align-items: center; gap: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.who .mail { color: var(--ink-2); font-size: .9rem; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { padding: 30px 0 80px; }
.page h1 { font-size: 1.7rem; letter-spacing: -.03em; margin: 0 0 4px; }
.page .hint { margin: 0 0 24px; color: var(--muted); }
.grid-app { display: grid; grid-template-columns: 5fr 7fr; gap: 20px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card h2 { margin: 0 0 4px; font-size: 1.05rem; letter-spacing: -.01em; }
.card .sub { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.usage { margin-top: 12px; }
.bar { height: 9px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .6s ease; }
.usage .nums { display: flex; justify-content: space-between; margin-top: 8px; font-size: .86rem; color: var(--muted); }
.callout { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; background: var(--brand-soft); border-radius: 12px; font-size: .86rem; color: var(--ink-2); }
.callout svg { flex: none; width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
details.more { margin-top: 12px; } details.more summary { cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--brand); }
.card .btn-full { width: 100%; margin-top: 18px; }

.mt-list { list-style: none; margin: 14px 0 0; padding: 0; }
.mt { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--card); transition: border-color .2s, box-shadow .2s; }
.mt:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.mt .t { font-weight: 650; letter-spacing: -.01em; }
.mt .d { color: var(--muted); font-size: .84rem; }
.mt .err { grid-column: 1 / -1; color: var(--err); font-size: .84rem; background: var(--err-soft); padding: 8px 10px; border-radius: 8px; }
.mt .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.mt .prog { grid-column: 1 / -1; display: flex; gap: 4px; }
.mt .prog i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.mt .prog i.on { background: var(--grad); }
.mt .prog i.now { background: var(--grad); animation: pulso 1.4s ease-in-out infinite; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.listo { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.error { color: var(--err); background: var(--err-soft); border-color: transparent; }
.badge.activo { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.activo::before { animation: pulso 1.2s ease-in-out infinite; }
.empty { text-align: center; padding: 34px 12px; color: var(--muted); }
.empty svg { width: 64px; height: 64px; margin: 0 auto 10px; color: var(--brand); opacity: .8; }
@keyframes pulso { 50% { opacity: .35; } }

/* Panel lateral con la minuta */
.scrim { position: fixed; inset: 0; background: rgba(8,10,25,.5); backdrop-filter: blur(3px); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: var(--bg); z-index: 41; transform: translateX(102%); transition: transform .28s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); border-left: 1px solid var(--line); }
body.open .scrim { opacity: 1; pointer-events: auto; } body.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.drawer-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.02em; }
.drawer-head .d { color: var(--muted); font-size: .86rem; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 14px; }
.drawer .tabs { margin: 0 22px; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 22px 40px; }
.doc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.doc h1 { font-size: 1.35rem; letter-spacing: -.02em; margin: 0 0 8px; }
.doc h2 { font-size: 1.02rem; margin: 22px 0 6px; padding-bottom: 5px; border-bottom: 1px solid var(--line); color: var(--brand); }
.doc p { margin: 6px 0; } .doc ul { margin: 6px 0; padding-left: 20px; } .doc li { margin: 4px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .9rem; table-layout: auto; }
.doc th { background: var(--brand-soft); text-align: left; } .doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; overflow-wrap: anywhere; vertical-align: top; }
.trans { white-space: pre-wrap; word-wrap: break-word; font: .88rem/1.65 ui-monospace, "Cascadia Code", Consolas, monospace; }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(440px, 100% - 24px); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: .92rem; box-shadow: var(--shadow-lg); animation: sube .25s ease; }
.toast.err { background: var(--err); color: #fff; }
@keyframes sube { from { transform: translateY(12px); opacity: 0; } }

/* ───────── Responsive ───────── */
@media (max-width: 920px) {
  .hero-grid, .grid-app { grid-template-columns: 1fr; }
  .steps, .feats { grid-template-columns: 1fr; }
  .mock { grid-template-columns: 1fr; } .mock .arrow svg { transform: rotate(90deg); }
  .hero { padding-top: 36px; } .section { padding: 56px 0; }
  .nav-links a.plain { display: none; }
}
@media (max-width: 480px) { .who .mail { display: none; } .cta-band { padding: 30px 20px; } .auth-card { padding: 20px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
