:root {
  --void: #06070a;
  --panel: #0a0c11;
  --panel2: #0c0f16;
  --line: #1a212b;          /* bordes finos (hairline) */
  --line2: #283442;
  --ink: #e9edf2;
  --dim: #6f7b8a;
  --cyan: #2de2ff;          /* escáner */
  --cyan-d: #0c93ad;
  --red: #ff2d3f;           /* alerta / peligro */
  --amber: #f5b301;         /* clasificado */
  --green: #21d07a;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Roboto Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#root { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }

::selection { background: var(--cyan); color: #04121a; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #070a0e; }
::-webkit-scrollbar-thumb { background: #1c2733; border: 1px solid #0c1016; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-d); }

/* ───── Fondo / overlays ───── */
/* pointer-events:none = decorativo, no debe robar clicks al contenido. */
.bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.scanlines {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.14) 2px 3px);
  opacity: 0.5;
}
.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* ───── Topbar ───── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: #080a0e;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  color: var(--cyan); border: 1px solid var(--line2);
  background: radial-gradient(circle at 50% 30%, rgba(45,226,255,0.14), transparent 70%);
  box-shadow: 0 0 18px rgba(45,226,255,0.10), inset 0 0 12px rgba(45,226,255,0.06);
}
.brand-name { font-size: 0.95rem; letter-spacing: 3px; font-weight: 500; }
.brand-name b { color: var(--cyan); font-weight: 700; }
.brand-sub { font-size: 0.62rem; letter-spacing: 2px; color: var(--dim); margin-top: 2px; }
.status { font-size: 0.66rem; letter-spacing: 2px; color: var(--green); display: flex; align-items: center; gap: 8px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

main { position: relative; z-index: 1; }

.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 14px 26px; color: var(--dim); font-size: 0.66rem; letter-spacing: 1.5px; }

/* ───── Panel + corner reticle ───── */
.panel { position: relative; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); }
.panel-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.66rem; letter-spacing: 2px; color: var(--cyan);
  padding: 11px 15px; border-bottom: 1px solid var(--line);
  background: rgba(45,226,255,0.03);
}
.cnr { position: absolute; width: 9px; height: 9px; z-index: 3; }
.cnr.tl { top: -1px; left: -1px; border-top: 1px solid var(--cyan); border-left: 1px solid var(--cyan); }
.cnr.tr { top: -1px; right: -1px; border-top: 1px solid var(--cyan); border-right: 1px solid var(--cyan); }
.cnr.bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--cyan); border-left: 1px solid var(--cyan); }
.cnr.br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--cyan); border-right: 1px solid var(--cyan); }

/* ───── Intake ───── */
.intake { display: flex; min-height: 64vh; align-items: center; }
.intake-inner { max-width: 680px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.66rem; letter-spacing: 3px; color: var(--cyan); border: 1px solid var(--line2); padding: 5px 11px; margin-bottom: 26px; }
.hero { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 0.92; letter-spacing: -1px; font-weight: 700; text-transform: uppercase; }
.hero-accent { color: transparent; -webkit-text-stroke: 1px var(--cyan); text-stroke: 1px var(--cyan); }
.hero-sub { color: var(--dim); margin: 22px 0 30px; max-width: 540px; font-size: 0.92rem; }

.cmd { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line2); background: #070a0e; padding: 4px 4px 4px 16px; }
.cmd:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 24px rgba(45,226,255,0.12); }
.cmd-prompt { color: var(--cyan); font-weight: 700; }
.cmd input { flex: 1; background: transparent; border: none; outline: none; color: var(--ink); font-family: var(--mono); font-size: 1rem; letter-spacing: 1px; padding: 12px 0; }
.cmd input::placeholder { color: #3f4a57; letter-spacing: 1px; }
.cmd button, .cmd .cmd-go {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #57edff, var(--cyan)); color: #04121a; border: none;
  font-family: var(--mono); font-weight: 700; letter-spacing: 2px; font-size: 0.8rem; padding: 14px 22px; cursor: pointer;
  box-shadow: 0 3px 0 #0a6f84, 0 8px 20px rgba(45,226,255,0.3); transition: filter 0.18s, box-shadow 0.18s;
}
.cmd .cmd-go:hover { filter: brightness(1.08); box-shadow: 0 5px 0 #0a6f84, 0 12px 30px rgba(45,226,255,0.5); }
.cmd .cmd-go::after { content: ''; position: absolute; top: 0; left: -130%; width: 55%; height: 100%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent); transform: skewX(-18deg); }
.cmd .cmd-go:hover::after { animation: sheen 0.7s ease; }

.err { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--red); font-size: 0.82rem; border-left: 2px solid var(--red); padding-left: 10px; }

.brief { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 22px; }
.brief-h { font-size: 0.64rem; letter-spacing: 2px; color: var(--dim); margin-bottom: 14px; }
.brief ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.brief li { position: relative; padding-left: 20px; color: var(--dim); font-size: 0.82rem; }
.brief li::before { content: '▸'; position: absolute; left: 0; color: var(--cyan); }
.brief li.warn-li { color: var(--ink); }
.brief li.warn-li::before { content: '⚠'; color: var(--amber); }

