/* =========================================================
   Vektra Legacy — auth screens (login / register)  v2
   Requires variables.css + main.css loaded first.
   ========================================================= */
.auth-stage {
  position: relative;
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  padding: 60px var(--gutter);
  overflow: hidden;
}
/* ambient warp chart behind the card */
#auth-chart {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .5; pointer-events: none;
}
.auth-stage::before {           /* vignette so the card pops */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center,
              rgba(10,13,28,.2) 0%, rgba(10,13,28,.85) 75%);
}

.auth-card {
  position: relative;
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 40px 38px 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.auth-card::before, .auth-card::after {
  content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none;
}
.auth-card::before { top: -1px; left: -1px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.auth-card::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); }

.auth-card h1 {
  font: 700 27px/1.1 var(--font-display);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
.auth-sub {
  font: 400 12px var(--font-mono);
  color: var(--gold); letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 30px;
}

/* ---------- fields ---------- */
.field { margin-bottom: 20px; }
.field label {
  display: flex; justify-content: space-between; align-items: baseline;
  font: 500 11px var(--font-mono);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 8px;
}
.field label .opt { letter-spacing: .06em; text-transform: none; color: var(--dim); opacity: .7; }

.control { position: relative; }
.field input {
  width: 100%;
  padding: 13px 15px;
  background: var(--space);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  color: var(--star);
  font: 400 15px var(--font-mono);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  appearance: none; border-radius: 0;
}
.field input::placeholder { color: var(--dim); opacity: .55; }
.field input:hover { border-color: var(--dim); }
.field input:focus {
  outline: none;
  border-color: var(--gold);
  background: #0D1124;
  box-shadow: 0 0 0 3px var(--gold-soft);
}
/* red edge only after the user has been in the field */
.field input.touched:invalid {
  border-left-color: var(--red);
}
.field input:focus { border-left-color: var(--gold); }
.field .hint { font-size: 12px; color: var(--dim); margin-top: 7px; }

/* show / hide password */
.peek {
  position: absolute; top: 0; right: 0; height: 100%;
  padding: 0 14px;
  background: none; border: none; cursor: pointer;
  font: 500 11px var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim);
}
.peek:hover { color: var(--gold); }
.control.has-peek input { padding-right: 64px; }

/* ---------- password strength ---------- */
.strength { margin-top: 8px; }
.strength .track {
  height: 4px; background: var(--space);
  border: 1px solid var(--line); position: relative;
}
.strength .track i {
  position: absolute; inset: 0; width: 0%;
  background: var(--red); transition: width .25s ease, background .25s ease;
}
.strength .word {
  font: 400 11px var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); margin-top: 5px; min-height: 14px;
}

/* ---------- actions / messages ---------- */
.auth-card .btn { width: 100%; margin-top: 10px; text-align: center; }
.auth-error {
  display: flex; gap: 10px; align-items: baseline;
  background: var(--red-soft); border: 1px solid var(--red);
  border-left: 3px solid var(--red);
  color: var(--star);
  font: 400 13px var(--font-mono);
  padding: 12px 14px; margin-bottom: 22px;
}
.auth-error::before { content: "!"; color: var(--red); font-weight: 500; }
.auth-alt {
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font: 400 13px var(--font-mono); color: var(--dim);
}
.auth-alt a { color: var(--gold); text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .auth-card { padding: 30px 22px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .field input, .strength .track i { transition: none; }
}