/* ═══════════════════════════════════════════════════════════════
   auth-login.css — Shared login page for mhsadmin & bpadmin
   Split-screen: left gradient panel + right white form
═══════════════════════════════════════════════════════════════ */

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

body {
  font-family: 'Poppins', system-ui, sans-serif;
  margin: 0;
  overflow-x: hidden;
}

/* ══ LAYOUT ════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
}

/* ══ LEFT PANEL ════════════════════════════════════════════════ */
.auth-left {
  width: 400px;
  flex-shrink: 0;
  background: var(--primary-gradient);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 44px;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: rgba(255,255,255,.055);
  border-radius: 50%;
  top: -140px; right: -150px;
  pointer-events: none;
}
.auth-left::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  background: rgba(255,255,255,.045);
  border-radius: 50%;
  bottom: -70px; left: -90px;
  pointer-events: none;
}

.auth-left-inner {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 52px;
}
.auth-brand-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.22);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: #fff !important;
  flex-shrink: 0;
  line-height: 1;
}
.auth-brand-name {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.auth-brand-name span {
  color: rgba(255,255,255,.58);
  font-weight: 400;
}

.auth-left-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 99px;
  padding: 5px 14px 5px 10px;
  font-size: .68rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 18px;
}
.auth-left-badge i { font-size: .85rem; }

.auth-left h2 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.025em;
  margin-bottom: 14px;
}
.auth-left p {
  color: rgba(255,255,255,.7);
  font-size: .875rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.auth-left-features {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.auth-feat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.82);
  font-size: .82rem;
  font-weight: 500;
}
.auth-feat-item .feat-icon {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.18);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: rgba(255,255,255,.95);
  line-height: 1;
}

.auth-left-footer {
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ══ RIGHT PANEL ═══════════════════════════════════════════════ */
.auth-right {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  color-scheme: light;
}

.auth-card {
  width: 100%;
  max-width: 390px;
}

.auth-card-header {
  margin-bottom: 32px;
}
.auth-portal-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,23,195,.08);
  color: var(--primary-dark);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
}
.auth-portal-tag i { font-size: .8rem; }

.auth-card-header h3 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--neutral-dark);
  letter-spacing: -.025em;
  margin-bottom: 6px;
}
.auth-card-header p {
  color: #64748b;
  font-size: .875rem;
  margin: 0;
}

/* ══ FORM ══════════════════════════════════════════════════════ */
.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
}

.auth-input-wrap { position: relative; }
.auth-input-wrap .field-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 1rem;
  pointer-events: none;
}

/* Higher specificity than custom.css input[type] selector to win padding override */
.auth-right .auth-input {
  width: 100%;
  padding: 12px 14px 12px 40px !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  font-size: .9rem !important;
  font-family: inherit;
  color: #1e2937 !important;
  background: #f8fafc !important;
  -webkit-text-fill-color: #1e2937 !important;
  transition: border-color .18s, box-shadow .18s, background .18s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
}
.auth-right .auth-input:focus {
  border-color: var(--primary-light) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(99,23,195,.1) !important;
}
.auth-right .auth-input::placeholder {
  color: #bcc5d0 !important;
  -webkit-text-fill-color: #bcc5d0 !important;
  opacity: 1;
}
/* autofill override */
.auth-right .auth-input:-webkit-autofill,
.auth-right .auth-input:-webkit-autofill:hover,
.auth-right .auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important;
  -webkit-text-fill-color: #1e2937 !important;
  border-color: #e2e8f0 !important;
}

/* ══ reCAPTCHA ═════════════════════════════════════════════════ */
.auth-recaptcha {
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 8px;
}

/* ══ SUBMIT ════════════════════════════════════════════════════ */
.auth-submit {
  width: 100%;
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  font-family: inherit;
  padding: 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(99,23,195,.35);
}
.auth-submit:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 7px 22px rgba(99,23,195,.42);
}
.auth-submit:active { transform: translateY(0); }

/* ══ BACK LINK ═════════════════════════════════════════════════ */
.auth-back {
  text-align: center;
  margin-top: 22px;
}
.auth-back a {
  color: #94a3b8;
  font-size: .82rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s;
}
.auth-back a:hover { color: var(--primary-dark); }

/* ══ ALERT ═════════════════════════════════════════════════════ */
.auth-alert-wrap .alert {
  border-radius: 10px;
  font-size: .85rem;
  border: none;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.auth-alert-wrap .alert-danger {
  background: #fef2f2;
  color: #b91c1c;
}
.auth-alert-wrap .alert-success {
  background: #f0fdf4;
  color: #166534;
}
.auth-alert-wrap .btn-close { filter: none; }

/* ══ DIVIDER ═══════════════════════════════════════════════════ */
.auth-divider {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 20px 0;
}

/* ══ MOBILE ════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .auth-left { width: 340px; padding: 40px 32px; }
}
@media (max-width: 768px) {
  .auth-page { flex-direction: column; }
  .auth-left {
    width: 100%;
    padding: 32px 24px 36px;
  }
  .auth-left h2 { font-size: 1.35rem; }
  .auth-left-features { display: none; }
  .auth-left-footer { display: none; }
  .auth-right { padding: 36px 20px 48px; }
}
@media (max-width: 400px) {
  .g-recaptcha { transform: scale(.87); transform-origin: left; }
}
