/* =========================================================
   login.css — Registrar of Societies auth pages (sign in, register, reset)
   ========================================================= */

/* ── Page shell ─────────────────────────────────────────── */
.auth-page {
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(230, 163, 58, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(131,76,40, 0.07), transparent 50%),
    var(--surface);
}

.page-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Left panel ─────────────────────────────────────────── */
.ke-strip-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.deco-circle-tr {
  width: 260px;
  height: 260px;
  top: -60px;
  right: -60px;
  animation: authFloat 14s ease-in-out infinite;
}

.deco-circle-bl {
  width: 280px;
  height: 280px;
  bottom: -90px;
  left: -50px;
  animation: authFloat 18s ease-in-out infinite reverse;
}

.left-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  animation: authRise 0.55s ease-out both;
}

.logo-box {
  width: 300px;
  height: 120px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 0 auto 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  background: #fff;
}
.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.portal-name {
  font-size: 1.8rem;
  font-family: Sora, sans-serif;
}

.portal-tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  max-width: 300px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.feature-list {
  text-align: left;
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.feature-item:hover {
  color: rgba(255, 255, 255, 0.95);
  transform: translateX(3px);
}

.feature-icon {
  flex-shrink: 0;
}

/* ── Mobile hero ─────────────────────────────────────────── */
.auth-mobile-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.auth-mobile-hero__inner {
  padding: 3.25rem 1rem 2rem;
}

.auth-mobile-hero__logo {
  width: auto;
  max-width: 240px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
}

.auth-mobile-hero__title {
  font-family: Sora, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.auth-mobile-hero__subtitle {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
  max-width: 18rem;
  margin-left: auto;
  margin-right: auto;
}

/* ── Right panel / form card ─────────────────────────────── */
.auth-right {
  position: relative;
  overflow: hidden;
}

.auth-right-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(131,76,40, 0.08) 0%, transparent 70%);
  top: 5%;
  right: -6%;
  pointer-events: none;
  z-index: 0;
}

.auth-right-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 1;
  min-height: 100%;
}

.auth-form-surface {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: none;
  border-left: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 0;
  box-shadow: none;
  animation: authRise 0.55s ease-out 0.06s both;
}

.auth-form-strip {
  display: block;
  border-radius: 0;
  flex-shrink: 0;
}

.auth-form-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 2.5rem clamp(1.5rem, 4vw, 3.5rem) 2rem;
}

.form-max-width,
.form-max-width-register {
  width: 100%;
  max-width: none;
}

.auth-login-badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid #e8d4c4;
  border-radius: 999px;
}

.page-heading {
  font-size: 1.55rem;
  font-family: Sora, sans-serif;
  color: #111827;
}

.page-subheading {
  font-size: 0.875rem;
  line-height: 1.55;
}

.error-banner {
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.form-label-sm {
  font-size: 0.875rem;
}

.toggle-password,
.pw-toggle {
  cursor: pointer;
  background-color: #fff;
  border-color: var(--border);
}

.form-footer-row {
  font-size: 0.875rem;
}

.forgot-link {
  color: var(--primary);
}

.submit-btn {
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -8px rgba(131,76,40, 0.55);
}

.register-nudge {
  font-size: 0.875rem;
}

/* ── Auth method cards ──────────────────────────────────── */
.auth-method-card {
  position: relative;
  padding: 1.15rem 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid #d8ebe0;
  background:
    linear-gradient(180deg, #f4fbf7 0%, #ffffff 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.auth-method-card--soft {
  border-color: var(--border);
  background: #fafbfc;
}

.auth-method-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 8px 16px -8px rgba(131,76,40, 0.65);
}

.auth-method-card__title {
  font-family: Sora, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.25rem;
}

.auth-method-card__hint {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.45;
}

/* ── Dual auth (eCitizen + OTP) ─────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted, #6b7280);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border, #e5e7eb), transparent);
}

.auth-method-otp .form-control.text-center {
  letter-spacing: 0.35em;
  font-size: 1.25rem;
}

.otp-destination {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  border: 1px solid #e8d4c4;
  font-size: 0.875rem;
  color: #6a3d20;
}

.otp-destination strong {
  display: inline-block;
  margin-left: 0.2rem;
  word-break: break-all;
}

.otp-verify-actions .btn-link {
  font-size: 0.8125rem;
}

.auth-method-password .btn-link {
  font-size: 0.8125rem;
}

.auth-dev-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
}

.register-link {
  color: var(--primary);
}

.demo-box {
  font-size: 0.75rem;
}

/* ── Motion ──────────────────────────────────────────────── */
@keyframes authRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes authFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -12px); }
}

@media (prefers-reduced-motion: reduce) {
  .left-inner,
  .auth-form-surface,
  .deco-circle-tr,
  .deco-circle-bl,
  .submit-btn,
  .feature-item {
    animation: none !important;
    transition: none !important;
  }

  .submit-btn:hover,
  .feature-item:hover {
    transform: none;
  }
}

/* ── Tablet / mobile ─────────────────────────────────────── */
@media (max-width: 991.98px) {
  .auth-right {
    min-height: auto;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0 1rem 1.5rem;
  }

  .auth-right-glow {
    display: none;
  }

  .auth-right-inner {
    padding: 0;
  }

  .auth-form-surface {
    z-index: 2;
    margin-top: -1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
  }

  .auth-form-strip {
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .auth-form-body {
    padding: 1.25rem;
    justify-content: flex-start;
  }

  .page-heading {
    font-size: 1.35rem;
  }

  .page-subheading {
    font-size: 0.8125rem;
  }

  .lang-switcher-top {
    top: max(0.5rem, env(safe-area-inset-top));
    right: max(0.5rem, env(safe-area-inset-right));
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .auth-right {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .auth-form-body {
    padding: 1.5rem;
  }

  .auth-right-inner {
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  .auth-mobile-hero__inner {
    padding: 3rem 0.75rem 1.75rem;
  }

  .auth-right {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .auth-form-surface {
    margin-top: -1rem;
    border-radius: 12px;
  }

  .auth-form-strip {
    border-radius: 12px 12px 0 0;
  }

  .auth-form-body {
    padding: 1rem;
  }

  .auth-method-card {
    padding: 1rem;
  }

  .auth-method-otp .form-control.text-center {
    font-size: 1.1rem;
  }

  .submit-btn {
    padding-top: 0.8rem !important;
    padding-bottom: 0.8rem !important;
  }

  .form-control,
  .input-group-text {
    font-size: 1rem;
  }
}
