/**
 * Auth screens (login / signup / verify / reset) — design_handoff_auth reskin.
 * Tokens from the handoff README; the brand mark above the card is the CURRENT
 * product logo (.brand-mark from styles.css), per the handoff instruction.
 */

.auth-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(109, 92, 255, 0.14), transparent),
    #0B0E1C;
  font-family: 'DM Sans', sans-serif;
  padding: 48px 24px;
  box-sizing: border-box;
  color: #E8EAF4;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  text-decoration: none;
}

.auth-brand-word {
  font: 700 17px 'Space Grotesk', sans-serif;
  letter-spacing: 0.12em;
  color: #E8EAF4;
}

.auth-card {
  width: 440px;
  max-width: 100%;
  background: #10142A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 40px;
  box-sizing: border-box;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.auth-card h1 {
  font: 600 28px 'Space Grotesk', sans-serif;
  color: #E8EAF4;
  margin: 0 0 8px;
  text-align: center;
}

.auth-sub {
  font-size: 14px;
  color: #ADB3C9;
  margin: 0 0 28px;
  text-align: center;
  line-height: 1.6;
}

.auth-sub strong { color: #E8EAF4; font-weight: 500; }

.auth-card a { color: #8B7CFF; text-decoration: none; }
.auth-card a:hover { color: #A99DFF; }

/* Buttons */
.auth-btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: #6D5CFF;
  color: #fff;
  font: 600 16px 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  text-decoration: none;
}
.auth-btn-primary:hover { background: #8B7CFF; }
.auth-btn-primary:disabled { opacity: 0.65; cursor: default; }
a.auth-btn-primary, a.auth-btn-primary:hover { color: #fff; }

.auth-btn-outline {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #E8EAF4;
  font: 500 15px 'DM Sans', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.auth-btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.03);
}
a.auth-btn-outline, a.auth-btn-outline:hover { color: #E8EAF4; }

.auth-btn-outline-strong {
  font-weight: 600;
  padding: 14px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: #6C7290;
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* Fields */
.auth-label {
  display: block;
  font: 500 13px 'DM Sans', sans-serif;
  color: #ADB3C9;
  margin-bottom: 7px;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}
.auth-label-row .auth-label { margin-bottom: 0; }
.auth-label-row a { font-size: 13px; }

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0B0E1C;
  color: #E8EAF4;
  font: 400 15px 'DM Sans', sans-serif;
  outline: none;
  margin-bottom: 18px;
  transition: border-color 0.15s ease;
}
.auth-input::placeholder { color: #6C7290; }
.auth-input:focus { border-color: #6D5CFF; }
.auth-input[readonly] { color: #ADB3C9; }
.auth-input.auth-input-last { margin-bottom: 24px; }

/* Terms checkbox */
.auth-terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #ADB3C9;
  line-height: 1.5;
  margin-bottom: 24px;
  cursor: pointer;
}
.auth-terms input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: #6D5CFF;
  flex: 0 0 auto;
}

/* Verification code boxes */
.auth-code-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}
.auth-code-input {
  width: 48px;
  height: 56px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0B0E1C;
  color: #E8EAF4;
  font: 600 22px 'Space Grotesk', sans-serif;
  outline: none;
  transition: border-color 0.15s ease;
  padding: 0;
  box-sizing: border-box;
}
.auth-code-input:focus { border-color: #6D5CFF; }

/* Helper / micro copy */
.auth-micro {
  font-size: 12px;
  color: #6C7290;
  text-align: center;
  margin: 16px 0 0;
}
.auth-foot {
  font-size: 13px;
  color: #6C7290;
  text-align: center;
  margin: 16px 0 0;
}
.auth-foot button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #8B7CFF;
  cursor: pointer;
}
.auth-foot button:hover { color: #A99DFF; }
.auth-foot button:disabled { color: #6C7290; cursor: default; }

/* Errors (server-rendered) */
.auth-error {
  color: #F0716E;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
  text-align: center;
}
.auth-error p { margin: 0 0 4px; }

/* Success circle (reset sent / password changed) */
.auth-check-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

/* reCAPTCHA v2 widget slot: directly above the primary button, per handoff */
.auth-recaptcha {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.auth-recaptcha-hidden { display: none; }

/* Button spinner (existing loading behavior, restyled) */
.auth-btn-loader { display: inline-flex; }
.auth-hidden { display: none !important; }
.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Steps (signup flow) */
.auth-step-hidden { display: none; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .auth-code-row { gap: 6px; }
  .auth-code-input { width: 42px; height: 52px; }
}
