/**
 * Unified auth surfaces — member/login, admin/index (login), verify.php
 * Typography (NE + EN mix), spacing, card alignment, alerts.
 */
body.auth-portal-page {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(ellipse 82% 54% at 16% -8%, rgba(26,135,84,.10) 0%, transparent 52%),
    radial-gradient(ellipse 68% 48% at 100% 0%, rgba(59,130,246,.08) 0%, transparent 48%),
    linear-gradient(165deg,#f0fdf4 0%,#ecfdf5 40%,#f0f9ff 100%);
}

/* Compact centered auth shell for member/admin login */
body.auth-portal-page .split-wrap {
  width: min(1020px, calc(100% - 52px));
  height: min(760px, calc(100dvh - 16px));
  min-height: 0;
  margin: 8px auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #fff;
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.13);
  grid-template-columns: 0.94fr 1.06fr;
}

body.auth-portal-page .split-left,
body.auth-portal-page .split-right {
  min-height: 100%;
}

/* Tighter visual hierarchy like compact enterprise auth screens */
body.auth-portal-page .split-left {
  padding-top: 28px;
  padding-bottom: 20px;
}

body.auth-portal-page .split-left .sl-top {
  margin-bottom: 8px;
}

body.auth-portal-page .split-left .sl-hero .eyebrow {
  margin-bottom: 12px;
}

body.auth-portal-page .split-left .sl-hero h1 {
  margin-bottom: 12px;
}

body.auth-portal-page .split-left .sl-hero p {
  max-width: 390px;
  font-size: 0.9rem;
}

body.auth-portal-page .split-left .sl-features {
  margin-top: 12px;
  gap: 8px;
}

/* Readable mixed Nepali / English */
body.auth-portal-page .split-right,
body.auth-portal-page .split-left .sl-hero p,
body.auth-portal-page .sl-bottom,
body.auth-portal-page .vp-wrap,
body.auth-portal-page .vp-card,
body.auth-portal-page .vp-sub,
body.auth-portal-page .vp-help,
body.auth-portal-page .alert,
body.auth-portal-page .alert-error,
body.auth-portal-page .field-feedback,
body.auth-portal-page .foot-link,
body.auth-portal-page .tracker-link,
body.auth-portal-page .security-note {
  word-spacing: 0.06em;
}

body.auth-portal-page .vp-sub,
body.auth-portal-page .sr-sub,
body.auth-portal-page .sl-hero p {
  line-height: 1.65;
}

