/* ── Design tokens ── */
:root {
  --bg: #0a0d0f;
  --bg2: #0f1418;
  --card: #141c22;
  --card2: #1a2530;
  --navy: #1a3a6b;
  --navy2: #2454a0;
  --green: #6ec22a;
  --green2: #89d93d;
  --text: #e8f0f8;
  --text2: #7a98b4;
  --border: rgba(110, 194, 42, 0.13);
  --border2: rgba(110, 194, 42, 0.22);
  --danger: #ff4d6d;
  --warn: #ffc107;
  --success: #6ec22a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── Grid bg ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(110, 194, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 58, 107, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* ── Noise ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  opacity: 0.35;
}

/* ── Orbs ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: orbPulse 8s ease-in-out infinite;
}
.orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(26, 58, 107, 0.22) 0%, transparent 70%);
  top: -160px;
  left: -140px;
}
.orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(110, 194, 42, 0.15) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-delay: -4s;
}
@keyframes orbPulse {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1;   }
}

/* ── Navbar ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 13, 15, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--green); }
.nav-ctas {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ── Buttons (global) ── */
.btn-ghost {
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(110, 194, 42, 0.28);
  border-radius: 8px;
  color: var(--text2);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}
.btn-primary {
  padding: 0.45rem 1.25rem;
  background: linear-gradient(135deg, var(--navy2), var(--green));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
  cursor: pointer;
  display: inline-block;
  font-family: inherit;
}
.btn-primary:hover { opacity: 0.85; }

/* ── Page layout — single centred card ── */
.page-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 90px 1rem 4rem;
  position: relative;
  z-index: 1;
}

/* Card is centred and capped at a comfortable reading width */
.auth-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 2.2rem 2rem 1.8rem;
  position: relative;
  width: 100%;
  max-width: 560px;
  box-shadow:
    0 0 0 1px rgba(110, 194, 42, 0.05),
    0 32px 64px rgba(0, 0, 0, 0.55);
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
}

/* Logo inside card (added after removing side panel) */
.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.auth-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 0.2rem;
  background: linear-gradient(135deg, var(--text), var(--green2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.67rem;
  color: var(--text2);
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

/* ── Alerts ── */
.auth-alert {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.auth-alert.error {
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid rgba(255, 77, 109, 0.25);
  color: var(--danger);
}
.auth-alert.success {
  background: rgba(110, 194, 42, 0.08);
  border: 1px solid rgba(110, 194, 42, 0.25);
  color: var(--green2);
}

/* ── Success box ── */
.success-box {
  background: rgba(110, 194, 42, 0.06);
  border: 1px solid rgba(110, 194, 42, 0.22);
  border-radius: 14px;
  padding: 1.4rem;
  font-size: 0.84rem;
  line-height: 1.8;
}
.success-box h4 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: var(--green2);
  margin-bottom: 0.8rem;
  text-align: center;
}
.success-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(110, 194, 42, 0.1);
}
.success-row:last-child { border-bottom: none; }
.success-row span:first-child {
  color: var(--text2);
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
}
.success-row span:last-child {
  font-weight: 700;
  color: var(--text);
}

/* ── Form ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.form-group { margin-bottom: 1rem; }

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 0.38rem;
  letter-spacing: 0.05em;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
label .req { color: var(--green); }

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border2);
  border-radius: 9px;
  padding: 0.68rem 0.9rem;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.form-control::placeholder {
  color: var(--text2);
  opacity: 0.7;
}
.form-control:focus {
  border-color: rgba(110, 194, 42, 0.55);
  box-shadow: 0 0 0 3px rgba(110, 194, 42, 0.09);
  background: rgba(110, 194, 42, 0.025);
}
.form-control[readonly] {
  opacity: 0.55;
  cursor: default;
}
.form-control.verified  { border-color: rgba(110, 194, 42, 0.5); }
.form-control.error-field { border-color: rgba(255, 77, 109, 0.45); }

/* Input with action btn */
.input-action { position: relative; }
.input-action .form-control { padding-right: 5.5rem; }
.input-btn {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(110, 194, 42, 0.1);
  border: 1px solid rgba(110, 194, 42, 0.25);
  border-radius: 6px;
  color: var(--green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.28rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.input-btn:hover { background: rgba(110, 194, 42, 0.18); }
.input-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Eye toggle */
.input-wrap { position: relative; }
.input-wrap .form-control { padding-right: 3rem; }
.eye-btn {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text2);
  transition: color 0.2s;
  font-size: 16px;
}
.eye-btn:hover { color: var(--green); }

/* ── OTP section ── */
.otp-send-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 10px;
}
.otp-send-row .btn-otp {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--green);
  border-radius: 8px;
  background: transparent;
  color: var(--green);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.otp-send-row .btn-otp:hover:not(:disabled):not(.otp-locked) {
  background: var(--green);
  color: #fff;
}
.otp-send-row .btn-otp:disabled,
.otp-send-row .btn-otp.otp-locked {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}
.otp-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text2);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.otp-msg {
  display: none;
  text-align: center;
  font-size: 0.82rem;
  margin-top: 6px;
  margin-bottom: 2px;
  padding: 0.4rem 0.6rem;
  border-radius: 7px;
}
.otp-msg.success {
  color: var(--green2);
  background: rgba(110, 194, 42, 0.07);
}
.otp-msg.error {
  color: var(--danger);
  background: rgba(255, 77, 109, 0.07);
}
.btn-otp .countdown { font-size: 0.78rem; }

/* ── Terms ── */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}
.chk {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--green);
  cursor: pointer;
}
.terms-row label {
  font-family: 'Outfit', sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8rem;
  color: var(--text2);
  margin: 0;
  font-weight: 400;
}
.terms-row a { color: var(--warn); }

/* ── Submit ── */
.btn-submit {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--navy2), var(--green));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Bebas Neue', cursive;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.07));
}
.btn-submit:hover   { opacity: 0.9; }
.btn-submit:active  { transform: scale(0.99); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Auth footer ── */
.auth-footer {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.86rem;
  color: var(--text2);
}
.auth-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2));
}
.auth-divider::after { transform: rotate(180deg); }
.auth-divider span {
  font-size: 0.66rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text2);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ── Spinner ── */
.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Page footer ── */
footer.page-foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text2);
  border-top: 1px solid var(--border);
}
footer.page-foot a { color: var(--green); text-decoration: none; }
footer.page-foot a:hover { text-decoration: underline; }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */

/* Tablet */
@media (max-width: 768px) {
  .nav-links { display: none; }

  .page-wrap {
    padding: 80px 1rem 3rem;
    align-items: flex-start;
  }

  .auth-card {
    max-width: 100%;
    padding: 1.8rem 1.4rem;
    border-radius: 16px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .nav-ctas .btn-ghost { display: none; }

  .page-wrap { padding: 74px 0.75rem 2.5rem; }

  .auth-card {
    padding: 1.4rem 1rem;
    border-radius: 14px;
  }

  .auth-title { font-size: 1.5rem; }

  /* Stack the two-column rows into single column */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* OTP buttons stack on very small screens */
  .otp-send-row { flex-direction: column; }
  .otp-send-row .btn-otp { max-width: 100%; }

  .btn-submit { font-size: 1.05rem; }
}