/* ============================================================
   auth.css — TLDC-LGU Auth Pages
   Two-column split: hero left, floating card right
   ============================================================ */

:root {
  --orange:       #f57c00;
  --orange-dark:  #e65100;
  --orange-light: #ff9800;
  --green:        #2e7d32;
  --green-light:  #43a047;
  --navy:         #1a237e;
  --blue:         #1565c0;
  --text-dark:    #1a1a2e;
  --text-mid:     #546e7a;
  --text-light:   #90a4ae;
  --border:       #e8edf2;
  --bg-field:     #f7f9fc;
  --error:        #ef5350;
  --success:      #66bb6a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
}

/* ══════════════════════════════
   FULL-PAGE WRAPPER
══════════════════════════════ */
.auth-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
  overflow-x: hidden; /* allow card-side to scroll vertically */
}

/* Background image + gradient on wrapper */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      108deg,
      rgba(200, 70,  0, .84)  0%,
      rgba(10,  15, 25, .80) 48%,
      rgba(20,  70, 22, .84) 100%
    ),
    url('../../../assets/images/events/auth-bg1.jpg') center / cover no-repeat;
}

/* Register page — green-dominant gradient */
.register-page::before {
  background:
    linear-gradient(
      108deg,
      rgba(20,  70, 22, .85)  0%,
      rgba(10,  15, 25, .80) 48%,
      rgba(20,  50,100, .82) 100%
    ),
    url('../../../assets/images/events/auth-bg1.jpg') center / cover no-repeat;
}

/* Forgot password page — blue-dominant gradient */
.forgot-page::before {
  background:
    linear-gradient(
      108deg,
      rgba(18,  60,120, .85)  0%,
      rgba(10,  15, 25, .80) 48%,
      rgba(20,  70, 22, .82) 100%
    ),
    url('../../../assets/images/events/auth-bg1.jpg') center / cover no-repeat;
}

/* Reset password page — same gradient as forgot password for visual continuity */
.reset-page::before {
  background:
    linear-gradient(
      108deg,
      rgba(18,  60,120, .85)  0%,
      rgba(10,  15, 25, .80) 48%,
      rgba(20,  70, 22, .82) 100%
    ),
    url('../../../assets/images/events/auth-bg1.jpg') center / cover no-repeat;
}

/* Grain texture */
.auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ══════════════════════════════
   LEFT — HERO SIDE
══════════════════════════════ */
.hero-side {
  position: relative;
  z-index: 2;
  padding: 3rem 3rem 3rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

/* Back to home */
.back-link {
  position: absolute;
  top: 2rem;
  left: 4rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: rgba(255,255,255,.65);
  font-size: .78rem;
  font-weight: 500;
  text-decoration: none;
  padding: .32rem .85rem;
  border-radius: 50px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  transition: all .2s;
}
.back-link:hover { color: #fff; background: rgba(255,255,255,.18); }

/* Brand row */
.hero-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 3rem;
  animation: fadeUp .5s ease .1s both;
}

.hero-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.28);
  backdrop-filter: blur(10px);
  padding: 6px;
  flex-shrink: 0;
}

.hero-brand-name {
  font-weight: 800;
  font-size: .92rem;
  color: #fff;
  line-height: 1.2;
}
.hero-brand-sub {
  font-size: .65rem;
  color: rgba(255,255,255,.5);
}

/* Headline */
.hero-headline {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -.03em;
  text-shadow: 0 2px 32px rgba(0,0,0,.35);
  margin-bottom: 1.1rem;
  animation: fadeUp .55s ease .2s both;
}
.hero-headline span { color: #ffcc02; }

/* Subtitle */
.hero-sub {
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
  font-weight: 300;
  color: rgba(255,255,255,.7);
  line-height: 1.75;
  max-width: 460px;
  animation: fadeUp .55s ease .3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════
   RIGHT — CARD SIDE
══════════════════════════════ */
.card-side {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 2rem;
  overflow-y: auto;
  /* when card is taller than viewport, start from top not center */
  align-items: flex-start;
  padding-block: 2.5rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 24px;
  box-shadow:
    0 40px 100px rgba(0,0,0,.45),
    0 12px 32px rgba(0,0,0,.25),
    0 0 0 1px rgba(255,255,255,.08);
  padding: 2.4rem 2.25rem;
  position: relative;
  overflow: hidden;
  margin: auto; /* centers vertically when card fits, sticks to top when it doesn't */
  animation: cardIn .6s cubic-bezier(.34, 1.4, .64, 1) .15s both;
}

/* Top accent line */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light), var(--green-light));
  border-radius: 24px 24px 0 0;
}

