/* ============================================================
   AUTH SCREENS — static/css/auth.css
   Split-screen shell for the pre-auth flow (login, signup,
   password reset). Reuses design-system.css tokens only —
   no new palette or type family is introduced here.
   ============================================================ */

.auth-shell {
  min-height: 100vh;
  display: flex;
}

/* ── BRAND PANEL (left) ── */
.auth-panel {
  position: relative;
  width: 42%;
  min-width: 400px;
  flex-shrink: 0;
  background: var(--ds-primary);
  border-right: 2px solid var(--ds-accent);
  color: var(--ds-text-on-dark);
  display: flex;
  flex-direction: column;
  padding: var(--ds-space-11) var(--ds-space-12);
  overflow: hidden;
}

.auth-panel-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--ds-chrome-wash) 1px, transparent 1px),
    linear-gradient(90deg, var(--ds-chrome-wash) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 65% at 30% 30%, black 15%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 30% 30%, black 15%, transparent 100%);
}

.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  color: var(--ds-chrome-fg);
  font-weight: 700;
  font-size: var(--ds-type-md);
  letter-spacing: 0.5px;
  text-decoration: none;
  margin-bottom: auto;
}

.auth-brand:hover { color: var(--ds-accent); }
.auth-brand i { color: var(--ds-accent); }

.auth-panel-main {
  position: relative;
  margin: auto 0;
  padding: var(--ds-space-12) 0;
}

/* ── NAMEPLATE (signature element) ── */
.auth-plate {
  position: relative;
  background: var(--ds-solid-border);
  border: 1px solid var(--ds-chrome-line);
  box-shadow: var(--ds-shadow-2);
  padding: var(--ds-space-10) var(--ds-space-11);
}

.auth-plate-rivet {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ds-chrome-line);
}
.auth-plate-rivet--tl { top: 10px; left: 10px; }
.auth-plate-rivet--tr { top: 10px; right: 10px; }
.auth-plate-rivet--bl { bottom: 10px; left: 10px; }
.auth-plate-rivet--br { bottom: 10px; right: 10px; }

.auth-plate-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-8);
  margin-bottom: var(--ds-space-8);
  padding-bottom: var(--ds-space-8);
  border-bottom: 1px solid var(--ds-chrome-line);
}

.auth-plate-name {
  font-size: var(--ds-type-md);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ds-chrome-fg);
}

.auth-plate-serial {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-type-xs);
  color: var(--ds-chrome-fg-dim);
  margin-top: var(--ds-space-2);
}

.auth-plate-seal {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--ds-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ds-accent);
  font-size: var(--ds-type-md);
}

.auth-plate-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-7) var(--ds-space-9);
}

.auth-plate-field--wide { grid-column: 1 / -1; }

.auth-plate-label {
  display: block;
  font-size: var(--ds-type-2xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ds-chrome-fg-dim);
  margin-bottom: var(--ds-space-2);
}

.auth-plate-value {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-type-sm);
  color: var(--ds-text-on-dark);
}

.auth-plate-status {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-3);
}

.auth-plate-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ds-pass);
  box-shadow: 0 0 0 3px var(--ds-pass-bg);
}

.auth-panel-copy {
  position: relative;
  font-size: var(--ds-type-base);
  line-height: 1.7;
  color: var(--ds-chrome-fg-dim);
  margin: var(--ds-space-10) 0 0;
  max-width: 34ch;
}

.auth-panel-stats {
  position: relative;
  display: flex;
  gap: var(--ds-space-11);
  margin-top: var(--ds-space-11);
  padding-top: var(--ds-space-9);
  border-top: 1px solid var(--ds-chrome-line);
}

.auth-panel-stat-number {
  display: block;
  font-size: var(--ds-type-lg);
  font-weight: 800;
  color: var(--ds-chrome-fg);
}

.auth-panel-stat-label {
  font-size: var(--ds-type-2xs);
  color: var(--ds-chrome-fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-panel-foot {
  position: relative;
  font-size: var(--ds-type-xs);
  color: var(--ds-chrome-fg-dim);
  margin-top: var(--ds-space-10);
}
.auth-panel-foot a {
  color: var(--ds-chrome-fg-dim);
  text-decoration: underline;
}

/* ── STAGE (right, the form itself) ── */
.auth-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ds-bg);
  padding: var(--ds-space-11);
}

.auth-stage-inner {
  width: 100%;
  max-width: 380px;
}

.auth-eyebrow {
  font-size: var(--ds-type-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ds-link);
  margin-bottom: var(--ds-space-5);
}

.auth-title {
  font-size: var(--ds-type-2xl);
  font-weight: 700;
  color: var(--ds-heading);
  margin-bottom: var(--ds-space-3);
  line-height: 1.2;
}

.auth-subtitle {
  font-size: var(--ds-type-base);
  color: var(--ds-text-muted);
  margin-bottom: var(--ds-space-11);
  line-height: 1.6;
}

.auth-form .mb-3 { margin-bottom: var(--ds-space-8) !important; }

.auth-footnote {
  font-size: var(--ds-type-sm);
  color: var(--ds-text-muted);
  margin-top: var(--ds-space-10);
}

.auth-footnote a { color: var(--ds-link); font-weight: 600; }

/* Centered status message (reset sent / reset complete / invalid link) */
.auth-status {
  text-align: center;
}

.auth-status-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--ds-space-9);
  font-size: var(--ds-type-xl);
}

.auth-status-icon--info    { background: var(--ds-info-bg);   color: var(--ds-info); }
.auth-status-icon--success { background: var(--ds-pass-bg);   color: var(--ds-pass); }
.auth-status-icon--warn    { background: var(--ds-review-bg); color: var(--ds-review); }

.auth-status .auth-title,
.auth-status .auth-subtitle { text-align: center; }

/* ── ENTRANCE (respects reduced motion) ── */
@media (prefers-reduced-motion: no-preference) {
  .auth-panel-main,
  .auth-stage-inner {
    animation: auth-rise 0.4s ease-out both;
  }
  .auth-stage-inner { animation-delay: 0.06s; }
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 991.98px) {
  .auth-shell { flex-direction: column; min-height: auto; }

  .auth-panel {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 2px solid var(--ds-accent);
    padding: var(--ds-space-10) var(--ds-space-10) var(--ds-space-11);
  }

  .auth-panel-main { margin: 0; padding: var(--ds-space-9) 0 0; }
  .auth-panel-stats { display: none; }
  .auth-plate-fields { grid-template-columns: 1fr 1fr; }

  .auth-stage { padding: var(--ds-space-12) var(--ds-space-10); }
}

@media (max-width: 575.98px) {
  .auth-plate { padding: var(--ds-space-9) var(--ds-space-9); }
  .auth-plate-fields { grid-template-columns: 1fr; gap: var(--ds-space-6); }
  .auth-panel-copy { max-width: none; }
}
