.auth-page {
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(var(--theme-primary-rgb, 13, 110, 253), 0.1), transparent 32rem),
    linear-gradient(135deg, #f8fafc 0%, #f4f7f1 48%, #fff8ef 100%);
  color: var(--theme-text, #1f2937);
}

.auth-shell {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(450px, 2fr);
}

.auth-brand-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: clamp(1.5rem, 4vh, 3rem) clamp(2rem, 5vw, 4.5rem);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.28)),
    linear-gradient(135deg, rgba(var(--theme-primary-rgb, 13, 110, 253), 0.12), rgba(248, 177, 74, 0.12));
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.auth-brand-content {
  width: min(100%, 470px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-logo-wrap {
  display: flex;
  justify-content: center;
}

.auth-logo-wrap .text-center {
  margin: 0 !important;
}

.auth-logo-wrap img {
  max-width: 180px;
  max-height: 58px;
  object-fit: contain;
}

.auth-logo-wrap h4 {
  margin: 0;
  color: #1f2937;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.auth-brand-title {
  margin: clamp(0.85rem, 2.5vh, 1.5rem) 0 0.65rem;
  font-size: clamp(1.45rem, 2.3vw, 2.05rem);
  line-height: 1.2;
  font-weight: 700;
  color: #172033;
}

.auth-brand-text {
  max-width: 34rem;
  margin: 0 auto;
  color: #5f6b7a;
  font-size: 0.98rem;
  line-height: 1.7;
}

.auth-illustration {
  width: min(100%, 390px);
  max-height: min(42vh, 390px);
  margin-top: clamp(1.25rem, 4vh, 2.75rem);
  filter: drop-shadow(0 22px 32px rgba(15, 23, 42, 0.12));
  object-fit: contain;
}

.auth-form-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  min-width: 450px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: rgba(255, 255, 255, 0.82);
  overflow-y: auto;
}

.auth-card {
  position: relative;
  width: min(100%, 420px);
  padding: 2.25rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.11);
  overflow: hidden;
}

.auth-card--signup {
  width: min(100%, 430px);
}

.auth-mobile-logo {
  display: none;
  margin-bottom: 1rem;
}

.auth-form-title {
  margin: 0;
  color: #172033;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.auth-form-subtitle {
  margin: 0.55rem 0 1.75rem;
  color: #667085;
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
}

.auth-helper-text {
  margin: -0.5rem 0 1.5rem;
  color: #667085;
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
}

.auth-form .form-floating {
  position: relative;
}

.auth-form .form-floating > .form-control {
  height: 44px;
  min-height: 44px;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  background-color: #fff;
  color: #182033;
  font-size: 0.94rem;
  line-height: 1.2;
  padding: 0.72rem 0.95rem;
  box-shadow: none;
}

.auth-form .form-floating > label {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 0.95rem;
  color: #667085;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.2;
  opacity: 1;
  transform: none;
}

.auth-form .form-floating > .form-control:focus {
  border-color: var(--theme-primary, #0d6efd);
  box-shadow: 0 0 0 4px rgba(var(--theme-primary-rgb, 13, 110, 253), 0.12);
}

.auth-form .form-floating > .form-control:not(:placeholder-shown),
.auth-form .form-floating > .form-control:focus {
  padding-top: 1.2rem;
  padding-bottom: 0.28rem;
}

.auth-form .form-floating > .form-control:not(:placeholder-shown) ~ label,
.auth-form .form-floating > .form-control:focus ~ label {
  width: auto;
  height: auto;
  top: 0.28rem;
  left: 0.72rem;
  padding: 0 0.24rem;
  background: #fff;
  color: #475467;
  font-size: 0.78rem;
  line-height: 1;
  transform: none;
}

.auth-form .form-floating > .form-control:-webkit-autofill {
  -webkit-text-fill-color: #182033;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out;
}

.auth-form .form-floating > .form-control:-webkit-autofill ~ label {
  width: auto;
  height: auto;
  top: 0.28rem;
  left: 0.72rem;
  padding: 0 0.24rem;
  background: #fff;
  color: #475467;
  font-size: 0.78rem;
  line-height: 1;
  transform: none;
}

.auth-form .form-floating > label::after {
  display: none;
}

.auth-form .invalid-feedback {
  font-size: 0.8rem;
}

.auth-form .invalid-input {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important;
}

.auth-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.auth-primary-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 0.25rem;
  border-radius: 10px;
  font-weight: 700;
}

.auth-switch-link {
  margin: 1rem 0 0;
  color: #667085;
  font-size: 0.94rem;
  text-align: center;
}

.auth-switch-link a,
.auth-link-row a {
  font-weight: 600;
}

.auth-secondary-link {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  font-size: 0.94rem;
  font-weight: 600;
}