/* ───── Loading ───── */
.loading { display: flex; justify-content: center; padding-top: 30px; }
.loader-term { width: 100%; max-width: 760px; }
.term-body { padding: 16px 18px; min-height: 230px; font-size: 0.84rem; }
.term-line { padding: 3px 0; color: var(--dim); }
.term-line .ts { color: #3f4a57; }
.ok-t { color: var(--green); }
.bad-t { color: var(--red); }
.run { color: var(--amber); }
.cursor { color: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.decrypt { height: 4px; background: #11161d; margin: 0 18px; }
.decrypt-bar { height: 100%; background: linear-gradient(90deg, var(--cyan-d), var(--cyan)); box-shadow: 0 0 12px var(--cyan); }
.decrypt-label { padding: 10px 18px 16px; font-size: 0.64rem; letter-spacing: 2px; color: var(--cyan); }

/* ───── Results: dossier head ───── */
.dossier-head { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; padding: 18px 22px; margin-bottom: 18px; }
.dh-label { display: flex; align-items: center; gap: 8px; font-size: 0.64rem; letter-spacing: 2px; color: var(--amber); margin-bottom: 9px; }
.dh-label .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: pulse 1.4s infinite; }
.dh-url { display: flex; align-items: center; gap: 9px; font-size: 1.2rem; font-weight: 700; color: var(--ink); word-break: break-all; }
.dh-url svg { color: var(--cyan); flex-shrink: 0; }
.dh-meta { font-size: 0.72rem; color: var(--dim); margin-top: 6px; letter-spacing: 0.5px; }
.dh-chips { display: flex; gap: 7px; flex-wrap: wrap; align-self: center; }
.dh-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }

.chip {
  position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px 4px 8px;
  border: 1px solid var(--c); font-size: 0.66rem; letter-spacing: 1px;
  background: color-mix(in srgb, var(--c) 8%, #070a0e);
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 16%, transparent), inset 0 0 8px color-mix(in srgb, var(--c) 8%, transparent);
}
.chip::before { content: ''; width: 3px; height: 11px; background: var(--c); box-shadow: 0 0 6px var(--c); }
.chip-code { color: var(--c); font-weight: 700; }
.chip-n { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #141b25, #0a0e15);
  color: var(--ink); border: 1px solid var(--line2);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 1.5px; font-weight: 600;
  padding: 10px 14px; cursor: pointer;
  box-shadow: 0 2px 0 #04060a, 0 5px 12px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: box-shadow 0.18s, color 0.18s, border-color 0.18s, background 0.18s;
}
.mag-inner { display: inline-flex; align-items: center; gap: 7px; pointer-events: none; }
.btn:hover {
  color: var(--cyan); border-color: var(--cyan); background: linear-gradient(180deg, #18222f, #0b1019);
  box-shadow: 0 4px 0 #04060a, 0 12px 26px rgba(0,0,0,0.6), 0 0 24px rgba(45,226,255,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn.danger:hover { color: var(--red); border-color: var(--red); box-shadow: 0 4px 0 #04060a, 0 12px 26px rgba(0,0,0,0.6), 0 0 24px rgba(255,45,63,0.26), inset 0 1px 0 rgba(255,255,255,0.08); }
.btn svg { opacity: 0.95; }
.btn::after { content: ''; position: absolute; top: 0; left: -130%; width: 55%; height: 100%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(45,226,255,0.28), transparent); transform: skewX(-18deg); }
.btn:hover::after { animation: sheen 0.7s ease; }
@keyframes sheen { from { left: -130%; } to { left: 160%; } }

/* ───── Tabs ───── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  display: flex; align-items: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--line); color: var(--dim);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 1px; padding: 8px 12px; cursor: pointer; transition: all 0.15s;
}
.tab:hover { color: var(--ink); border-color: var(--line2); }
.tab.active { color: #04121a; background: var(--cyan); border-color: var(--cyan); }
.tab-badge { font-size: 0.66rem; background: rgba(255,255,255,0.08); padding: 1px 6px; font-variant-numeric: tabular-nums; }
.tab.active .tab-badge { background: rgba(0,0,0,0.22); }

/* ───── Layout ───── */
.layout { display: grid; grid-template-columns: 1fr 330px; gap: 18px; align-items: start; }
.content { min-width: 0; }
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 86px; }

/* ───── Summary cards ───── */
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sum-card { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 17px; cursor: pointer; overflow: hidden; }
.sum-card .f-edge, .finding .f-edge { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.sum-h { display: flex; align-items: center; gap: 9px; font-size: 0.78rem; letter-spacing: 1px; color: var(--ink); margin-bottom: 9px; }
.sum-h svg { color: var(--c); }
.sum-card p { font-size: 0.76rem; color: #c7cfd9; min-height: 44px; }
.sum-count { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.74rem; letter-spacing: 1.5px; }
.sum-count b { font-size: 1rem; }

/* ───── Findings ───── */
.f-list { display: flex; flex-direction: column; gap: 13px; }
.finding { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 17px 19px 18px 22px; overflow: hidden; }
.f-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 13px; }
.f-sevicon { flex-shrink: 0; filter: drop-shadow(0 0 6px currentColor); }
.sev-tag { font-size: 0.64rem; letter-spacing: 1.5px; font-weight: 700; color: var(--c); border: 1px solid var(--c); padding: 3px 8px; }
.cat-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.66rem; color: var(--dim); border: 1px solid var(--line); padding: 3px 8px; }
.f-title { flex: 1 1 100%; font-size: 1.02rem; font-weight: 700; letter-spacing: 0.2px; }
.f-body { display: grid; gap: 9px; }
.f-row { font-size: 0.85rem; }
.f-k { display: block; font-size: 0.62rem; letter-spacing: 2px; color: var(--cyan); margin-bottom: 3px; }
.f-v { color: #f1f4f8; }
.f-row.criollo .f-k { color: var(--amber); }
.f-row.criollo .f-v { color: #b9c2cd; font-style: italic; }
.evidence {
  font-family: var(--mono); font-size: 0.76rem; color: #9fb0c2; white-space: pre-wrap; word-break: break-word;
  background: #05080c; border: 1px solid var(--line); padding: 0 12px 11px; margin-top: 2px; overflow-x: auto;
}
.ev-bar { display: flex; align-items: center; gap: 5px; margin: 0 -12px 9px; padding: 7px 12px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 0.64rem; letter-spacing: 1px; }
.ev-bar i { width: 7px; height: 7px; border-radius: 50%; background: #2a3340; display: inline-block; }
.ev-bar i:first-child { background: var(--red); }
.ev-bar i:nth-child(2) { background: var(--amber); }
.ev-bar i:nth-child(3) { background: var(--green); }

.empty { text-align: center; padding: 54px 20px; color: var(--dim); }
.empty svg { color: var(--green); }
.empty p { margin-top: 12px; letter-spacing: 1px; }

/* ───── Data panels (headers/dns/ports) ───── */
.data-panel { padding-bottom: 8px; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 15px; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.line:last-child { border-bottom: none; }
.mono { font-family: var(--mono); white-space: pre; }
.dim { color: var(--dim); }
.small { font-size: 0.72rem; padding: 0 15px; }
.pill { font-size: 0.64rem; letter-spacing: 1px; font-weight: 700; padding: 2px 8px; border: 1px solid currentColor; }
.pill.ok { color: var(--green); }
.pill.bad { color: var(--red); }
.pill.warn { color: var(--amber); }
.ok-t { color: var(--green); }
.bad-t { color: var(--red); }
.alert-line { display: flex; align-items: center; gap: 7px; padding: 10px 15px 4px; color: var(--red); font-size: 0.74rem; }

/* ───── Gauge + glitch grade ───── */
.gauge-card { padding-bottom: 18px; }
.gauge { position: relative; width: 234px; height: 150px; margin: 10px auto 0; overflow: hidden; }
.gauge svg { display: block; position: relative; z-index: 1; }
.hud-ring {
  position: absolute; width: 210px; height: 210px; left: 50%; top: 120px; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: conic-gradient(from 0deg, transparent 0 76%, rgba(45,226,255,0.18) 88%, transparent 100%);
  animation: ringspin 5s linear infinite;
}
@keyframes ringspin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.grade {
  position: absolute; top: 56px; left: 0; right: 0; text-align: center; z-index: 2;
  font-size: 3.6rem; font-weight: 800; line-height: 1;
  text-shadow: 0 0 22px currentColor, 0 0 46px color-mix(in srgb, currentColor 35%, transparent);
  animation: gradePulse 3s ease-in-out infinite;
}
@keyframes gradePulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
.gauge-score { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; z-index: 2; letter-spacing: 1px; }
.risk { padding: 14px 16px 0; font-size: 0.78rem; color: var(--dim); line-height: 1.5; }

.mini .line:first-of-type { border-top: none; }

/* ───── Responsive ───── */
@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .dossier-head { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .summary-grid { grid-template-columns: 1fr; }
  .cmd { flex-wrap: wrap; }
  .hero { font-size: 2.4rem; }
}

/* Cursor del sistema (básico). */
.tab, .sum-card { cursor: pointer; }

/* ───── Iconos como módulos HUD biselados ───── */
.icon-mod {
  display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0;
  color: var(--c, var(--cyan));
  background: linear-gradient(155deg, rgba(255,255,255,0.06), rgba(0,0,0,0.25));
  border: 1px solid color-mix(in srgb, var(--c, var(--cyan)) 42%, transparent);
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--c, var(--cyan)) 13%, transparent), 0 2px 7px rgba(0,0,0,0.45);
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), box-shadow 0.28s, border-color 0.28s;
}
.f-sevicon.icon-mod { filter: none; }
.sum-card:hover .icon-mod, .finding:hover .icon-mod {
  transform: rotate(-5deg) scale(1.08);
  border-color: var(--c, var(--cyan));
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--c, var(--cyan)) 24%, transparent), 0 0 18px color-mix(in srgb, var(--c, var(--cyan)) 38%, transparent);
}

