/*! © 2026 UltrAgentes-IA — Todos los derechos reservados.
 *  SENTINEL LAYER v17 — Diagnóstico de Madurez IA (scanner + radar + informe)
 *  Prohibida su copia, reproducción o distribución sin autorización escrita. */

/* ═══════════════ SECCIÓN SCANNER ═══════════════ */
.scan-section { position: relative; overflow: hidden; }
.scan-section::before {
  content: "";
  position: absolute; inset: -5% -15% auto;
  height: 60%;
  background: radial-gradient(ellipse at 30% 0%, rgba(82, 229, 161, .09), transparent 62%),
              radial-gradient(ellipse at 75% 20%, rgba(99, 230, 255, .08), transparent 60%);
  filter: blur(80px);
  pointer-events: none;
}

.scan-shell {
  position: relative;
  max-width: 1040px;
  margin: 46px auto 0;
  border: 1px solid rgba(99, 230, 255, .15);
  border-radius: 26px;
  background: linear-gradient(168deg, rgba(10, 17, 32, .95), rgba(5, 9, 18, .97));
  box-shadow: 0 38px 100px rgba(0, 0, 0, .48);
  overflow: hidden;
}

/* Cabecera con progreso segmentado */
.scan-top {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .015);
}
.scan-top .lbl {
  font: 600 10px/1.2 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .13em; text-transform: uppercase;
  color: rgba(147, 167, 196, .7);
  white-space: nowrap;
}
.scan-bars { display: flex; gap: 5px; flex: 1; }
.scan-bars i {
  flex: 1; height: 5px; border-radius: 99px;
  background: rgba(147, 167, 196, .18);
  transition: background .4s ease, box-shadow .4s ease;
}
.scan-bars i.on { background: linear-gradient(90deg, #63e6ff, #8b5cf6); box-shadow: 0 0 10px rgba(99, 230, 255, .5); }
.scan-bars i.done { background: #52e5a1; box-shadow: none; }
.scan-count {
  font: 700 12px/1 'JetBrains Mono', ui-monospace, monospace;
  color: #63e6ff; white-space: nowrap;
}

/* Cuerpo de pregunta */
.scan-body { padding: clamp(26px, 4.5vw, 42px); }
.scan-dim {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; margin-bottom: 16px;
  border-radius: 99px;
  border: 1px solid rgba(99, 230, 255, .22);
  background: rgba(99, 230, 255, .07);
  font: 600 10px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .12em; text-transform: uppercase;
  color: #63e6ff;
}
.scan-q {
  font-size: clamp(1.14rem, 2.5vw, 1.5rem);
  font-weight: 700; letter-spacing: -.02em;
  color: #f3f7ff; line-height: 1.35;
  margin-bottom: 8px;
}
.scan-hint { color: rgba(147, 167, 196, .82); font-size: .9rem; margin-bottom: 22px; }

.scan-opts { display: grid; gap: 10px; }
.scan-opt {
  display: flex; align-items: flex-start; gap: 14px;
  width: 100%; text-align: left;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  background: rgba(255, 255, 255, .022);
  color: #dbe6f5;
  font: 500 .94rem/1.45 inherit;
  cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s;
}
.scan-opt:hover {
  border-color: rgba(99, 230, 255, .4);
  background: rgba(99, 230, 255, .06);
  transform: translateX(4px);
}
.scan-opt .dot {
  flex-shrink: 0;
  width: 20px; height: 20px; margin-top: 1px;
  border-radius: 50%;
  border: 2px solid rgba(147, 167, 196, .42);
  display: grid; place-items: center;
  transition: border-color .25s, background .25s;
}
.scan-opt .dot::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #63e6ff; opacity: 0; transform: scale(.4);
  transition: opacity .25s, transform .25s;
}
.scan-opt[aria-pressed="true"] { border-color: #63e6ff; background: rgba(99, 230, 255, .1); }
.scan-opt[aria-pressed="true"] .dot { border-color: #63e6ff; }
.scan-opt[aria-pressed="true"] .dot::after { opacity: 1; transform: scale(1); }
.scan-opt .txt strong { display: block; font-weight: 700; color: #f3f7ff; }
.scan-opt .txt small { display: block; color: rgba(147, 167, 196, .8); font-size: .82rem; margin-top: 2px; }

.scan-nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.scan-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  color: #dbe6f5;
  font: 600 .88rem/1 inherit;
  cursor: pointer;
  transition: border-color .25s, background .25s, opacity .25s;
}
.scan-btn:hover:not(:disabled) { border-color: rgba(99, 230, 255, .45); background: rgba(99, 230, 255, .08); }
.scan-btn:disabled { opacity: .35; cursor: not-allowed; }
.scan-btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #0ea5c9, #3b82f6 55%, #8b5cf6);
  color: #fff;
}
.scan-btn.primary:hover:not(:disabled) { filter: brightness(1.12); }

/* ═══════════════ INFORME DE RESULTADOS ═══════════════ */
.scan-report {
  animation: scanIn .5s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes scanIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.scan-score-row {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 40px);
  align-items: center;
  padding: clamp(26px, 4vw, 40px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.scan-gauge { position: relative; display: grid; place-items: center; }
.scan-gauge canvas { width: 100%; max-width: 240px; height: auto; }
.scan-gauge .gv {
  position: absolute; text-align: center; pointer-events: none;
}
.scan-gauge .gv b {
  display: block;
  font: 800 2.7rem/1 'JetBrains Mono', ui-monospace, monospace;
  background: linear-gradient(135deg, #63e6ff, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.scan-gauge .gv span {
  display: block; margin-top: 4px;
  font: 600 9.5px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(147, 167, 196, .75);
}
.scan-verdict h3 {
  font-size: clamp(1.3rem, 3vw, 1.72rem);
  font-weight: 800; letter-spacing: -.025em;
  color: #f3f7ff; margin-bottom: 6px;
}
.scan-verdict .lvl {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 14px;
  border-radius: 99px;
  font: 700 10px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .13em; text-transform: uppercase;
}
.scan-verdict .lvl.l0 { background: rgba(248, 113, 113, .14); color: #f87171; border: 1px solid rgba(248, 113, 113, .3); }
.scan-verdict .lvl.l1 { background: rgba(251, 191, 36, .14); color: #fbbf24; border: 1px solid rgba(251, 191, 36, .3); }
.scan-verdict .lvl.l2 { background: rgba(99, 230, 255, .14); color: #63e6ff; border: 1px solid rgba(99, 230, 255, .3); }
.scan-verdict .lvl.l3 { background: rgba(82, 229, 161, .14); color: #52e5a1; border: 1px solid rgba(82, 229, 161, .3); }
.scan-verdict p { color: rgba(147, 167, 196, .9); font-size: .95rem; line-height: 1.65; }
.scan-bench {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, .1);
}
.scan-bench div { font: 600 9.5px/1.5 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: rgba(147, 167, 196, .65); }
.scan-bench div b { display: block; font-family: inherit; font-size: .98rem; letter-spacing: 0; text-transform: none; color: #f3f7ff; margin-top: 3px; }
.scan-bench div b.up { color: #52e5a1; }
.scan-bench div b.down { color: #fbbf24; }

/* Dimensiones con barras comparativas */
.scan-dims { padding: clamp(26px, 4vw, 40px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.scan-dims h4, .scan-actions h4 {
  font-size: 1rem; font-weight: 800; color: #f3f7ff;
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.scan-dims h4 i, .scan-actions h4 i { color: #63e6ff; }
.scan-dims > p, .scan-actions > p { color: rgba(147, 167, 196, .8); font-size: .86rem; margin-bottom: 20px; }
.dim-row { margin-bottom: 18px; }
.dim-row:last-child { margin-bottom: 0; }
.dim-row .dh {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-bottom: 7px;
}
.dim-row .dh strong { font-size: .92rem; font-weight: 700; color: #e6eefb; }
.dim-row .dh em {
  font-style: normal;
  font: 700 .86rem 'JetBrains Mono', ui-monospace, monospace;
  color: #63e6ff;
}
.dim-track {
  position: relative;
  height: 9px; border-radius: 99px;
  background: rgba(147, 167, 196, .14);
  overflow: visible;
}
.dim-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #0ea5c9, #8b5cf6);
  width: 0;
  transition: width 1s cubic-bezier(.16, 1, .3, 1);
}
.dim-fill.weak { background: linear-gradient(90deg, #f59e0b, #f87171); }
.dim-mark {
  position: absolute; top: -4px; width: 2px; height: 17px;
  background: rgba(255, 255, 255, .55);
  border-radius: 2px;
}
.dim-mark::after {
  content: "sector";
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  font: 600 7.5px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(147, 167, 196, .7); white-space: nowrap;
}
.dim-row .dn { font-size: .84rem; color: rgba(147, 167, 196, .78); margin-top: 8px; }

/* Acciones recomendadas */
.scan-actions { padding: clamp(26px, 4vw, 40px); }
.act-list { display: grid; gap: 11px; }
.act-item {
  display: flex; gap: 15px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-left: 3px solid #63e6ff;
  border-radius: 0 14px 14px 0;
  background: rgba(255, 255, 255, .022);
}
.act-item.p1 { border-left-color: #f87171; }
.act-item.p2 { border-left-color: #fbbf24; }
.act-item.p3 { border-left-color: #52e5a1; }
.act-item .pr {
  flex-shrink: 0;
  font: 700 9px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 6px;
  background: rgba(255, 255, 255, .07);
  color: rgba(147, 167, 196, .9);
  height: fit-content;
}
.act-item .ab strong { display: block; font-size: .94rem; font-weight: 700; color: #f3f7ff; margin-bottom: 3px; }
.act-item .ab p { font-size: .86rem; color: rgba(147, 167, 196, .85); line-height: 1.55; }
.act-item .ab span.gain {
  display: inline-block; margin-top: 7px;
  font: 600 10px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .08em;
  color: #52e5a1;
}

/* CTA del informe */
.scan-cta {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  padding: 26px clamp(20px, 4vw, 40px) clamp(28px, 4vw, 40px);
  border-top: 1px solid rgba(255, 255, 255, .06);
}

/* Formulario de captura de informe */
.scan-lead {
  padding: clamp(24px, 4vw, 38px);
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: rgba(99, 230, 255, .028);
}
.scan-lead .lf { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.scan-lead label {
  display: block;
  font: 600 9.5px/1.4 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(147, 167, 196, .75);
  margin-bottom: 6px;
}
.scan-lead input, .scan-lead select {
  width: 100%; padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 11px;
  background: rgba(4, 8, 16, .6);
  color: #eaf1fb;
  font: 500 .92rem inherit;
}
.scan-lead input:focus, .scan-lead select:focus {
  outline: none; border-color: #63e6ff;
  box-shadow: 0 0 0 3px rgba(99, 230, 255, .13);
}
.scan-lead .ok {
  display: flex; align-items: center; gap: 11px;
  padding: 15px 18px; border-radius: 13px;
  border: 1px solid rgba(82, 229, 161, .3);
  background: rgba(82, 229, 161, .09);
  color: #a7f3d0; font-size: .9rem;
}
.scan-lead .ok i { color: #52e5a1; font-size: 1.1rem; }

@media (max-width: 760px) {
  .scan-score-row { grid-template-columns: 1fr; text-align: center; }
  .scan-gauge { justify-self: center; }
  .scan-bench { justify-content: center; }
  .scan-cta .btn, .scan-cta .scan-btn { width: 100%; justify-content: center; }
  .act-item { flex-direction: column; gap: 10px; }
}
