/* ============================================================
   VibeGuard AI — Auth (login / signup) · sistema light premium
   Coherente con web/DESIGN_SYSTEM.md y la landing.
   ============================================================ */

/* Tokens: web/assets/base.css (fuente única). */

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(rgba(15,23,42,.05) 1px, transparent 1.3px);
  background-size: 26px 26px; mask-image: linear-gradient(180deg, #000, transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
}
a { color: inherit; text-decoration: none; }
svg, img { display: block; max-width: 100%; }

.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

/* ---------- Columna del formulario ---------- */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-card { width: 100%; max-width: 400px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; margin-bottom: 34px; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand .name { font-size: 17px; letter-spacing: -.02em; color: var(--ink); }
.brand .name b { font-weight: 700; }

.auth-card h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.auth-card .sub { margin: 8px 0 0; font-size: 15.5px; color: var(--text-dim); }

.alert-error {
  display: none; margin-top: 20px; padding: 11px 14px; border-radius: 10px;
  background: var(--critical-tint); border: 1px solid rgba(220,38,38,.28);
  color: var(--critical-ink); font-size: 14px;
}
.alert-error.show { display: block; }

form { margin-top: 24px; display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field label .muted { color: var(--text-mut); font-weight: 400; }
.field .row { display: flex; align-items: center; justify-content: space-between; }
.field .row a { font-size: 13px; color: var(--blue); font-weight: 600; }
.input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: #fff; font: inherit; font-size: 15px; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: var(--text-mut); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 20px; border-radius: var(--r); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform .15s ease, background .16s ease, box-shadow .16s ease;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--blue-2); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn .ic { width: 17px; height: 17px; }

.divider { height: 1px; background: var(--line); margin: 26px 0 18px; }
.alt { font-size: 14.5px; color: var(--text-dim); text-align: center; }
.alt a { color: var(--blue); font-weight: 600; }

/* Casilla de atestación legal en signup */
.attest { display: flex; gap: 10px; align-items: flex-start; font-size: 13px;
  line-height: 1.5; color: var(--text-dim); cursor: pointer; }
.attest input { margin-top: 2px; flex: none; }
.attest b { color: var(--ink); font-weight: 600; }
.attest a { color: var(--blue); font-weight: 600; }
.back { margin-top: 26px; font-size: 13.5px; color: var(--text-mut); display: inline-flex; align-items: center; gap: 6px; }
.back:hover { color: var(--ink); }

/* ---------- Panel de marca (derecha) ---------- */
.auth-side {
  position: relative; overflow: hidden; border-left: 1px solid var(--line);
  padding: 60px 52px; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(160deg, #EEF3FF 0%, #F6F8FB 62%);
}
.auth-side::before {
  content: ""; position: absolute; inset: -20% -10% auto 30%; height: 520px; pointer-events: none;
  background: radial-gradient(46% 52% at 70% 30%, rgba(37,99,235,.18), rgba(99,102,241,.08) 45%, transparent 72%);
}
.side-in { position: relative; z-index: 1; max-width: 440px; }
.side-in h2 { margin: 0; font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; line-height: 1.14; letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.side-in h2 .u { background: linear-gradient(var(--blue), var(--blue)) left 92%/100% .1em no-repeat; }
.side-checks { margin: 22px 0 0; display: grid; gap: 12px; }
.side-checks span { display: flex; align-items: center; gap: 11px; font-size: 15px; color: var(--text); }
.side-checks svg { width: 18px; height: 18px; color: var(--secure); flex: none; }

/* mini reporte */
.mini { margin-top: 34px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-xl); overflow: hidden; }
.mini-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.mini-head .t { font-weight: 700; color: var(--ink); font-size: 14px; }
.mini-head .t small { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-mut); font-weight: 400; margin-top: 2px; }
.mini-head .score { font-size: 26px; font-weight: 800; color: var(--critical); letter-spacing: -.02em; }
.mini-row { display: flex; align-items: center; gap: 11px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: none; }
.mini-row .sv { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; padding: 3px 7px; border-radius: 5px; letter-spacing: .03em; min-width: 42px; text-align: center; }
.sv.crit { background: var(--critical-tint); color: var(--critical-ink); }
.sv.high { background: var(--high-tint); color: var(--high-ink); }
.sv.med { background: var(--medium-tint); color: var(--medium-ink); }
.sv.ok { background: var(--secure-tint); color: var(--secure-ink); }
.mini-row .nm { flex: 1; font-size: 13px; color: var(--ink); }
.mini-row .id { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-mut); }
/* auth.css declara `a { color: inherit }`, así que un enlace dentro de la
   cabecera del mini se veía como texto muerto. */
.mini-head small a { color: var(--blue); font-weight: 600; }
.mini-head small a:hover { color: var(--blue-2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}


/* ---------- Marca AlySec ----------
   `.brand .mark` de base.css pinta un tile azul con sombra, pensado para un
   icono cuadrado. El logotipo real es un escudo con fondo transparente: sobre
   él ese tile se veía como un cuadrado azul macizo que lo tapaba entero. */
.brand .mark-logo {
  background: none; box-shadow: none; border-radius: 0;
  width: 30px; height: 32px; object-fit: contain;
}
