/* ── Auth pages (register / verify / login) ──────────────────────────────── */

.auth-page {
  min-height: 100vh;
  background: var(--color-bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Centered card — same 25vw / 100vw breakpoint as the rest of the app */
.auth-card {
  background: var(--color-white);
  border-radius: 14px;
  padding: 36px 32px 28px;
  width: 25vw;
  max-width: 440px;
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* ── Brand header ──────────────────────────────────────────────────────────── */

.auth-brand {
  display: block;
  text-align: center;
  margin-bottom: 28px;
  text-decoration: none;
  color: inherit;
}

.auth-brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 10px;
}

.auth-brand__name {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-bg-dark);
  letter-spacing: 0.5px;
}

/* ── Page heading ──────────────────────────────────────────────────────────── */

.auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-bg-dark);
  margin: 0 0 6px;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0 0 24px;
}

/* ── Flash messages ────────────────────────────────────────────────────────── */

.auth-flashes {
  margin-bottom: 18px;
}

.auth-flash {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 8px;
}

.auth-flash--error {
  background: #fff0f0;
  color: #7a1010;
  border: 1px solid #fad3d3;
}

.auth-flash--success {
  background: #f0fff4;
  color: #1a6b30;
  border: 1px solid #c3e6cb;
}

.auth-flash--warning {
  background: #fffbf0;
  color: #7a5400;
  border: 1px solid #fde8a0;
}

.auth-flash__icon {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Form groups ───────────────────────────────────────────────────────────── */

.auth-form__group {
  margin-bottom: 18px;
}

.auth-form__label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--color-text-icon);
  margin-bottom: 6px;
}

.auth-form__input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--color-bg-dark);
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.auth-form__input:focus {
  border-color: var(--color-primary-alt);
  box-shadow: 0 0 0 3px rgba(2, 108, 223, 0.12);
  background: var(--color-white);
}

.auth-form__input::placeholder {
  color: var(--color-text-subtle);
}

/* ── Password wrapper (for show/hide toggle) ─────────────────────────────── */

.auth-form__pw-wrap {
  position: relative;
}

.auth-form__pw-wrap .auth-form__input {
  padding-right: 44px;
}

.auth-form__pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  padding: 0;
  line-height: 1;
}

.auth-form__pw-toggle:hover {
  color: var(--color-primary);
}

/* ── Primary submit button ─────────────────────────────────────────────────── */

.auth-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-top: 6px;
}

.auth-btn:hover  { background: var(--color-primary-alt); }
.auth-btn:active { transform: scale(0.98); }

/* ── Secondary / outline button (resend OTP) ─────────────────────────────── */

.auth-btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.auth-btn--ghost:hover {
  background: #f0f5ff;
}

/* ── Divider ───────────────────────────────────────────────────────────────── */

.auth-divider {
  text-align: center;
  margin: 22px 0 18px;
  position: relative;
  font-size: 0.8rem;
  color: var(--color-text-subtle);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--color-border);
}

.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ── Footer link ───────────────────────────────────────────────────────────── */

.auth-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 20px 0 0;
}

.auth-footer a {
  color: var(--color-primary-link);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* ── OTP digit boxes ───────────────────────────────────────────────────────── */

.otp-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.otp-group__digit {
  width: 48px;
  height: 58px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: #fafafa;
  color: var(--color-bg-dark);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  caret-color: var(--color-primary);
}

.otp-group__digit:focus {
  border-color: var(--color-primary-alt);
  box-shadow: 0 0 0 3px rgba(2, 108, 223, 0.12);
  background: var(--color-white);
}

/* Hidden real input that accumulates the digits */
.otp-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
}

.otp-hint {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 4px;
}

.otp-email-highlight {
  font-weight: 600;
  color: var(--color-bg-dark);
}

/* ── Inline field error ────────────────────────────────────────────────────── */

.auth-form__error {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--color-danger);
  margin-top: 5px;
  line-height: 1.3;
}

.auth-form__input--error {
  border-color: var(--color-danger) !important;
  background: #fff8f8;
}

.auth-form__input--error:focus {
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 0 3px rgba(209, 26, 42, 0.12) !important;
}

/* ── Terms & Conditions checkbox ───────────────────────────────────────────── */

.auth-form__checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.auth-form__checkbox {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.auth-form__checkbox-text {
  font-size: 0.84rem;
  color: var(--color-text-icon);
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
}

.auth-terms-link {
  color: var(--color-primary-link);
  font-weight: 600;
  text-decoration: none;
}

.auth-terms-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 650px) {
  .auth-card {
    width: 100%;
    min-width: unset;
    border-radius: 10px;
    padding: 28px 20px 24px;
  }

  .auth-page {
    align-items: flex-start;
    padding-top: 32px;
  }
}
