.auth-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(180deg, #8ec8f4 0%, #d4eafa 48%, #f5f8fc 100%);
  color: #26324a;
}

.auth-page::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  aspect-ratio: 1315 / 700;
  background:
    linear-gradient(rgba(239, 246, 255, 0.8), rgba(239, 246, 255, 0.8)),
    url("../IMAGES/balanti.png") center / 100% 100% no-repeat;
  content: "";
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 12%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 12%, transparent 100%);
}

.auth-page .topnav {
  min-height: 66px;
  padding: 8px clamp(20px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.auth-page .logo-area {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.auth-page .logo1 {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.auth-page .logo2 {
  display: none;
}

.auth-page .logo-area::after {
  content: "SAN ISIDRO MANAGEMENT SYSTEM";
  color: var(--bms-nav-text, #263449);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.auth-page .fullbg {
  height: auto;
  min-height: calc(100vh - 66px);
  width: 100%;
  padding: 28px 20px;
  overflow: visible;
  background: transparent;
}

body.auth-page.bms-sky-enabled .fullbg {
  background-color: transparent !important;
  background-image: none !important;
  background-blend-mode: normal;
}

.auth-page .topp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 122px);
  height: auto;
  padding: 0;
  gap: 0;
}

.auth-page .top-logo,
.auth-page .top-logo-container {
  display: none;
}

.auth-page .login-form {
  width: min(100%, 480px);
  max-width: 100%;
  padding: 32px 36px;
  border: 1px solid var(--bms-border, #c5d5e8);
  border-radius: 20px;
  background: linear-gradient(
    140deg,
    var(--bms-panel-start, #ffffff),
    var(--bms-panel-end, #f3f7ff)
  );
  color: var(--bms-text, #26324a);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.auth-page .login-form > h2 {
  margin: 0 0 22px;
  color: var(--bms-text, #26324a);
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-align: center;
}

.auth-page .login-form > h2::before {
  display: block;
  margin-bottom: 10px;
  color: var(--bms-muted-text, #526680);
  content: "BARANGAY SAN ISIDRO";
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.auth-page .back-btn {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bms-footer-link, #3157a4);
  font-size: 14px;
}

.auth-page .back-btn:hover {
  border: 0;
  background: transparent;
  color: var(--bms-nav-active, #3478c8);
}

.auth-page .login-form form {
  display: flex;
  width: 100%;
  flex-direction: column;
}

.auth-page .form-group {
  margin-bottom: 16px;
}

.auth-page .form-group label,
.auth-page .login-form label {
  color: var(--bms-text, #34445c);
  font-size: 14px;
  font-weight: 700;
}

.auth-page .form-group input,
.auth-page .form-group select,
.auth-page .form-group textarea,
.auth-page .login-form form > input:not([type="hidden"]) {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--bms-border, #c5d5e8);
  border-radius: 9px;
  outline: none;
  background: var(--bms-input, #ffffff);
  color: var(--bms-text, #26324a);
  font-size: 16px;
}

.auth-page .form-group textarea {
  min-height: 92px;
  resize: vertical;
}

.auth-page .form-group input:focus,
.auth-page .form-group select:focus,
.auth-page .form-group textarea:focus,
.auth-page .login-form form > input:not([type="hidden"]):focus {
  border-color: var(--bms-nav-active, #3478c8);
  outline: 3px solid rgba(52, 120, 200, 0.18);
}

.auth-page .login-form form button {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  align-self: stretch;
  border: 2px solid var(--bms-nav-active, #2f5597);
  border-radius: 10px;
  background: #2f5597;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.auth-page .login-form form button:hover {
  background: #244475;
}

.auth-page .login-form form button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.auth-page .form-links {
  align-items: stretch;
  margin: 0 0 18px;
}

.auth-page .form-links a,
.auth-page .account-login-forgot {
  color: var(--bms-footer-link, #3157a4);
  font-size: 14px;
}

.auth-page .form-links a:hover,
.auth-page .account-login-forgot:hover {
  color: var(--bms-nav-active, #3478c8);
  text-decoration: underline;
}

.auth-page .input-wrapper input {
  padding-right: 45px;
}

.auth-page .toggle-password {
  color: var(--bms-muted-text, #526680);
}

.auth-page .reset-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff1f2;
  color: #b42318;
  font-size: 14px;
  line-height: 1.45;
}

.auth-page #reset-submit-hint {
  color: var(--bms-muted-text, #526680);
  font-size: 13px;
  line-height: 1.45;
}

.auth-page .strength-container,
.auth-page .password-rules,
.auth-page #match-message {
  color: var(--bms-muted-text, #526680);
}

.auth-page .password-rules {
  font-size: 12px;
}

.auth-page .top-notification {
  max-width: calc(100% - 32px);
  border-radius: 12px;
}

.auth-page--registration .fullbg {
  min-height: calc(100vh - 66px);
}

.auth-page--registration .topp {
  min-height: 0;
}

.auth-page--registration .login-form {
  width: min(100%, 960px);
}

.auth-page--registration .login-form > h2 {
  margin-bottom: 24px;
}

.auth-page--registration #requestForm {
  display: block;
}

.auth-page--registration #registrationFields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}

.auth-page--registration #requestForm > button,
.auth-page--registration #otpVerifyForm > button {
  margin-top: 4px;
}

.auth-page--registration #otpVerifyForm {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--bms-border, #c5d5e8);
}

.auth-page--registration #otpVerifyForm p {
  color: var(--bms-muted-text, #526680) !important;
  font-size: 14px;
  line-height: 1.5;
}

.auth-page--registration #otpCode {
  letter-spacing: 0.3em;
  text-align: center;
}

.auth-page--registration .registration-terms-dialog {
  color: var(--bms-text, #26324a);
}

.auth-page--registration .registration-terms-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
}

.auth-page--registration .registration-terms-actions {
  color: var(--bms-text, #26324a);
}

.auth-page--recovery .login-form {
  width: min(100%, 480px);
}

@media (max-width: 640px) {
  .auth-page .topnav {
    min-height: 60px;
    padding: 6px 16px;
  }

  .auth-page .logo1 {
    width: 44px;
    height: 44px;
  }

  .auth-page .logo-area::after {
    max-width: 210px;
    font-size: 10px;
    white-space: normal;
  }

  .auth-page .fullbg {
    min-height: calc(100vh - 60px);
    padding: 20px 14px;
    background-attachment: scroll;
  }

  .auth-page .topp {
    min-height: calc(100vh - 100px);
  }

  .auth-page .login-form {
    padding: 28px 22px;
    border-radius: 18px;
  }

  .auth-page--registration .topp {
    min-height: 0;
  }

  .auth-page--registration #registrationFields {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