/* Register card — green accent line */
.register-card::before {
  background: linear-gradient(90deg, var(--green), var(--green-light), var(--orange-light));
}

/* Forgot card — blue accent line */
.forgot-card::before {
  background: linear-gradient(90deg, var(--blue), var(--blue-light, #1976d2), var(--green-light));
}

@keyframes cardIn {
  from { opacity: 0; transform: translateX(40px) scale(.97); }
  to   { opacity: 1; transform: translateX(0)    scale(1);   }
}

/* Card shake on error */
@keyframes errorShake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-9px); }
  40%     { transform: translateX(9px); }
  60%     { transform: translateX(-5px); }
  80%     { transform: translateX(5px); }
}
.auth-card.shake { animation: errorShake .45s ease both !important; }

/* ── Card header ── */
.card-header { margin-bottom: 1.6rem; }

.card-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: .9rem;
  box-shadow: 0 6px 20px rgba(245,124,0,.3);
  background: #fff;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

/* Green logo variant */
.logo-green {
  box-shadow: 0 6px 20px rgba(46,125,50,.35);
  border-color: rgba(46,125,50,.2);
}

/* Register card — green focus + interaction overrides */
.register-card .field-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3.5px rgba(46,125,50,.12);
}
.register-card .field-wrap:focus-within .field-icon { color: var(--green); }
.register-card .toggle-pw:hover { color: var(--green); }
.register-card .check-input:checked + .check-box { background: var(--green); border-color: var(--green); }

.card-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.025em;
  margin-bottom: .22rem;
  line-height: 1.15;
}
.card-sub {
  font-size: .83rem;
  color: var(--text-mid);
  line-height: 1.55;
  font-weight: 400;
}

/* ── Alert ── */
.card-alert {
  border-radius: 10px;
  padding: .62rem .88rem;
  font-size: .79rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  animation: errIn .25s ease both;
}
.card-alert i { font-size: .95rem; flex-shrink: 0; margin-top: .05rem; }
.alert-error   { background: rgba(239,83,80,.09);   color: #c62828; border: 1px solid rgba(239,83,80,.22);   }
.alert-success { background: rgba(102,187,106,.09); color: #1b5e20; border: 1px solid rgba(102,187,106,.22); }
.alert-info    { background: rgba(21,101,192,.08);  color: #0d47a1; border: 1px solid rgba(21,101,192,.2);   }

/* ── Field group ── */
.field-group { margin-bottom: .95rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}

.field-label {
  display: block;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: .36rem;
  letter-spacing: .025em;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .36rem;
}
.field-label-row .field-label { margin-bottom: 0; }

.forgot-link {
  font-size: .74rem;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  transition: color .2s;
}
.forgot-link:hover { color: var(--orange-dark); text-decoration: underline; }

/* ── Field wrap ── */
.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: .88rem;
  color: var(--text-light);
  font-size: .87rem;
  pointer-events: none;
  z-index: 1;
  transition: color .22s;
}

.field-input {
  width: 100%;
  padding: .74rem .9rem .74rem 2.35rem;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: var(--bg-field);
  font-family: 'Poppins', sans-serif;
  font-size: .875rem;
  color: var(--text-dark);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .22s, box-shadow .22s, background .22s;
}
.field-input::placeholder { color: var(--text-light); }
.field-input:focus {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(245,124,0,.12);
}
.field-wrap:focus-within .field-icon { color: var(--orange); }

.field-input.is-invalid { border-color: var(--error);   box-shadow: 0 0 0 3px rgba(239,83,80,.11);   }
.field-input.is-valid   { border-color: var(--success);  box-shadow: 0 0 0 3px rgba(102,187,106,.11); padding-right: 2.35rem; }

/* Valid checkmark */
.field-valid-icon {
  position: absolute;
  right: .88rem;
  color: var(--success);
  font-size: .88rem;
  display: none;
  pointer-events: none;
}
.field-input.is-valid ~ .field-valid-icon { display: block; }

/* Error message */
.field-error {
  font-size: .72rem;
  color: var(--error);
  font-weight: 500;
  margin-top: .26rem;
  min-height: .85rem;
}

@keyframes errIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Password toggle ── */
.toggle-pw {
  position: absolute;
  right: .75rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: .22rem;
  font-size: .92rem;
  line-height: 1;
  z-index: 1;
  transition: color .2s;
}
.toggle-pw:hover { color: var(--orange); }

/* ── Password strength ── */
.pw-strength-wrap { margin-top: .45rem; }
.pw-strength-bar-bg {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.pw-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width .4s ease, background-color .4s ease;
}
.pw-strength-text {
  font-size: .7rem;
  font-weight: 600;
  margin-top: .22rem;
  min-height: .85rem;
}

/* ── Meta row (remember + forgot) ── */
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

/* ── Custom checkbox ── */
.field-check { margin-bottom: 1rem; }
.check-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  font-size: .8rem;
  color: var(--text-mid);
  user-select: none;
}
.check-input { display: none; }
.check-box {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: var(--bg-field);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .18s;
}
.check-input:checked + .check-box { background: var(--orange); border-color: var(--orange); }
.check-input:checked + .check-box::after {
  content: '';
  width: 5px;
  height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

.terms-link { color: var(--orange); font-weight: 600; text-decoration: none; }
.terms-link:hover { text-decoration: underline; }

/* ── Cloudflare Turnstile ── */
.cf-wrap { display: flex; justify-content: center; margin-bottom: .25rem; }
.cf-turnstile { border-radius: 8px; overflow: hidden; }

/* ── Submit button ── */
.btn-auth {
  width: 100%;
  padding: .87rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  margin-bottom: .5rem;
  transition: transform .2s, box-shadow .2s;
}
.btn-auth::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
}
.btn-auth:hover::after  { background: rgba(255,255,255,.08); }
.btn-auth:hover         { transform: translateY(-2px); }
.btn-auth:active        { transform: translateY(0); }
.btn-auth:disabled      { opacity: .65; cursor: not-allowed; transform: none !important; }

.btn-auth--orange { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); box-shadow: 0 6px 22px rgba(245,124,0,.4); }
.btn-auth--orange:hover { box-shadow: 0 10px 30px rgba(245,124,0,.55); }