/* Form card — same visual weight */
body.auth-portal-page .sr-inner,
body.auth-portal-page .vp-card {
  border-radius: 20px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 20px 44px rgba(15, 23, 42, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

body.auth-portal-page .sr-inner {
  max-width: 420px;
}

body.auth-portal-page .split-right {
  align-items: center;
}

/* Titles + badge centered (member / admin right panel) */
body.auth-portal-page .split-right .sr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  margin-right: auto;
}

body.auth-portal-page .split-right .sr-title,
body.auth-portal-page .split-right .sr-sub {
  text-align: center;
}

body.auth-portal-page .split-right .sr-sub {
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 18px;
}

/* Tabs — clear separation from messages */
body.auth-portal-page .tabs {
  margin-top: 2px;
  margin-bottom: 18px;
  padding: 5px;
  gap: 5px;
}

body.auth-portal-page .tab-btn {
  letter-spacing: 0.04em;
  word-spacing: 0.05em;
}

/* Alerts (member) + admin error */
body.auth-portal-page .alert,
body.auth-portal-page .alert-error,
body.auth-portal-page .alert-info,
body.auth-portal-page .alert-warning,
body.auth-portal-page .alert-success {
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
}

body.auth-portal-page .alert i,
body.auth-portal-page .alert-error i,
body.auth-portal-page .alert-info i,
body.auth-portal-page .alert-warning i,
body.auth-portal-page .alert-success i {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Fields */
body.auth-portal-page .field,
body.auth-portal-page .vp-field {
  margin-bottom: 16px;
}

body.auth-portal-page .field label,
body.auth-portal-page .vp-field label {
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  word-spacing: 0.05em;
  line-height: 1.35;
}

body.auth-portal-page .field input,
body.auth-portal-page .vp-field input {
  letter-spacing: 0.02em;
}

body.auth-portal-page .vp-field .hint {
  line-height: 1.5;
  margin-top: 6px;
  word-spacing: 0.05em;
}

/* Verify page main title block */
body.auth-portal-page .vp-wrap > .vp-icon + h1 {
  max-width: 20ch;
  margin-left: auto;
  margin-right: auto;
}

body.auth-portal-page .vp-sub {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 4px;
}

body.auth-portal-page .vp-sub b {
  font-weight: 700;
}

body.auth-portal-page .vp-btn {
  letter-spacing: 0.04em;
  margin-top: 4px;
}

body.auth-portal-page .vp-help {
  line-height: 1.65;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* Member footer + OAuth */
body.auth-portal-page .foot-link {
  margin-top: 18px;
  line-height: 1.55;
}

body.auth-portal-page .oauth-divider {
  margin-top: 22px;
  margin-bottom: 16px;
  letter-spacing: 0.08em;
}

/* Left panel feature chips — tighten mixed script */
body.auth-portal-page .sl-feat span {
  line-height: 1.35;
  word-spacing: 0.05em;
}

/* Admin security note */
body.auth-portal-page .security-note {
  line-height: 1.55;
  word-spacing: 0.05em;
  margin-top: 18px;
}

/* ------------------------------------------------------------------
   Unified compact auth design system (admin/member/verify)
   Keeps per-page logic unchanged; only visual alignment.
------------------------------------------------------------------- */
body.auth-portal-page .page-back {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: rgba(255,255,255,.92);
  color: var(--primary-color,#1a8754);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 700;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
}

body.auth-portal-page .auth-card,
body.auth-portal-page .verify-form-card {
  width: 100%;
  max-width: 396px;
  border-radius: 20px !important;
  border: 1px solid rgba(226,232,240,.92) !important;
  box-shadow: 0 4px 6px rgba(0,0,0,.04), 0 24px 52px rgba(13,92,46,.12) !important;
  background: #fff !important;
  overflow: hidden;
}

body.auth-portal-page .card-header,
body.auth-portal-page .verify-form-card__head {
  padding: 16px 18px 12px !important;
  text-align: center;
  border-bottom: 1px solid #f1f5f9 !important;
  background: linear-gradient(180deg, rgba(240,253,244,.5) 0%, #fff 100%) !important;
  color: inherit !important;
}

body.auth-portal-page .card-body,
body.auth-portal-page .verify-form-card__body {
  padding: 16px 18px 18px !important;
}

body.auth-portal-page .card-portal-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: var(--primary-color,#1a8754);
  font-size: .7rem !important;
  font-weight: 700;
  letter-spacing: .9px;
  text-transform: uppercase;
}

body.auth-portal-page .field input,
body.auth-portal-page .field select,
body.auth-portal-page .vp-field input,
body.auth-portal-page .vp-field select,
body.auth-portal-page .vp-field-input {
  min-height: 44px !important;
  border-radius: 10px !important;
  font-size: .89rem !important;
  border: 1.5px solid #e5e7eb !important;
  background: #fafbfc !important;
}

body.auth-portal-page .submit-btn,
body.auth-portal-page .vp-btn {
  min-height: 44px !important;
  border-radius: 10px !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  padding: 10px 14px !important;
  color: var(--text-on-primary, #fff) !important;
}

body.auth-portal-page .alert,
body.auth-portal-page .alert-error,
body.auth-portal-page .vp-result-fail {
  border-radius: 10px !important;
}

/* Pixel-perfect lock: fixed scale across admin/member/verify */
body.auth-portal-page {
  --auth-icon-size: 52px;
  --auth-icon-font: 1.35rem;
  --auth-title-size: 1.02rem;
  --auth-title-gap: 2px;
  --auth-sub-size: .76rem;
  --auth-sub-gap: 12px;
  --auth-alert-icon-size: 14px;
  --auth-alert-icon-top: 2px;
  --auth-tab-height: 38px;
}

body.auth-portal-page .card-logo-icon,
body.auth-portal-page .vp-page-logo-icon,
body.auth-portal-page .verify-form-card__head .vp-icon,
body.auth-portal-page .vp-icon {
  width: var(--auth-icon-size) !important;
  height: var(--auth-icon-size) !important;
  font-size: var(--auth-icon-font) !important;
}

body.auth-portal-page .card-title,
body.auth-portal-page .verify-form-card__head h1,
body.auth-portal-page h1 {
  font-size: var(--auth-title-size) !important;
  margin-bottom: var(--auth-title-gap) !important;
  line-height: 1.2 !important;
}

body.auth-portal-page .card-sub,
body.auth-portal-page .verify-form-card__head .vp-sub,
body.auth-portal-page .vp-sub {
  font-size: var(--auth-sub-size) !important;
  margin-bottom: var(--auth-sub-gap) !important;
  line-height: 1.5 !important;
}

body.auth-portal-page .alert i,
body.auth-portal-page .alert-error i,
body.auth-portal-page .alert-info i,
body.auth-portal-page .alert-warning i,
body.auth-portal-page .alert-success i,
body.auth-portal-page .vp-result-fail i {
  font-size: var(--auth-alert-icon-size) !important;
  margin-top: var(--auth-alert-icon-top) !important;
  line-height: 1 !important;
}

body.auth-portal-page .tabs {
  min-height: var(--auth-tab-height) !important;
}

body.auth-portal-page .tab-btn {
  min-height: calc(var(--auth-tab-height) - 8px) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Verify page exact centering */
body.auth-portal-page.verify-auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px 24px;
}

body.auth-portal-page.verify-auth-page .vp-outer {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  body.auth-portal-page.verify-auth-page {
    align-items: flex-start;
    padding-top: 14px;
  }
}

/* Verify page: keep original strong header contrast */
body.auth-portal-page .verify-form-card__head {
  background: linear-gradient(135deg,var(--primary-dark,#0f4f20),var(--primary-color,#1a8754)) !important;
  color: var(--text-on-primary,#fff) !important;
  border-bottom-color: transparent !important;
}

body.auth-portal-page .verify-form-card__head h1,
body.auth-portal-page .verify-form-card__head .vp-sub,
body.auth-portal-page .verify-form-card__head .vp-sub b {
  color: var(--text-on-primary,#fff) !important;
}

@media (max-width: 900px) {
  body.auth-portal-page .split-wrap {
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    grid-template-columns: 1fr;
  }

  body.auth-portal-page .split-right .sr-title,
  body.auth-portal-page .split-right .sr-sub {
    text-align: center;
  }
}
