/* ============================================================
   NEXO REMIT — Auth pages (Login / SignUp / Forgot / Reset)
   Shares the design tokens from main.css (forest green + lime)
   ============================================================ */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 2.5rem 1.25rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(201, 239, 74, 0.16), transparent 62%),
    radial-gradient(700px 420px at -8% 105%, rgba(46, 139, 98, 0.35), transparent 60%),
    radial-gradient(520px 320px at 55% 120%, rgba(245, 166, 35, 0.10), transparent 65%),
    var(--forest-950);
}
.auth-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(75% 70% at 50% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(75% 70% at 50% 30%, #000 30%, transparent 100%);
  pointer-events: none;
}

/* Left hero copy (wide layout) */
.auth-copy {
  position: relative;
  z-index: 1;
  color: #e9f0ea;
  max-width: 30rem;
  display: none;
}
@media (min-width: 1080px) {
  .auth-copy { display: block; }
}
.auth-copy .hero-badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 1.05rem; border-radius: 999px;
  background: rgba(201, 239, 74, 0.1);
  box-shadow: inset 0 0 0 1px rgba(201, 239, 74, 0.3);
  font-size: 0.85rem; font-weight: 600; color: #e7f7c8;
  margin-bottom: 1.4rem;
  backdrop-filter: blur(6px);
}
.auth-copy .hero-badge .spark { color: var(--lime); }
.auth-copy h2 {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
.auth-copy h2 .grad {
  background: linear-gradient(100deg, var(--lime) 0%, #8fe6b0 60%, var(--amber) 115%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-copy p { color: rgba(233, 240, 234, 0.75); font-size: 1.02rem; margin-bottom: 1.6rem; }
.auth-points { display: grid; gap: 0.85rem; }
.auth-points li { display: flex; align-items: center; gap: 0.8rem; font-weight: 500; color: rgba(233, 240, 234, 0.9); }

/* Brand link shown on top of card (small screens use it) */
.auth-brand {
  display: flex; justify-content: center; margin-bottom: 1.8rem;
}
.auth-brand img { height: 40px; width: auto; }

/* ---------- Card ---------- */
.auth-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  box-shadow: 0 40px 90px rgba(7, 35, 26, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  width: 100%;
  max-width: 480px;
}
.auth-card.wide { max-width: 540px; }
.auth-card h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
  text-align: center;
}
.auth-card .subtitle {
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.8rem;
  font-size: 0.96rem;
}

/* ---------- Fields ---------- */
.form-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.05rem; }
.form-field label { font-weight: 600; font-size: 0.88rem; color: var(--ink); }
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="tel"],
.auth-card select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.96rem;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-card input:focus,
.auth-card select:focus {
  outline: none;
  border-color: var(--leaf-bright);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(46, 139, 98, 0.12);
}
.auth-card input[readonly] { background: #eef2ec; color: var(--muted); }

.phone-input-group { display: flex; gap: 0.6rem; }
.phone-input-group select { flex: 0 0 42%; min-width: 0; }
.phone-input-group input { flex: 1; min-width: 0; }
@media (max-width: 480px) {
  .phone-input-group { flex-direction: column; }
  .phone-input-group select { flex: 1; }
}

/* ---------- Options row ---------- */
.form-options {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.4rem; flex-wrap: wrap; gap: 0.8rem;
}
.checkbox-wrapper { display: flex; align-items: flex-start; gap: 0.6rem; }
.checkbox-wrapper input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; cursor: pointer; accent-color: var(--leaf); }
.checkbox-wrapper label { margin: 0; font-size: 0.88rem; color: var(--body); cursor: pointer; }
.checkbox-wrapper label a { color: var(--leaf); font-weight: 600; cursor: pointer; }
.checkbox-wrapper label a:hover { color: var(--leaf-bright); }

.forgot-link {
  color: var(--leaf);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.forgot-link:hover { color: var(--leaf-bright); }

/* ---------- Buttons ---------- */
.btn-auth {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  background: var(--lime);
  color: var(--forest-950);
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s;
  box-shadow: 0 5px 0 var(--forest-950);
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--forest-950); background: var(--lime-deep); }
.btn-auth:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--forest-950); }
.btn-auth:disabled { opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: 0 5px 0 var(--forest-950); }
.btn-auth.btn-otp { background: var(--forest-900); color: #fff; box-shadow: 0 5px 0 rgba(7, 35, 26, 0.35); }
.btn-auth.btn-otp:hover { background: var(--forest-800); }
.btn-auth .spinner {
  display: none;
  width: 17px; height: 17px;
  border: 2.5px solid rgba(7, 35, 26, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}
.btn-auth.loading .spinner { display: inline-block; }
.btn-auth.btn-otp .spinner { border-color: rgba(255, 255, 255, 0.3); border-top-color: #fff; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ---------- OTP section ---------- */
.otp-section {
  background: var(--brand-soft);
  border: 1px solid rgba(29, 107, 79, 0.15);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin: 1.2rem 0;
}
.otp-timer { text-align: center; margin-top: 0.9rem; color: var(--muted); font-size: 0.86rem; }
.otp-timer a { color: var(--leaf); font-weight: 600; text-decoration: none; cursor: pointer; display: none; }

/* ---------- Links & alerts ---------- */
.auth-alt { text-align: center; margin-top: 1.6rem; color: var(--muted); font-size: 0.94rem; }
.auth-alt a { color: var(--leaf); font-weight: 700; text-decoration: none; }
.auth-alt a:hover { color: var(--leaf-bright); }

.auth-card .text-danger { color: #c0392b; font-size: 0.8rem; margin-top: 2px; display: block; }
.auth-card .validation-summary-errors, .auth-alert {
  background: #fdecea;
  border: 1px solid rgba(192, 57, 43, 0.3);
  color: #7b241c;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
}
.auth-card .validation-summary-errors ul { margin: 0.3rem 0 0; padding-left: 1.1rem; list-style: disc; display: grid; gap: 0.25rem; }

/* success note (email sent etc.) */
.auth-success {
  background: var(--teal-soft);
  border: 1px solid rgba(15, 138, 103, 0.35);
  color: #0b5c44;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}

@media (max-width: 576px) {
  .auth-card { padding: 1.5rem 1.2rem; }
  .auth-card h2 { font-size: 1.45rem; }
}