.btn-auth--green  { background: linear-gradient(135deg, var(--green), var(--green-light)); box-shadow: 0 6px 22px rgba(46,125,50,.4); }
.btn-auth--green:hover  { box-shadow: 0 10px 30px rgba(46,125,50,.55); }

.btn-auth--blue   { background: linear-gradient(135deg, var(--blue), var(--navy)); box-shadow: 0 6px 22px rgba(21,101,192,.4); }
.btn-auth--blue:hover   { box-shadow: 0 10px 30px rgba(21,101,192,.55); }

.btn-icon-right { margin-left: auto; font-size: 1rem; }
.btn-spinner { display: inline-block; }
.btn-spinner:not([hidden]) { animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: .9rem 0;
  color: var(--text-light);
  font-size: .74rem;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Switch link ── */
.auth-switch { text-align: center; font-size: .82rem; color: var(--text-mid); }
.auth-switch a {
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  transition: color .2s;
}
.auth-switch a:hover { color: var(--orange-dark); text-decoration: underline; }
.auth-switch.green a { color: var(--green); }
.auth-switch.green a:hover { color: var(--green-light); }

/* Forgot card — blue focus + interaction overrides */
.forgot-card .field-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3.5px rgba(21,101,192,.12);
}
.forgot-card .field-wrap:focus-within .field-icon { color: var(--blue); }

/* Forgot page — hero overflow fix */
.forgot-page .hero-side {
  justify-content: flex-start;
  padding-top: 4.5rem;
  overflow: hidden;
}
.forgot-page .hero-brand   { margin-bottom: 1.5rem; }
.forgot-page .hero-sub     { margin-bottom: 0; }

/* Reset page — same hero layout as forgot page */
.reset-page .hero-side {
  justify-content: flex-start;
  padding-top: 4.5rem;
  overflow: hidden;
}
.reset-page .hero-brand   { margin-bottom: 1.5rem; }
.reset-page .hero-sub     { margin-bottom: 0; }

/* ── Hero steps (forgot password) ── */
.hero-steps {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  animation: fadeUp .55s ease .4s both;
}

/* 2×2 grid variant */
.hero-steps--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-top: 1.25rem;
}

.hero-step {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  color: rgba(255,255,255,.7);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.4;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: .6rem .75rem;
}
.hero-step-num {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 700;
  color: #ffcc02;
  flex-shrink: 0;
  margin-top: .05rem;
}

