
:root {
  --bg: #0B0D12; --surface: #14171F; --surface-2: #1B1F29; --line: #262B36;
  --text: #E8EAF0; --muted: #8A91A3;
  --accent: #3DD6FF; --accent-ink: #0B0D12; --accent-text: #3DD6FF;
  --signal: #2EE6A6; --warn: #FFB547; --danger: #FF5C6C;
  --font-ui: "Geist", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;
  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px;
  --glow: 0 0 24px color-mix(in srgb, var(--accent) 25%, transparent);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #F0F2F5; --line: #E3E6EC;
    --text: #0F1218; --muted: #5E6575; --accent-text: #00739A;
    --signal: #0C9F6E; --warn: #B86E00; --danger: #D62F42; color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.mono, .label { font-family: var(--font-mono); }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.muted { color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent-text); }

/* navegación */
.nav { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 20px; letter-spacing: -0.03em; }
.brand img { width: 26px; height: 26px; }
.nav .links { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav .links a { text-decoration: none; color: var(--muted); font-size: 14px; }
.nav .links a:hover { color: var(--text); }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--text);
  font: 500 14px var(--font-ui); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { box-shadow: var(--glow); background: var(--accent); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn.ghost-danger { color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* tarjetas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card > .label:first-child { display: block; margin-bottom: 12px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--font-mono); text-transform: uppercase;
  letter-spacing: .06em; padding: 4px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok, .badge.signal { color: var(--signal); }
.badge.warn { color: var(--warn); }
.badge.fail, .badge.danger { color: var(--danger); }
.badge.info, .badge.muted { color: var(--muted); }

/* inputs */
input[type=text], input[type=email], input[type=password] { height: 44px; width: 100%; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 15px var(--font-ui); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }

/* landing */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .35; mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); }
.hero .sub { font-size: 18px; color: var(--muted); margin: 24px 0 32px; max-width: 520px; }
.scanbox { display: flex; gap: 8px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; max-width: 560px; }
.scanbox input { border: 0; background: transparent; font-family: var(--font-mono); }
.scanbox input:focus { box-shadow: none; }
.scanbox:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.scan-hint { margin-top: 12px; font-size: 13px; }
.form-error { color: var(--danger); font-size: 14px; margin-top: 12px; min-height: 20px; }

.radar { position: relative; aspect-ratio: 1; max-width: 440px; width: 100%; margin-left: auto; }
.radar .ring { position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 50%; }
.radar .ring:nth-child(2) { inset: 16%; } .radar .ring:nth-child(3) { inset: 32%; }
.radar .sweep { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, color-mix(in srgb, var(--accent) 35%, transparent), transparent 25%); animation: spin 4s linear infinite; }
.radar .tower { position: absolute; left: 50%; top: 50%; width: 22%; transform: translate(-50%, -50%); }
.radar .blip { position: absolute; width: 10px; height: 10px; border-radius: 50%; animation: blip 4s ease-out infinite; }
.radar .blip span { position: absolute; left: 16px; top: -6px; font: 11px var(--font-mono); white-space: nowrap; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); padding: 2px 6px; border-radius: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blip { 0%, 100% { opacity: .35; } 10% { opacity: 1; box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 20%, transparent); } }

section.block { padding: 96px 0; border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head h2 { font-size: 40px; margin-top: 12px; }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 17px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature h3 { font-size: 18px; margin: 16px 0 8px; }
.feature p { color: var(--muted); font-size: 14px; }
.ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-2); color: var(--accent-text); }
.ico svg { width: 20px; height: 20px; }
.steps { counter-reset: s; }
.step { position: relative; padding-top: 48px; }
.step::before { counter-increment: s; content: "0" counter(s); position: absolute; top: 0; font: 500 13px var(--font-mono); color: var(--accent-text); }
.step h3 { font-size: 18px; margin-bottom: 8px; } .step p { color: var(--muted); font-size: 14px; }

.price { display: flex; flex-direction: column; gap: 16px; }
.price.featured { border-color: var(--accent); box-shadow: var(--glow); }
.price .amount { font-size: 48px; font-weight: 600; letter-spacing: -0.03em; }
.price .amount small { font-size: 15px; color: var(--muted); font-weight: 400; }
.price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; flex: 1; }
.price li { display: flex; gap: 10px; } .price li::before { content: "→"; color: var(--accent-text); font-family: var(--font-mono); }

details.faq { border-bottom: 1px solid var(--line); padding: 20px 0; }
details.faq summary { cursor: pointer; font-weight: 500; font-size: 17px; list-style: none; display: flex; justify-content: space-between; }
details.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); }
details.faq[open] summary::after { content: "−"; }
details.faq p { color: var(--muted); margin-top: 12px; max-width: 720px; }

footer.foot { padding: 48px 0; color: var(--muted); font-size: 13px; }
footer.foot .wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* overlay de análisis */
.scanning { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px);
  display: none; place-items: center; }
.scanning.on { display: grid; }
.scanning .box { width: min(440px, 92vw); text-align: center; }
.scanning .radar { max-width: 200px; margin: 0 auto 32px; }
.scanning ol { list-style: none; padding: 0; margin: 24px 0 0; text-align: left; display: grid; gap: 8px; font: 13px var(--font-mono); }
.scanning li { color: var(--muted); opacity: .35; transition: opacity .3s; }
.scanning li.done { opacity: 1; } .scanning li.done::before { content: "✓ "; color: var(--signal); }
.scanning li.now { opacity: 1; color: var(--text); } .scanning li.now::before { content: "› "; color: var(--accent-text); }

