/* auth.css -- styles specific to login.html.
   Relies on the CSS custom properties already defined in styles.css
   (--bg, --surface, --accent, --font-display, etc.) so both pages
   stay visually consistent from one shared token source. */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.auth-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.form-error {
  background: var(--red-soft);
  color: var(--red);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  margin: 0 0 16px;
  text-align: center;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-sizing: border-box;
}
.google-btn:hover { border-color: var(--border-strong); background: var(--surface-alt); }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-step h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  text-align: center;
}
.auth-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 22px;
}

.auth-step .field { margin-bottom: 16px; }
.auth-step .field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.auth-step .field input[type="email"],
.auth-step .field input[type="password"],
.auth-step .field input[type="text"] {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
}
.auth-step .field input:focus-visible { border-color: var(--accent-bright); }

.field-error {
  color: var(--red);
  font-size: 12px;
  margin: 6px 0 0;
}

.auth-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow);
}
.auth-btn:hover { filter: brightness(1.05); }
.auth-btn-link { display: block; text-align: center; text-decoration: none; }

.auth-footnote {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
}

/* OTP boxes */
.otp-row {
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.otp-row:not([hidden]) { display: flex; }
.otp-box {
  width: 42px;
  height: 50px;
  text-align: center;
  font-size: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.otp-box:focus-visible { border-color: var(--accent-bright); }

.backup-input {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  margin-bottom: 22px;
  text-align: center;
  letter-spacing: 0.06em;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}
.link-btn {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 2px 0;
}
.link-btn:hover { text-decoration: underline; }
.back-link { display: block; margin: 18px auto 0; }

/* QR enrollment illustration */
.qr-placeholder {
  width: 168px;
  height: 168px;
  margin: 0 auto 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-placeholder img { display: block; width: 100%; height: 100%; }
.manual-key {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.manual-key code {
  background: var(--surface-alt);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.backup-codes { margin-top: 18px; }
.backup-title { font-size: 12.5px; color: var(--text-muted); margin: 0 0 10px; }
.code-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.code-grid span {
  font-family: var(--font-display);
  font-size: 13px;
  text-align: center;
  padding: 8px 4px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  letter-spacing: 0.03em;
}

/* Success step */
.success-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.success-icon svg { width: 26px; height: 26px; }
#stepSuccess .auth-sub { margin-bottom: 24px; }

@media (prefers-reduced-motion: reduce) {
  .auth-btn { transition: none; }
}