/* ───── Hover de tarjetas: glow + línea de escaneo ───── */
.sum-card, .finding { transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s; }
.sum-card:hover, .finding:hover {
  border-color: color-mix(in srgb, var(--c) 60%, var(--line2));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent), 0 16px 34px rgba(0,0,0,0.55), 0 0 32px color-mix(in srgb, var(--c) 12%, transparent);
}
.sum-card:hover .f-edge, .finding:hover .f-edge { width: 3px; box-shadow: 0 0 16px var(--c); }
.scanfx {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--c, var(--cyan)) 13%, transparent) 50%, transparent 100%);
  background-size: 100% 220%;
}
.sum-card:hover .scanfx, .finding:hover .scanfx { opacity: 1; animation: scansweep 1s ease; }
@keyframes scansweep { from { background-position: 0 -110%; } to { background-position: 0 220%; } }
.sum-card > *:not(.f-edge):not(.scanfx), .finding > *:not(.f-edge):not(.scanfx) { position: relative; z-index: 2; }

/* ───── Borde animado que viaja por el dossier ───── */
@property --bspin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.dossier-head::after {
  content: ''; position: absolute; inset: -1px; padding: 1px; pointer-events: none; z-index: 4;
  background: conic-gradient(from var(--bspin), transparent 0 70%, var(--cyan) 82%, #eafcff 87%, var(--cyan) 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: bspin 4.5s linear infinite;
}
@keyframes bspin { to { --bspin: 360deg; } }

/* ───── Prompt IA + referencias (por hallazgo / dimensión) ───── */
.f-foot { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line2); display: flex; flex-direction: column; gap: 11px; }
.prompt-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 1.5px; font-weight: 700;
  color: var(--cyan); background: color-mix(in srgb, var(--cyan) 8%, #070a0e);
  border: 1px solid color-mix(in srgb, var(--cyan) 45%, transparent); padding: 8px 12px;
  transition: background 0.15s, box-shadow 0.15s;
}
.prompt-btn:hover { background: color-mix(in srgb, var(--cyan) 16%, #070a0e); box-shadow: 0 0 16px rgba(45,226,255,0.25); }
.prompt-btn.sm { font-size: 0.62rem; padding: 6px 9px; letter-spacing: 1px; }
.f-refs { display: flex; flex-direction: column; gap: 6px; }
.refs-list { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.ref-link {
  display: inline-flex; align-items: center; gap: 5px; color: var(--dim); text-decoration: none;
  font-size: 0.74rem; border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.ref-link svg { color: var(--cyan); flex-shrink: 0; }
.ref-link:hover { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 40%, transparent); }
.sum-foot { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }

/* Sección plegable "Solución con IA" (preview del prompt). */
.solve-toggle {
  display: flex; align-items: center; gap: 9px; width: 100%; cursor: pointer; text-align: left;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 1.5px; font-weight: 700;
  color: var(--cyan); background: color-mix(in srgb, var(--cyan) 7%, #070a0e);
  border: 1px solid color-mix(in srgb, var(--cyan) 38%, transparent); padding: 11px 13px;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.solve-toggle:hover { background: color-mix(in srgb, var(--cyan) 14%, #070a0e); box-shadow: 0 0 16px rgba(45,226,255,0.2); }
.solve-toggle.open { border-color: var(--cyan); }
.solve-hint { margin-left: auto; color: var(--dim); font-weight: 400; letter-spacing: 0.4px; text-transform: none; font-size: 0.7rem; }
.solve-toggle.open .solve-hint { color: var(--cyan); }
.chev { transition: transform 0.25s; flex-shrink: 0; }
.solve-toggle.open .chev { transform: rotate(90deg); }
.solve-wrap { overflow: hidden; }
.solve-inner { padding-top: 12px; }
.solve-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.solve-bar > span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.62rem; letter-spacing: 1.5px; color: var(--amber); }
.prompt-preview {
  font-family: var(--mono); font-size: 0.74rem; line-height: 1.55; color: #d3e7f1; white-space: pre-wrap; word-break: break-word;
  background: #05080c; border: 1px solid var(--line); border-left: 2px solid var(--cyan);
  padding: 12px 13px; max-height: 300px; overflow: auto; margin-bottom: 13px;
}

/* ───── Nav superior (Auditoría / Recursos) ───── */
.topnav { display: flex; gap: 6px; }
.navlink {
  display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer;
  background: #0b0f15; border: 1px solid var(--line); color: var(--muted2);
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.5px; font-weight: 600; padding: 9px 11px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.navlink:hover { color: var(--ink); border-color: var(--line2); }
.navlink.active { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); background: color-mix(in srgb, var(--cyan) 9%, #0b0f15); }

/* ───── App shell (sidebar izquierdo persistente) ───── */
.shell { position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: 246px minmax(0, 1fr); width: 100%; align-items: start; }
.sidenav {
  position: sticky; top: 69px; align-self: start;
  height: calc(100vh - 69px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(9,11,16,0.45); border-right: 1px solid var(--line); padding: 16px 14px;
}
.shell-main { min-width: 0; padding: 30px 32px 44px; }
.load-more {
  grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line2); color: var(--cyan);
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 1px; font-weight: 700; padding: 14px; margin-top: 4px;
  transition: border-color 0.15s, background 0.15s;
}
.load-more:hover { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 8%, var(--panel)); }

/* ───── Directorio ───── */
.directory { display: flex; flex-direction: column; gap: 16px; }
.dir-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dir-toggle { display: flex; gap: 6px; }
.dt {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--dim);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 1px; font-weight: 600; padding: 10px 14px; transition: all 0.15s;
}
.dt:hover { color: var(--ink); border-color: var(--line2); }
.dt.active { background: var(--cyan); color: #04121a; border-color: var(--cyan); }
.dt-n { font-size: 0.66rem; background: rgba(255,255,255,0.1); padding: 1px 6px; }
.dt.active .dt-n { background: rgba(0,0,0,0.22); }
.dir-search { display: flex; align-items: center; gap: 9px; background: #070a0e; border: 1px solid var(--line2); padding: 9px 12px; width: 100%; min-width: 0; color: var(--dim); }
.dir-search:focus-within { border-color: var(--cyan); }
.dir-search input { flex: 1; background: transparent; border: none; outline: none; color: var(--ink); font-family: var(--mono); font-size: 0.85rem; }
.dir-search input::placeholder { color: #3f4a57; }

.dir-types { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-label { font-size: 0.62rem; letter-spacing: 2px; color: var(--dim); }
.tchip {
  cursor: pointer; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.5px; font-weight: 700;
  color: var(--dim); background: transparent; border: 1px solid var(--line2); padding: 5px 10px; transition: all 0.15s;
}
.tchip:hover { color: var(--ink); }
.tchip.on { color: #04121a; background: var(--c); border-color: var(--c); }

.dir-layout { display: grid; grid-template-columns: 252px 1fr; gap: 18px; align-items: start; }
.dir-rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 17px; background: var(--panel); border: 1px solid var(--line); padding: 15px; }
.rail-sec { display: flex; flex-direction: column; gap: 4px; }
.rail-h { font-size: 0.6rem; letter-spacing: 1.5px; color: var(--dim); padding: 0 2px 4px; }
.rail-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; text-align: left;
  background: #0b0f15; border: 1px solid var(--line); color: var(--muted2);
  font-family: var(--mono); font-size: 0.8rem; padding: 9px 11px; transition: all 0.15s;
}
.rail-toggle span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.rail-toggle:hover { color: var(--ink); border-color: var(--line2); }
.rail-toggle.active { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); background: color-mix(in srgb, var(--cyan) 9%, #0b0f15); }
.dir-types-v { display: flex; flex-wrap: wrap; gap: 6px; }
.dir-types-v .tchip { flex: 1 1 44%; text-align: center; }
.rail-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; text-align: left;
  background: transparent; border: none; color: var(--muted2); font-family: var(--mono); font-size: 0.78rem; padding: 7px 8px; transition: all 0.12s;
}
.rail-cat span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.rail-cat:hover { color: var(--ink); background: rgba(255,255,255,0.03); }
.rail-cat.active { color: var(--cyan); }
.rc-n { font-size: 0.66rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.rail-cat.active .rc-n { color: var(--cyan); }

.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 13px; align-content: start; }
.dir-card {
  position: relative; overflow: hidden; cursor: pointer; text-align: left;
  content-visibility: auto; contain-intrinsic-size: 0 134px;
  background: var(--panel); border: 1px solid var(--line); padding: 15px 16px;
  display: flex; flex-direction: column; gap: 8px; transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.dir-card:hover { border-color: color-mix(in srgb, var(--c) 55%, var(--line2)); box-shadow: 0 12px 26px rgba(0,0,0,0.5), 0 0 24px color-mix(in srgb, var(--c) 12%, transparent); transform: translateY(-2px); }
.dc-edge { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.dc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dc-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 0.64rem; letter-spacing: 0.5px; color: var(--dim); text-transform: uppercase; }
.tbadge { font-size: 0.6rem; letter-spacing: 0.5px; font-weight: 700; color: var(--c); border: 1px solid var(--c); padding: 2px 7px; white-space: nowrap; }
.dc-name { font-size: 1rem; font-weight: 700; color: var(--ink); }
.dc-tag { font-size: 0.78rem; color: #c7cfd9; line-height: 1.4; flex: 1; }
.dc-go { display: inline-flex; align-items: center; gap: 6px; font-size: 0.64rem; letter-spacing: 1px; color: var(--c); margin-top: 2px; }

/* ───── Modal de detalle ───── */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(3,5,8,0.78); backdrop-filter: blur(4px); }
.modal {
  position: relative; width: 100%; max-width: 640px; max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line2);
  padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 40px color-mix(in srgb, var(--c) 8%, transparent);
}
.modal-x { position: absolute; top: 14px; right: 14px; cursor: pointer; background: transparent; border: 1px solid var(--line2); color: var(--dim); padding: 6px; transition: all 0.15s; }
.modal-x:hover { color: var(--red); border-color: var(--red); }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.modal-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.modal-desc { color: #c7cfd9; line-height: 1.55; margin-bottom: 18px; }
.modal-block { margin-bottom: 16px; }
.mb-h { display: flex; align-items: center; gap: 7px; font-size: 0.62rem; letter-spacing: 1.5px; color: var(--cyan); margin-bottom: 8px; }
.mb-h.amber { color: var(--amber); }
.prompt-preview.code { color: #cbd6e2; }
.modal .prompt-btn { margin-top: 10px; }
.spec-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.spec-list li { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink); }
.spec-list svg { color: var(--c); flex-shrink: 0; }
.modal-doc { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); text-decoration: none; font-size: 0.76rem; border-bottom: 1px solid transparent; word-break: break-all; }
.modal-doc:hover { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 40%, transparent); }

/* ───── Vista de detalle (Directorio) ───── */
.detail { display: flex; flex-direction: column; gap: 18px; }
.back-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; background: transparent; border: none; color: var(--dim); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 1.5px; font-weight: 600; padding: 2px 0; transition: color 0.15s; }
.back-btn:hover { color: var(--cyan); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 282px; gap: 24px; align-items: start; }
.detail-main { min-width: 0; }
.detail-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.detail-icon { width: 62px; height: 62px; flex-shrink: 0; }
.detail-icon svg { width: 28px; height: 28px; }
.detail-title { font-size: 1.9rem; font-weight: 800; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; line-height: 1.1; }
.detail-tagline { color: var(--muted2); margin-top: 7px; font-size: 0.95rem; }
.detail-desc { color: #c7cfd9; line-height: 1.6; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.spec-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.spec-card { display: flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid var(--line); padding: 12px 13px; font-size: 0.84rem; color: var(--ink); }
.spec-card svg { color: var(--c, var(--green)); flex-shrink: 0; }

.detail-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 86px; }
.doc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--c, var(--cyan)); color: #04121a; text-decoration: none; font-family: var(--mono); font-weight: 700; letter-spacing: 1px; font-size: 0.74rem; padding: 13px; transition: filter 0.15s; }
.doc-btn:hover { filter: brightness(1.1); }
.ctx { background: var(--panel); border: 1px solid var(--line); padding: 14px; }
.ctx-h { font-size: 0.62rem; letter-spacing: 1.5px; color: var(--dim); margin-bottom: 10px; }
.ctx-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.74rem; letter-spacing: 0.5px; }
.ctx-row:last-child { border-bottom: none; }
.ctx-row span { color: var(--dim); }
.ctx-row b { color: var(--ink); font-weight: 700; }
.ctx-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.ctx-tag { font-size: 0.64rem; letter-spacing: 0.5px; color: var(--muted2); border: 1px solid var(--line2); padding: 4px 9px; text-transform: uppercase; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidenav { position: static; height: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

/* ───── Tab Remediar (Generador de Fix) ───── */
.fix-list { display: flex; flex-direction: column; gap: 14px; }
.fix-intro { display: flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 0.8rem; letter-spacing: 0.3px; }
.fix-block { padding: 0; overflow: hidden; }
.fix-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); background: rgba(45,226,255,0.03); }
.fix-title { font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.fix-sub { font-size: 0.72rem; color: var(--dim); margin-top: 3px; }
.fix-code { font-family: var(--mono); font-size: 0.78rem; line-height: 1.55; color: #cbe3ef; white-space: pre-wrap; word-break: break-word; padding: 14px 16px; overflow-x: auto; background: #05080c; }

/* ───── Modo Profundo + autorización (intake) ───── */
.deep-row { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; }
.deep-toggle {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  background: transparent; border: 1px solid var(--line2); color: var(--dim);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 1.5px; font-weight: 700; padding: 9px 13px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.deep-toggle:hover { color: var(--ink); border-color: var(--cyan); }
.deep-toggle.on { color: var(--red); border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }
.dt-box { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid currentColor; flex-shrink: 0; }
.dt-hint { color: var(--dim); font-weight: 400; letter-spacing: 0.4px; text-transform: none; }
.deep-toggle.on .dt-hint { color: color-mix(in srgb, var(--red) 65%, var(--dim)); }
.auth-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 0.82rem; color: var(--muted2); border-left: 2px solid var(--amber); padding: 7px 0 7px 11px; }
.auth-check input { accent-color: var(--amber); width: 15px; height: 15px; cursor: pointer; }
.auth-check svg { color: var(--amber); flex-shrink: 0; }
.auth-check.on { color: var(--ink); }
.auth-check b { color: var(--amber); }

/* ───── Boot + Login (OTP) ───── */
.boot { position: relative; z-index: 1; display: grid; place-items: center; min-height: 100vh; color: var(--cyan); font-family: var(--mono); letter-spacing: 3px; font-size: 0.8rem; animation: blink 1.2s steps(1) infinite; }
.login-wrap { position: relative; z-index: 1; display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card { width: 100%; max-width: 420px; padding: 28px 26px; }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-label { font-size: 0.64rem; letter-spacing: 1.5px; color: var(--dim); }
.login-input { display: flex; align-items: center; gap: 10px; background: #070a0e; border: 1px solid var(--line2); padding: 12px 14px; color: var(--dim); transition: border-color 0.15s, box-shadow 0.15s; }
.login-input:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.login-input input { flex: 1; background: transparent; border: none; outline: none; color: var(--ink); font-family: var(--mono); font-size: 0.95rem; letter-spacing: 1px; }
.login-input.code input { letter-spacing: 8px; font-size: 1.25rem; text-align: center; }
.login-input input::placeholder { color: #3f4a57; }
.login-suffix { color: var(--dim); font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.5px; white-space: nowrap; opacity: 0.85; }
.login-verifying { text-align: center; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 1px; color: var(--dim); margin-top: 2px; min-height: 1.1em; transition: color 0.15s; }
.login-verifying.on { color: var(--cyan); }
.login-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; cursor: pointer; background: linear-gradient(180deg, #57edff, var(--cyan)); color: #04121a; border: none; font-family: var(--mono); font-weight: 700; letter-spacing: 1.5px; font-size: 0.8rem; padding: 13px; transition: filter 0.15s; box-shadow: 0 3px 0 #0a6f84; }
.login-btn:hover:not(:disabled) { filter: brightness(1.08); }
.login-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.login-back { background: none; border: none; color: var(--dim); cursor: pointer; font-family: var(--mono); font-size: 0.74rem; padding: 4px; align-self: center; }
.login-back:hover { color: var(--cyan); }
.login-msg { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.8rem; padding: 9px 11px; border-left: 2px solid; }
.login-msg.ok { color: var(--green); border-color: var(--green); background: color-mix(in srgb, var(--green) 7%, transparent); }
.login-msg.err { color: var(--red); border-color: var(--red); background: color-mix(in srgb, var(--red) 7%, transparent); }
.login-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.68rem; letter-spacing: 0.5px; }
.status-email { color: var(--muted2); text-transform: none; letter-spacing: 0.5px; }
.logout { display: grid; place-items: center; cursor: pointer; background: transparent; border: 1px solid var(--line2); color: var(--dim); padding: 4px; transition: color 0.15s, border-color 0.15s; }
.logout:hover { color: var(--red); border-color: var(--red); }

@media print {
  .bg-canvas, .scanlines, .vignette, .topbar, .tabs, .dh-actions, .foot { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .finding, .sum-card { border-color: #ccc; background: #fff; }
}


/* ══════════════════ MEJORAS NEÓN (login + intake) ══════════════════ */

/* ═══════ LOGIN · receta neón cian (override) ═══════ */

/* Card: glow cian sutil cuando el usuario está operando adentro */
.login-card { position: relative; transition: border-color .18s, box-shadow .18s; }
.login-card:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(45,226,255,.35), 0 0 22px rgba(45,226,255,.14), inset 0 0 18px rgba(45,226,255,.04);
}

/* Marca / label con acento neón */
.login-brand .brand-name b { color: var(--cyan); text-shadow: 0 0 8px rgba(45,226,255,.5), 0 0 20px rgba(45,226,255,.22); }
.login-brand .brand-sub { color: var(--dim); letter-spacing: 2px; }
.login-label { color: var(--dim); text-transform: uppercase; }

/* ── Paso EMAIL: campo con sufijo integrado como tubo de luz ── */
.login-input { border: 1px solid var(--line); border-radius: 2px; }
.login-input > svg { color: var(--dim); flex-shrink: 0; transition: color .15s, filter .15s; }
.login-input:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(45,226,255,.35), 0 0 14px rgba(45,226,255,.32), inset 0 0 12px rgba(45,226,255,.05);
}
.login-input:focus-within > svg { color: var(--cyan); filter: drop-shadow(0 0 6px rgba(45,226,255,.55)); }

/* el sufijo @dominio como parte del MISMO campo, separado por una hairline y con leve caja */
.login-email input { min-width: 0; }
.login-email .login-suffix {
  padding: 5px 9px; margin-right: -4px;
  border-left: 1px solid var(--line2);
  background: rgba(45,226,255,.05);
  color: var(--cyan);
  opacity: 1;
  text-shadow: 0 0 8px rgba(45,226,255,.28);
  transition: border-color .15s, background .15s, color .15s;
}
.login-email:focus-within .login-suffix {
  border-left-color: rgba(45,226,255,.4);
  background: rgba(45,226,255,.09);
  text-shadow: 0 0 10px rgba(45,226,255,.5), 0 0 20px rgba(45,226,255,.2);
}

/* Botón: reforzar glow neón en hover/focus */
.login-btn { box-shadow: 0 3px 0 #0a6f84, 0 0 0 0 rgba(45,226,255,0); transition: filter .15s, box-shadow .15s, transform .05s; }
.login-btn:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 3px 0 #0a6f84, 0 0 16px rgba(45,226,255,.4); }
.login-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 2px 0 #0a6f84, 0 0 12px rgba(45,226,255,.35); }
.login-btn:focus-visible { outline: none; box-shadow: 0 3px 0 #0a6f84, 0 0 0 1px rgba(45,226,255,.6), 0 0 16px rgba(45,226,255,.4); }

/* ── Paso CÓDIGO: OTP SEGMENTADO de 6 casillas ── */
/* wrapper relativo: un input real transparente encima de 6 celdas visibles */
.login-otp { position: relative; margin-top: 2px; }

/* input real: transparente, captura todo el teclado y el caret; cubre las celdas */
.login-otp-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 2; margin: 0; padding: 0; border: none; background: transparent;
  color: transparent; caret-color: transparent;
  font-family: var(--mono); font-size: 1px; letter-spacing: 0;
  outline: none; cursor: text;
}
.login-otp-input::selection { background: transparent; }
.login-otp.is-busy .login-otp-input { cursor: default; }

/* fila de 6 celdas visibles */
.login-otp-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }

/* celda vacía: panel oscuro con hairline */
.login-otp-cell {
  display: grid; place-items: center;
  aspect-ratio: 1 / 1;
  background: #070a0e;
  border: 1px solid var(--line2); border-radius: 2px;
  color: var(--ink);
  font-family: var(--mono); font-size: 1.5rem; font-weight: 700; line-height: 1;
  transition: border-color .14s, box-shadow .14s, color .14s, background .14s;
}

/* celda con dígito: glow cian estático */
.login-otp-cell.filled {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(45,226,255,.05);
  box-shadow: 0 0 0 1px rgba(45,226,255,.35), 0 0 14px rgba(45,226,255,.22), inset 0 0 12px rgba(45,226,255,.05);
  text-shadow: 0 0 8px rgba(45,226,255,.5), 0 0 20px rgba(45,226,255,.22);
}

/* celda activa (próxima a escribir): tubo de luz + cursor tipografiado */
.login-otp:focus-within .login-otp-cell.active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(45,226,255,.45), 0 0 16px rgba(45,226,255,.34), inset 0 0 12px rgba(45,226,255,.06);
}
.login-otp:focus-within .login-otp-cell.active::after {
  content: ''; width: 2px; height: 44%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(45,226,255,.7);
}

/* verificando: apagá el foco de las celdas mientras corre */
.login-otp.is-busy .login-otp-cell { opacity: .75; }

.login-verifying.on { color: var(--cyan); text-shadow: 0 0 8px rgba(45,226,255,.4); }
.login-back:hover { color: var(--cyan); text-shadow: 0 0 8px rgba(45,226,255,.4); }

@media (prefers-reduced-motion: reduce) {
  .login-card, .login-input, .login-input > svg, .login-email .login-suffix,
  .login-btn, .login-otp-cell, .login-verifying, .login-back { transition: none; }
}

/* ═══════ INTAKE · vuelo NEÓN (adquisición de objetivo) ═══════ */

/* Eyebrow: chapa clasificada con tubo de luz tenue */
.intake .eyebrow {
  border-color: var(--cyan);
  color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 5%, transparent);
  box-shadow: 0 0 0 1px rgba(45,226,255,.18), 0 0 12px rgba(45,226,255,.14), inset 0 0 10px rgba(45,226,255,.05);
  text-shadow: 0 0 8px rgba(45,226,255,.45);
}
.intake .eyebrow svg { filter: drop-shadow(0 0 5px rgba(45,226,255,.6)); }

/* Hero: "DE OBJETIVO" con stroke cian + glow de tubo de neón (entrada de 1 disparo) */
.intake .hero-accent {
  position: relative;
  color: transparent;
  -webkit-text-stroke: 1px var(--cyan);
  text-stroke: 1px var(--cyan);
  filter: drop-shadow(0 0 10px rgba(45,226,255,.5)) drop-shadow(0 0 26px rgba(45,226,255,.28));
  animation: intakeIgnite 520ms cubic-bezier(.16,1,.3,1) 1 both;
}
@keyframes intakeIgnite {
  0%   { opacity: 0; filter: drop-shadow(0 0 0 rgba(45,226,255,0)); transform: translateY(6px); }
  60%  { opacity: 1; filter: drop-shadow(0 0 18px rgba(45,226,255,.85)) drop-shadow(0 0 40px rgba(45,226,255,.4)); }
  100% { opacity: 1; filter: drop-shadow(0 0 10px rgba(45,226,255,.5)) drop-shadow(0 0 26px rgba(45,226,255,.28)); transform: translateY(0); }
}

/* Barra de comando: borde/base sereno; al focus prende el tubo de luz cian */
.intake .cmd {
  border-color: var(--line2);
  background: #05080c;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.intake .cmd:focus-within {
  border-color: var(--cyan);
  background: #070c11;
  box-shadow: 0 0 0 1px rgba(45,226,255,.4), 0 0 18px rgba(45,226,255,.3), inset 0 0 14px rgba(45,226,255,.06);
}
.intake .cmd-prompt {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(45,226,255,.5), 0 0 20px rgba(45,226,255,.22);
}
.intake .cmd input:focus::placeholder { color: #4b5866; }

/* Botón INICIAR: más neón, tubo cian al hover/focus */
.intake .cmd .cmd-go {
  box-shadow: 0 3px 0 #0a6f84, 0 0 14px rgba(45,226,255,.35), 0 8px 22px rgba(45,226,255,.32);
  transition: filter .18s, box-shadow .18s, transform .12s;
}
.intake .cmd .cmd-go:hover,
.intake .cmd .cmd-go:focus-visible {
  filter: brightness(1.1);
  box-shadow: 0 5px 0 #0a6f84, 0 0 0 1px rgba(45,226,255,.5), 0 0 26px rgba(45,226,255,.55), 0 14px 34px rgba(45,226,255,.5);
  outline: none;
}
.intake .cmd .cmd-go:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a6f84, 0 0 20px rgba(45,226,255,.45); }
.intake .cmd .cmd-go svg { filter: drop-shadow(0 0 4px rgba(4,18,26,.35)); }

/* MODO PROFUNDO: chip técnico; hover prende glow cian, ON vira a alerta roja con glow */
.intake .deep-toggle {
  transition: color .18s, border-color .18s, box-shadow .18s, background .18s;
}
.intake .deep-toggle:hover {
  color: var(--ink);
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(45,226,255,.3), 0 0 14px rgba(45,226,255,.26), inset 0 0 12px rgba(45,226,255,.05);
}
.intake .deep-toggle .dt-box { transition: box-shadow .18s, background .18s; }
.intake .deep-toggle.on {
  color: var(--red);
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 9%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent), 0 0 16px color-mix(in srgb, var(--red) 32%, transparent), inset 0 0 12px color-mix(in srgb, var(--red) 6%, transparent);
  text-shadow: 0 0 8px color-mix(in srgb, var(--red) 55%, transparent);
}
.intake .deep-toggle.on .dt-box {
  background: color-mix(in srgb, var(--red) 22%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--red) 45%, transparent), inset 0 0 6px color-mix(in srgb, var(--red) 30%, transparent);
}
.intake .deep-toggle.on .dt-box svg { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--red) 70%, transparent)); }

/* Auth-check: aviso ámbar más pulido con barra viva */
.intake .auth-check {
  border-left-color: var(--amber);
  box-shadow: inset 2px 0 10px color-mix(in srgb, var(--amber) 10%, transparent);
  transition: color .18s, background .18s, box-shadow .18s;
  padding-right: 12px;
  background: color-mix(in srgb, var(--amber) 4%, transparent);
}
.intake .auth-check:hover { background: color-mix(in srgb, var(--amber) 8%, transparent); }
.intake .auth-check svg { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--amber) 55%, transparent)); }
.intake .auth-check b { text-shadow: 0 0 8px color-mix(in srgb, var(--amber) 45%, transparent); }
.intake .auth-check.on {
  box-shadow: inset 2px 0 14px color-mix(in srgb, var(--amber) 18%, transparent);
}