/* ── Step panels ── */
.step { display: none; }
.step.active {
  display: block;
  animation: stepIn .4s cubic-bezier(.34, 1.3, .64, 1) both;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── Info note ── */
.info-note {
  background: rgba(21,101,192,.07);
  border: 1px solid rgba(21,101,192,.18);
  border-radius: 10px;
  padding: .65rem .9rem;
  font-size: .78rem;
  color: #0d47a1;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: 1.1rem;
  line-height: 1.55;
}
.info-note i { font-size: .95rem; flex-shrink: 0; margin-top: .05rem; }

/* ── Card back link ── */
.card-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: .85rem;
  font-size: .8rem;
  color: var(--text-mid);
}
.card-back a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  transition: color .2s;
}
.card-back a:hover { color: var(--navy); text-decoration: underline; }

/* ── Success state ── */
.success-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  animation: popIn .5s cubic-bezier(.34, 1.6, .64, 1) both;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.5); }
  to   { opacity: 1; transform: scale(1);  }
}
.success-icon-wrap i { font-size: 2.2rem; color: var(--green); }

.success-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.02em;
  margin-bottom: .35rem;
  text-align: center;
}
.success-sub {
  font-size: .83rem;
  color: var(--text-mid);
  line-height: 1.65;
  text-align: center;
  margin-bottom: 1.4rem;
}
.success-email-box {
  background: var(--bg-field);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.4rem;
  font-size: .85rem;
  color: var(--navy);
  font-weight: 600;
  word-break: break-all;
}
.success-email-box i { color: var(--green); font-size: 1rem; flex-shrink: 0; }

/* ── Resend row ── */
.resend-row {
  text-align: center;
  font-size: .78rem;
  color: var(--text-mid);
  margin-top: .6rem;
}
.resend-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  padding: 0;
  transition: color .2s;
}
.resend-btn:hover { color: var(--navy); text-decoration: underline; }
.resend-btn:disabled { color: var(--text-light); cursor: not-allowed; text-decoration: none; }
.resend-timer { color: var(--text-light); font-weight: 600; }