/* informe */
.report-head { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; padding: 48px 0 32px; }
.grade { width: 128px; height: 128px; border-radius: 24px; display: grid; place-items: center; font-size: 72px; font-weight: 700;
  border: 2px solid currentColor; background: color-mix(in srgb, currentColor 10%, transparent); letter-spacing: -0.04em; }
.grade.signal { color: var(--signal); } .grade.warn { color: var(--warn); } .grade.danger { color: var(--danger); } .grade.muted { color: var(--muted); }
.grade.sm { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; border-width: 1px; }
.report-head h1 { font-size: 40px; font-family: var(--font-mono); letter-spacing: -0.02em; word-break: break-all; }
.counts { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.scorebar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 16px; max-width: 420px; }
.scorebar i { display: block; height: 100%; background: currentColor; border-radius: 99px; }
.cat { margin-top: 32px; }
.cat > .label { display: flex; justify-content: space-between; margin-bottom: 12px; }
.checks { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.chk { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--line); }
.chk:first-child { border-top: 0; }
.chk h3 { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.chk p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.chk .fix { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.chk .fix b { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); margin-right: 6px; }
.upsell { margin: 48px 0; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; border-color: var(--accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface)); }
.upsell h2 { font-size: 24px; }
.locked { opacity: .7; }

/* app */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 0 8px 20px; }
.side a.item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14px; }
.side a.item:hover { background: var(--surface-2); color: var(--text); }
.side a.item.on { background: var(--surface-2); color: var(--text); }
.side a.item svg { width: 16px; height: 16px; }
.side .foot { margin-top: auto; padding: 12px 10px; border-top: 1px solid var(--line); font-size: 13px; }
.main { min-width: 0; }
.topbar { height: 56px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 32px; gap: 16px; }
.content { padding: 32px; max-width: 1200px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title h1 { font-size: 28px; }
.kpi .v { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; margin-top: 4px; }
.kpi .s { font-size: 13px; color: var(--muted); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.t td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover { background: var(--surface-2); }
.tcard { padding: 0; overflow: hidden; }
.spark { width: 96px; height: 28px; color: var(--accent-text); }
.empty { text-align: center; padding: 64px 24px; }
.empty h3 { font-size: 20px; margin: 16px 0 8px; }
.add-row { display: flex; gap: 8px; }
.add-row input { font-family: var(--font-mono); }
.alert-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.alert-item:first-of-type { border-top: 0; }
.notice { padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 16px; font-size: 14px; }
.notice.ok { border-color: var(--signal); color: var(--signal); } .notice.err { border-color: var(--danger); color: var(--danger); }
.code { font: 13px var(--font-mono); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; word-break: break-all; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.split { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; }
.auth .card { width: min(400px, 100%); }
.auth h1 { font-size: 24px; margin: 24px 0 8px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; margin: 24px 0; }
.tabs a { flex: 1; text-align: center; padding: 6px; border-radius: 6px; text-decoration: none; font-size: 14px; color: var(--muted); }
.tabs a.on { background: var(--surface-2); color: var(--text); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
  .hero .radar { max-width: 280px; margin: 0 auto; }
  .grid3, .grid4 { grid-template-columns: 1fr 1fr; }
  .nav .links a:not(.btn) { display: none; }
  .report-head { grid-template-columns: auto 1fr; }
  .report-head .actions { grid-column: 1 / -1; }
  .chk { grid-template-columns: 1fr; gap: 8px; }
  .upsell { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .side .brand { padding: 0 8px 0 0; } .side .foot { display: none; }
  .content { padding: 24px 16px; } .topbar { padding: 0 16px; }
  .split { grid-template-columns: 1fr; }
  .hide-m { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .grid3, .grid4 { grid-template-columns: 1fr; }
  .scanbox { flex-direction: column; }
  .section-head h2 { font-size: 30px; }
  section.block { padding: 64px 0; }
  .grade { width: 88px; height: 88px; font-size: 48px; }
  .report-head h1 { font-size: 24px; }
}
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #F3F4F6; --line: #DDE1E7; --text: #0F1218; --muted: #555E6E; --accent-text: #00739A; --signal: #0C9F6E; --warn: #B86E00; --danger: #D62F42; }
  .nav, .upsell, .actions, footer.foot, .no-print { display: none !important; }
  .chk { break-inside: avoid; }
}
.nav .links a.btn.primary, .nav .links a.btn.primary:hover { color: var(--accent-ink); }

/* Pie con enlaces legales y páginas legales */
.foot .legal-links a { color: var(--muted); text-decoration: none; }
.foot .legal-links a:hover { color: var(--text); }
.legal-page { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; }
.legal-page h1 { font-size: 32px; margin-bottom: 20px; }
.legal-page h2 { font-size: 18px; margin: 28px 0 8px; }
.legal-page p, .legal-page li { color: var(--muted); margin-bottom: 8px; }
.legal-page ul { padding-left: 20px; }
.legal-page a { color: var(--accent-text); }
.info-basica { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 4px 0 16px; }
.info-basica a { color: var(--accent-text); }
.price .iva { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 4px; }