/* Brief · protocolo de operación: encabezado con línea de tubo */
.intake .brief { border-top-color: var(--line2); }
.intake .brief-h {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(45,226,255,.35);
}
.intake .brief li::before { text-shadow: 0 0 8px rgba(45,226,255,.5); }
.intake .brief li.warn-li::before { text-shadow: 0 0 8px color-mix(in srgb, var(--amber) 55%, transparent); }

/* Error/aviso: acento rojo con glow sutil */
.intake .err {
  box-shadow: inset 2px 0 12px color-mix(in srgb, var(--red) 14%, transparent);
  padding: 8px 0 8px 12px;
}
.intake .err svg { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--red) 55%, transparent)); }

@media (prefers-reduced-motion: reduce) {
  .intake .hero-accent { animation: none; }
}

/* ── login: campo de email más ancho para que entre el nombre completo ── */
.login-card { max-width: 500px; }
.login-email { flex-wrap: nowrap; }
.login-email input { flex: 1 1 auto; min-width: 0; font-size: 0.9rem; letter-spacing: 0.4px; }
.login-email .login-suffix { flex: 0 0 auto; font-size: 0.8rem; padding: 5px 8px; letter-spacing: 0.2px; }

/* ══════ LOGIN — fondo 3D (piso Tron) + card inmersiva ══════ */
/* ============================================================
   LOGIN — AUDITOR "tubos de luz" + FONDO 3D piso grilla Tron
   TODO scopeado bajo .login-wrap. Paleta neón original.
   ============================================================ */