/* ── Register page — tighter spacing ── */
body:has(#registerForm) .auth-card    { max-width: 420px; padding: 1.75rem 2rem; }
body:has(#registerForm) .card-header  { margin-bottom: .9rem; }
body:has(#registerForm) .card-logo    { width: 44px; height: 44px; margin-bottom: .65rem; }
body:has(#registerForm) .card-title   { font-size: 1.4rem; margin-bottom: .15rem; }
body:has(#registerForm) .card-sub     { font-size: .78rem; }
body:has(#registerForm) .field-group  { margin-bottom: .55rem; }
body:has(#registerForm) .field-row    { gap: .55rem; margin-bottom: 0; }
body:has(#registerForm) .field-input  { padding-top: .52rem; padding-bottom: .52rem; font-size: .84rem; }
body:has(#registerForm) .field-label  { font-size: .72rem; margin-bottom: .28rem; }
body:has(#registerForm) .field-error  { min-height: .7rem; font-size: .68rem; }
body:has(#registerForm) .pw-strength-wrap { margin-top: .3rem; }
body:has(#registerForm) .pw-strength-text { min-height: .7rem; }
body:has(#registerForm) .field-check  { margin-bottom: .55rem; }
body:has(#registerForm) .cf-wrap      { margin-bottom: .1rem; }
body:has(#registerForm) .btn-auth     { padding: .75rem 1.5rem; font-size: .9rem; margin-bottom: .35rem; }
body:has(#registerForm) .auth-divider { margin: .6rem 0; }
body:has(#registerForm) .card-alert   { margin-bottom: .7rem; padding: .5rem .75rem; font-size: .76rem; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */

/* ── Tablet / small desktop (≤900px) ── */
@media (max-width: 900px) {
  html, body { overflow: auto; height: auto; }

  .auth-page {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* Hero becomes a compact banner */
  .hero-side {
    position: relative;
    height: auto;
    min-height: 220px;
    padding: 3.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  /* Back link flows in document, not absolute */
  .back-link {
    position: absolute;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .hero-brand       { justify-content: center; margin-bottom: 1.25rem; }
  .hero-headline    { font-size: clamp(1.8rem, 6vw, 2.6rem); margin-bottom: .6rem; }
  .hero-sub         { font-size: .85rem; max-width: 480px; }
  .hero-steps       { align-items: center; margin-top: 1.5rem; }
  .hero-steps--grid { grid-template-columns: 1fr 1fr; max-width: 480px; margin-inline: auto; }

  /* Card side */
  .card-side {
    height: auto;
    padding: 0 1.25rem 3rem;
    overflow-y: visible;
    align-items: stretch;
  }

  .auth-card {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 20px 20px 16px 16px;
    box-shadow: 0 -4px 24px rgba(0,0,0,.15), 0 20px 60px rgba(0,0,0,.3);
  }
}

/* ── Mobile (≤600px) ── */
@media (max-width: 600px) {
  /* Compress hero to minimal strip */
  .hero-side {
    min-height: 180px;
    padding: 3rem 1.5rem 1.5rem;
  }

  /* Hide the big headline and subtitle — brand only */
  .hero-headline,
  .hero-sub,
  .hero-steps { display: none; }

  .hero-brand { margin-bottom: 0; }

  /* Card fills width, sheet-style */
  .card-side  { padding: 0 1rem 2.5rem; }
  .auth-card  {
    max-width: 100%;
    border-radius: 20px 20px 14px 14px;
    padding: 1.75rem 1.5rem;
  }
  .card-title { font-size: 1.4rem; }

  /* Restore comfortable touch targets for register on mobile */
  body:has(#registerForm) .field-input  { padding-top: .68rem; padding-bottom: .68rem; font-size: .875rem; }
  body:has(#registerForm) .field-label  { font-size: .76rem; }
  body:has(#registerForm) .field-error  { min-height: .85rem; font-size: .72rem; }
  body:has(#registerForm) .btn-auth     { padding: .85rem 1.5rem; font-size: .93rem; }

  /* Stack first/last name */
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* ── Very small screens (≤380px) ── */
@media (max-width: 380px) {
  /* Hide hero entirely — just the gradient background shows */
  .hero-side  { display: none; }

  /* Page and card-side scroll freely in both axes */
  .auth-page  {
    min-height: 100dvh;
    overflow-x: auto;
    overflow-y: auto;
  }
  .card-side  {
    min-height: 100dvh;
    height: auto;
    width: 100%;
    padding: 2rem 1rem 3rem;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: auto;
  }
  .auth-card  {
    max-width: 100%;
    width: 100%;
    min-width: 0;
    margin: auto;
    border-radius: 16px;
    padding: 1.6rem 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    overflow-x: auto;
  }

  /* Ensure Turnstile widget doesn't force overflow */
  .cf-wrap { overflow-x: auto; }
  .cf-turnstile { min-width: 0; max-width: 100%; }
}

/* ══════════════════════════════
   OTP VERIFY PAGE
══════════════════════════════ */
.verify-page::before {
  background:
    linear-gradient(
      108deg,
      rgba(20,  70, 22, .85)  0%,
      rgba(10,  15, 25, .80) 48%,
      rgba(20,  50,100, .82) 100%
    ),
    url('../../../assets/images/events/auth-bg1.jpg') center / cover no-repeat;
}

.verify-card::before {
  background: linear-gradient(90deg, var(--green), var(--green-light), var(--orange-light));
}

/* OTP input group */
.otp-group {
  display: flex;
  justify-content: center;
  gap: .6rem;
  margin-bottom: .5rem;
}

.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: var(--navy);
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-field);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  caret-color: transparent;
}
.otp-input:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(46,125,50,.14);
}
.otp-input.is-filled {
  border-color: var(--green-light);
  background: #f1f8f1;
}
.otp-input.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239,83,80,.11);
}

/* Timer */
.otp-timer {
  text-align: center;
  font-size: .78rem;
  color: var(--text-mid);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}
.otp-timer i { color: var(--green); }
#timerDisplay { font-weight: 700; color: var(--green); }
#timerDisplay.expired { color: var(--error); }

/* Verify page — hero overflow fix */
.verify-page .hero-side {
  justify-content: flex-start;
  padding-top: 4.5rem;
  overflow: hidden;
}
.verify-page .hero-brand   { margin-bottom: 1.5rem; }
.verify-page .hero-sub     { margin-bottom: 0; }

/* Green button for verify page */
.btn-auth--purple {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  box-shadow: 0 6px 22px rgba(46,125,50,.4);
}
.btn-auth--purple:hover { box-shadow: 0 10px 30px rgba(46,125,50,.55); }

/* Honeypot — fully hidden */
.hp-field { display: none; }