.auth-password-hint {
  margin-top: -0.35rem;
  margin-bottom: 1rem;
  color: #667085;
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-verification-card .auth-form-title {
  margin-bottom: 1rem;
}

.auth-verification-card .auth-form-subtitle {
  max-width: 21rem;
  margin: 0 auto 1.65rem;
}

.auth-edit-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  color: var(--theme-primary, #0d6efd);
  line-height: 1;
  vertical-align: middle;
}

.auth-otp-floating {
  width: min(100%, 336px);
  max-width: 100%;
  margin-right: auto;
  margin-bottom: 1rem !important;
  margin-left: auto;
}

.auth-otp-label {
  display: block;
  margin-bottom: 0.55rem;
  color: #475467;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.auth-otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, 44px);
  justify-content: center;
  gap: 8px;
}

.auth-otp-box {
  width: 44px;
  height: 48px;
  border: 1px solid #d9e2f1;
  border-radius: 8px;
  appearance: none;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-otp-box:hover {
  border-color: #c8d4e5;
}

.auth-otp-box:focus {
  border-color: var(--theme-primary, #0d6efd);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--theme-primary-rgb, 13, 110, 253), 0.12);
}

.auth-otp-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.auth-otp-floating .text-danger {
  display: block;
  margin-top: 0.4rem;
  text-align: center;
}

.auth-otp-floating > label {
  display: none !important;
}

.auth-otp-resend-row {
  width: 100%;
  max-width: 360px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto 0.85rem;
}

.auth-otp-resend-row .small {
  font-size: 0.92rem;
}

.auth-form #re-send-signin-forget-otp {
  min-width: 7rem;
  color: var(--theme-primary, #0d6efd);
  font-weight: 600;
  text-align: right;
  text-decoration: none;
}

.auth-form #re-send-signin-forget-otp:disabled {
  color: #98a2b3;
  text-decoration: none;
}

.auth-verification-card #msg {
  min-height: 1.15rem;
  margin-bottom: 0.85rem !important;
}

.auth-verification-card .auth-primary-btn {
  margin-top: 0;
}

.auth-verification-card .auth-secondary-link {
  margin-top: 0.85rem;
}

.loading-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #eef2f7;
  overflow: hidden;
}

.loading-line::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--theme-primary, #0d6efd);
  animation: auth-loading-animation 1.5s linear infinite;
}

.social-login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.35rem 0 1rem;
  color: #98a2b3;
  font-size: 0.88rem;
}

.social-login-divider hr {
  flex: 1 1 auto;
  margin: 0;
  color: #d8dee8;
  opacity: 1;
}

.social-login-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.social-login-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.social-login-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

#msg {
  min-height: 1.25rem;
  font-size: 0.9rem;
}

@keyframes auth-loading-animation {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 991.98px) {
  .auth-shell {
    grid-template-columns: minmax(0, 3fr) minmax(450px, 2fr);
  }

  .auth-brand-panel,
  .auth-form-section {
    padding: 1.75rem;
  }

  .auth-illustration {
    max-height: min(38vh, 320px);
  }

  .auth-card {
    padding: 2rem;
  }
}

@media (max-width: 767.98px) {
  .auth-page {
    align-items: center;
    background: #fff;
    overflow: auto;
  }

  .auth-shell {
    height: auto;
    min-height: 100dvh;
    display: block;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-form-section {
    min-height: 100dvh;
    min-width: 0;
    padding: 20px;
    background: #fff;
  }

  .auth-card,
  .auth-card--signup {
    width: 100%;
    max-width: 430px;
    padding: 1.5rem 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-mobile-logo {
    display: block;
  }

  .auth-mobile-logo img {
    max-width: 150px;
    max-height: 50px;
    object-fit: contain;
  }

  .auth-form-title {
    font-size: 1.45rem;
  }

  .auth-form-subtitle {
    margin-bottom: 1.5rem;
  }

  .auth-otp-resend-row {
    max-width: 100%;
    flex-direction: column;
    justify-content: center;
    gap: 0.45rem;
    text-align: center;
  }

  .auth-form #re-send-signin-forget-otp {
    min-width: 0;
    text-align: center;
  }
}

@media (max-width: 399.98px) {
  .auth-form-section {
    padding: 18px;
  }

  .auth-card,
  .auth-card--signup {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .auth-name-grid {
    row-gap: 0.75rem;
  }

  .auth-name-grid > [class*="col-"] {
    width: 100%;
  }

  .auth-otp-boxes {
    grid-template-columns: repeat(6, 38px);
    gap: 6px;
  }

  .auth-otp-box {
    width: 38px;
    height: 44px;
    font-size: 1.1rem;
  }
}