.login-wrap{
  /* paleta exacta del mockup */
  --bg:#06070b; --panel:#0b0d14; --panel2:#0e1119; --line:#1b2130;
  --ink:#eef2fb; --ink2:#c3ccde; --mut:#a6b1c6;
  --red:#ff2e2e; --yel:#ffd400; --grn:#22e06a; --blu:#2b83ff; --vio:#9d4bff;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;

  box-sizing:border-box;
  position:relative; overflow:hidden;
  min-height:100vh; width:100%;
  display:flex; align-items:center; justify-content:center;
  padding:32px 16px;
  /* cielo profundo: vignette superior + halo del horizonte (todo estático) */
  background:
    radial-gradient(1100px 520px at 50% 42%, rgba(43,131,255,.10), transparent 62%),
    radial-gradient(900px 460px at 82% -12%, rgba(43,131,255,.06), transparent 60%),
    radial-gradient(760px 420px at 10% -8%, rgba(157,75,255,.05), transparent 60%),
    linear-gradient(180deg,#04050a 0%, var(--bg) 46%, #04050a 100%);
  color:var(--ink); font-family:var(--sans);
}
.login-wrap *{box-sizing:border-box}
.login-wrap :focus-visible{outline:2px solid var(--blu); outline-offset:2px; border-radius:8px}

/* ============================================================
   FONDO 3D — piso de grilla Tron en perspectiva (variant="grid")
   GPU-cheap: sólo se anima transform (translateY) de .login-grid.
   ============================================================ */
.login-wrap .login-scene{
  position:absolute; inset:0; z-index:0;
  pointer-events:none; overflow:hidden;
}
/* línea/halo del horizonte donde nace la grilla */
.login-wrap .login-horizon{
  position:absolute; left:-10%; right:-10%;
  top:47%; height:2px;
  background:linear-gradient(90deg,transparent, rgba(43,131,255,.85) 20%, rgba(160,205,255,.95) 50%, rgba(43,131,255,.85) 80%, transparent);
  box-shadow:0 0 46px 10px rgba(43,131,255,.45), 0 0 120px 30px rgba(43,131,255,.20);
}
/* plano del piso inclinado hacia el horizonte */
.login-wrap .login-floor{
  position:absolute;
  left:50%; bottom:0;
  width:340%; height:56%;
  transform:translateX(-50%) perspective(400px) rotateX(76deg);
  transform-origin:50% 100%;
  /* la grilla lejana se disuelve en el horizonte */
  -webkit-mask-image:linear-gradient(to top,#000 24%, rgba(0,0,0,.55) 62%, transparent 96%);
  mask-image:linear-gradient(to top,#000 24%, rgba(0,0,0,.55) 62%, transparent 96%);
}
/* la grilla en sí: se desplaza hacia vos por translateY */
.login-wrap .login-grid{
  position:absolute; left:-25%; right:-25%; top:-60%; bottom:-60%;
  background-image:
    linear-gradient(  0deg, rgba(43,131,255,.55) 1.4px, transparent 1.4px),
    linear-gradient( 90deg, rgba(43,131,255,.30) 1.4px, transparent 1.4px);
  background-size:52px 52px, 52px 52px;
  animation:login-grid-move 5.5s linear infinite;
  will-change:transform;
}
@keyframes login-grid-move{
  from{transform:translateY(0)}
  to{transform:translateY(52px)} /* = 1 celda → loop perfecto */
}

/* ---------- tarjeta = terminal de acceso flotante ---------- */
.login-wrap .login-card{
  position:relative; z-index:1;
  width:544px; max-width:100%;
  border:1px solid rgba(43,131,255,.20); border-radius:22px;
  /* glass translúcido SIN backdrop-filter: deja entrever el piso */
  background:
    linear-gradient(180deg, rgba(15,19,28,.86), rgba(8,10,17,.92));
  padding:34px 38px 26px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    inset 0 0 0 1px rgba(43,131,255,.05),
    0 2px 8px rgba(0,0,0,.5),
    0 26px 50px -16px rgba(43,131,255,.18),
    0 44px 90px -22px rgba(0,0,0,.85),
    0 0 70px rgba(43,131,255,.07);
}
/* filo superior de neón para reforzar la sensación "tubo" */
.login-wrap .login-card::before{
  content:""; position:absolute; left:22px; right:22px; top:-1px; height:1px;
  background:linear-gradient(90deg,transparent, rgba(43,131,255,.7), transparent);
  box-shadow:0 0 14px rgba(43,131,255,.5);
}

/* ---------- marca / wordmark con glow ---------- */
.login-wrap .login-brand{
  display:flex; align-items:center; gap:14px;
  padding-bottom:18px; margin-bottom:20px;
  border-bottom:1px solid var(--line);
}
.login-wrap .login-mark{
  display:grid; place-items:center; flex:none;
  width:44px; height:44px; border-radius:12px;
  color:#eaf3ff;
  border:1px solid rgba(43,131,255,.7);
  background:linear-gradient(180deg,rgba(43,131,255,.20),rgba(43,131,255,.05));
  box-shadow:0 0 0 1px rgba(43,131,255,.30),0 0 20px rgba(43,131,255,.26), inset 0 0 18px rgba(43,131,255,.10);
}
.login-wrap .login-mark svg{filter:drop-shadow(0 0 8px rgba(120,170,255,.55))}
.login-wrap .login-brand-txt{min-width:0}
.login-wrap .login-wm{
  font-family:var(--mono); font-weight:700; letter-spacing:.32em; font-size:22px;
  color:#eaf1ff; line-height:1;
  text-shadow:0 0 10px rgba(120,170,255,.45),0 0 26px rgba(43,131,255,.28);
}
.login-wrap .login-sub{
  font-family:var(--mono); font-size:10px; letter-spacing:.24em; text-transform:uppercase;
  color:var(--mut); margin-top:8px;
}

/* ---------- form ---------- */
.login-wrap .login-form{display:flex; flex-direction:column; gap:14px}
.login-wrap .login-label{
  font-family:var(--mono); font-size:10px; letter-spacing:.26em; text-transform:uppercase;
  color:var(--mut); word-break:break-all;
}

/* ---------- input (tubo) : nombre ancho + sufijo compacto ---------- */
.login-wrap .login-input{
  display:flex; align-items:center; gap:9px;
  padding:12px 13px; border-radius:12px;
  border:1px solid var(--line); background:#080a10;
  transition:border-color .18s ease, box-shadow .22s ease;
}
.login-wrap .login-input svg{flex:none; opacity:.7; color:#7f8aa0}
.login-wrap .login-input input{
  flex:1 1 auto; min-width:0; width:100%;
  background:transparent; border:0; outline:0;
  color:var(--ink); font-family:var(--mono); font-size:14px; letter-spacing:.02em;
}
.login-wrap .login-input input::placeholder{color:#5f6a80}
.login-wrap .login-input:focus-within{
  border-color:rgba(43,131,255,.6);
  box-shadow:0 0 0 1px rgba(43,131,255,.4),0 0 18px rgba(43,131,255,.22);
}
.login-wrap .login-suffix{
  flex:none;
  font-family:var(--mono); font-size:12px; letter-spacing:.02em; color:var(--ink2);
  padding:5px 9px; border-radius:8px;
  border:1px solid rgba(43,131,255,.22);
  background:linear-gradient(180deg,rgba(43,131,255,.08),rgba(43,131,255,.02));
  box-shadow:inset 0 0 0 1px rgba(43,131,255,.10);
  white-space:nowrap;
}

/* ---------- botón neón ---------- */
.login-wrap .login-btn{
  position:relative; overflow:hidden; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  width:100%;
  font-family:var(--mono); font-size:12px; letter-spacing:.14em; font-weight:600; color:#eaf3ff;
  padding:13px 20px; border-radius:12px;
  border:1px solid rgba(43,131,255,.7);
  background:linear-gradient(180deg,rgba(43,131,255,.30),rgba(43,131,255,.10));
  box-shadow:0 0 0 1px rgba(43,131,255,.35),0 0 18px rgba(43,131,255,.28), inset 0 0 18px rgba(43,131,255,.10);
  text-shadow:0 0 10px rgba(120,170,255,.55);
  transition:transform .16s ease, box-shadow .25s ease, border-color .2s ease, opacity .2s ease;
}
.login-wrap .login-btn svg{flex:none}
.login-wrap .login-btn:hover:not(:disabled){
  transform:translateY(-2px); border-color:var(--blu);
  box-shadow:0 0 0 1px var(--blu),0 0 26px rgba(43,131,255,.55),0 8px 22px rgba(43,131,255,.22), inset 0 0 22px rgba(43,131,255,.18);
}
.login-wrap .login-btn:hover:not(:disabled)::before{
  content:""; position:absolute; top:0; bottom:0; left:0; width:42%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);
  animation:login-sweep .7s ease forwards;
}
.login-wrap .login-btn:active:not(:disabled){
  transform:translateY(1px) scale(.985);
  box-shadow:0 0 0 1px var(--blu),0 0 40px rgba(43,131,255,.8), inset 0 0 30px rgba(43,131,255,.35);
}
.login-wrap .login-btn:disabled{opacity:.5; cursor:not-allowed}

@keyframes login-sweep{
  from{transform:translateX(-140%) skewX(-16deg)}
  to{transform:translateX(320%) skewX(-16deg)}
}

/* ---------- OTP : 6 casillas segmentadas neón ---------- */
.login-wrap .login-otp{position:relative}
/* input real transparente que captura y auto-verifica */
.login-wrap .login-otp-input{
  position:absolute; inset:0; width:100%; height:100%;
  opacity:0; z-index:2; cursor:text;
  border:0; margin:0; padding:0;
}
.login-wrap .login-otp-cells{
  display:grid; grid-template-columns:repeat(6,1fr); gap:9px;
}
.login-wrap .login-otp-cell{
  display:grid; place-items:center;
  height:56px; border-radius:11px;
  border:1px solid var(--line); background:#080a10;
  font-family:var(--mono); font-size:24px; font-weight:700; color:var(--ink);
  transition:border-color .18s ease, box-shadow .22s ease, color .18s ease;
}
.login-wrap .login-otp-cell.filled{
  color:#eaf1ff;
  border-color:rgba(43,131,255,.5);
  box-shadow:0 0 0 1px rgba(43,131,255,.3),0 0 16px rgba(43,131,255,.20), inset 0 0 16px rgba(43,131,255,.06);
  text-shadow:0 0 10px rgba(120,170,255,.5);
}
.login-wrap .login-otp-cell.active{
  border-color:rgba(43,131,255,.75);
  box-shadow:0 0 0 1px rgba(43,131,255,.45),0 0 22px rgba(43,131,255,.35), inset 0 0 18px rgba(43,131,255,.10);
}
.login-wrap .login-otp.is-busy{opacity:.7}
.login-wrap .login-otp.is-busy .login-otp-cell{border-color:rgba(157,75,255,.45)}
.login-wrap .login-otp.is-busy .login-otp-cell.filled{
  border-color:rgba(157,75,255,.6);
  box-shadow:0 0 0 1px rgba(157,75,255,.32),0 0 18px rgba(157,75,255,.28), inset 0 0 16px rgba(157,75,255,.08);
  text-shadow:0 0 10px rgba(190,140,255,.5);
}

.login-wrap .login-verifying{
  font-family:var(--mono); font-size:11px; letter-spacing:.06em; color:var(--mut);
  min-height:16px;
}
.login-wrap .login-verifying.on{
  color:var(--vio); letter-spacing:.2em; text-transform:uppercase;
  text-shadow:0 0 10px rgba(157,75,255,.5);
}

/* ---------- back link ---------- */
.login-wrap .login-back{
  align-self:flex-start;
  background:transparent; border:0; cursor:pointer; padding:2px 0;
  font-family:var(--mono); font-size:11.5px; letter-spacing:.08em; color:var(--ink2);
  transition:color .18s ease, text-shadow .22s ease;
}
.login-wrap .login-back:hover{color:#eaf1ff; text-shadow:0 0 10px rgba(120,170,255,.45)}

/* ---------- mensaje ok / err ---------- */
.login-wrap .login-msg{
  display:flex; align-items:flex-start; gap:8px;
  margin-top:16px; padding:11px 13px; border-radius:11px;
  font-family:var(--mono); font-size:11.5px; line-height:1.5; letter-spacing:.02em;
  border:1px solid var(--line); background:#080a10;
}
.login-wrap .login-msg svg{flex:none; margin-top:1px}
.login-wrap .login-msg.ok{
  color:var(--grn); border-color:rgba(34,224,106,.4);
  box-shadow:0 0 0 1px rgba(34,224,106,.12),0 0 14px rgba(34,224,106,.16);
}
.login-wrap .login-msg.ok svg{filter:drop-shadow(0 0 6px rgba(34,224,106,.6))}
.login-wrap .login-msg.err{
  color:var(--red); border-color:rgba(255,46,46,.42);
  box-shadow:0 0 0 1px rgba(255,46,46,.12),0 0 14px rgba(255,46,46,.16);
}
.login-wrap .login-msg.err svg{filter:drop-shadow(0 0 6px rgba(255,46,46,.6))}

/* ---------- pie ---------- */
.login-wrap .login-foot{
  margin-top:18px; padding-top:16px; border-top:1px solid var(--line);
  font-family:var(--mono); font-size:9.5px; letter-spacing:.16em; text-transform:uppercase;
  color:#5b6478; text-align:center;
}

/* ---------- responsive ---------- */
@media (max-width:440px){
  .login-wrap{padding:20px 12px}
  .login-wrap .login-card{padding:22px 18px 18px}
  .login-wrap .login-floor{height:50%}
  .login-wrap .login-otp-cells{gap:7px}
  .login-wrap .login-otp-cell{height:50px; font-size:21px}
  .login-wrap .login-wm{font-size:19px; letter-spacing:.26em}
}

/* ---------- reduce motion ---------- */
@media (prefers-reduced-motion:reduce){
  .login-wrap .login-btn:hover:not(:disabled)::before{animation:none; display:none}
  .login-wrap .login-btn:hover:not(:disabled),
  .login-wrap .login-btn:active:not(:disabled){transform:none}
  /* fondo 3D quieto: la grilla se detiene */
  .login-wrap .login-grid{animation:none}
}
