.authentication-wrapper {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-preferred-size: 100%;
      flex-basis: 100%;
  min-height: 100vh;
  width: 100%;
}

.authentication-wrapper .authentication-inner {
  width: 100%;
}
.authentication-wrapper.authentication-basic {
  -ms-flex-align: center;
      align-items: center;
  -ms-flex-pack: center;
      justify-content: center;
}
.authentication-wrapper.authentication-basic .card-body {
  padding: 2rem;
}
.authentication-wrapper.authentication-cover {
  -ms-flex-align: start;
      align-items: flex-start;
}
.authentication-wrapper.authentication-cover .authentication-inner {
  height: 100%;
  margin: auto 0;
}
.authentication-wrapper.authentication-cover .authentication-inner .auth-cover-bg {
  width: 100%;
  margin: 2rem 0 2rem 2rem;
  height: calc(100vh - 4rem);
  border-radius: 1.125rem;
  position: relative;
}
.authentication-wrapper.authentication-cover .authentication-inner .auth-cover-bg .auth-illustration {
  max-height: 65%;
  z-index: 1;
}
.authentication-wrapper.authentication-cover .authentication-inner .platform-bg {
  position: absolute;
  width: 100%;
  bottom: 0%;
  left: 0%;
  height: 35%;
}
.authentication-wrapper.authentication-cover .authentication-inner .auth-multisteps-bg-height {
  height: 100vh;
}
.authentication-wrapper.authentication-cover .authentication-inner .auth-multisteps-bg-height > img:first-child {
  z-index: 1;
}
.authentication-wrapper.authentication-basic .authentication-inner {
  max-width: 400px;
  position: relative;
}
.authentication-wrapper.authentication-basic .authentication-inner:before {
  width: 238px;
  height: 233px;
  content: " ";
  position: absolute;
  top: -55px;
  left: -40px;
  background-image: url("data:image/svg+xml,%3Csvg width='239' height='234' viewBox='0 0 239 234' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='88.5605' y='0.700195' width='149' height='149' rx='19.5' stroke='%237367F0' stroke-opacity='0.16'/%3E%3Crect x='0.621094' y='33.761' width='200' height='200' rx='10' fill='%237367F0' fill-opacity='0.08'/%3E%3C/svg%3E%0A");
}
@media (max-width: 575.98px) {
  .authentication-wrapper.authentication-basic .authentication-inner:before {
    display: none;
  }
}
.authentication-wrapper.authentication-basic .authentication-inner:after {
  width: 180px;
  height: 180px;
  content: " ";
  position: absolute;
  z-index: -1;
  bottom: -30px;
  right: -56px;
  background-image: url("data:image/svg+xml,%3Csvg width='181' height='181' viewBox='0 0 181 181' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1.30469' y='1.44312' width='178' height='178' rx='19' stroke='%237367F0' stroke-opacity='0.16' stroke-width='2' stroke-dasharray='8 8'/%3E%3Crect x='22.8047' y='22.9431' width='135' height='135' rx='10' fill='%237367F0' fill-opacity='0.08'/%3E%3C/svg%3E");
}
@media (max-width: 575.98px) {
  .authentication-wrapper.authentication-basic .authentication-inner:after {
    display: none;
  }
}
.authentication-wrapper .auth-input-wrapper .auth-input {
  max-width: 50px;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  font-size: 150%;
}
.authentication-wrapper .form-control,
.authentication-wrapper .auth-input {
  border-radius: 0.75rem;
}
.authentication-wrapper .btn {
  border-radius: 0.75rem;
}
.authentication-wrapper .input-group-merge > .form-control:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.authentication-wrapper .input-group-merge > .input-group-text:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

@media (max-height: 636px) {
  .auth-multisteps-bg-height {
    height: 100% !important;
  }
}
@media (max-width: 575.98px) {
  .authentication-wrapper .auth-input-wrapper .auth-input {
    font-size: 1.125rem;
  }
}
#twoStepsForm .fv-plugins-bootstrap5-row-invalid .form-control {
  border-color: #ea5455;
}

.light-style .authentication-wrapper.authentication-bg {
  background-color: #fff;
}
.light-style .auth-cover-bg-color {
  background-color: #f8f7fa;
}

.dark-style .authentication-wrapper.authentication-bg {
  background-color: #2f3349;
}
.dark-style .auth-cover-bg-color {
  background-color: #25293c;
}

.auth-legal-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(13, 59, 76, 0.08);
  text-align: center;
}

.register-page.authentication-wrapper {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body:has(.register-page.authentication-wrapper) {
  overflow: hidden;
  height: 100dvh;
}

@keyframes registerGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes registerBlobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -18px) scale(1.06); }
  66% { transform: translate(-16px, 12px) scale(0.96); }
}

@keyframes registerGridPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.75; }
}

@keyframes registerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.register-page.authentication-wrapper.authentication-bg {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbfc 45%, #eef6f8 100%);
}

.register-page-column-bg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbfc 40%, #eef6f8 100%);
  background-size: 200% 200%;
  animation: registerGradientShift 14s ease infinite;
}

.register-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.register-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  animation: registerBlobDrift 20s ease-in-out infinite;
}

.register-bg-blob-1 {
  width: 340px;
  height: 340px;
  background: rgba(13, 59, 76, 0.14);
  top: -100px;
  right: -80px;
}

.register-bg-blob-2 {
  width: 300px;
  height: 300px;
  background: rgba(40, 199, 111, 0.1);
  bottom: 8%;
  left: -120px;
  animation-delay: -7s;
  animation-duration: 24s;
}

.register-bg-blob-3 {
  width: 220px;
  height: 220px;
  background: rgba(13, 59, 76, 0.1);
  bottom: -60px;
  right: 12%;
  animation-delay: -13s;
  animation-duration: 18s;
}

.register-illustration-column .register-bg-blob-1 {
  top: -90px;
  left: -70px;
  right: auto;
}

.register-illustration-column .register-bg-blob-2 {
  top: 38%;
  right: -90px;
  left: auto;
  bottom: auto;
  animation-delay: -5s;
}

.register-illustration-column .register-bg-blob-3 {
  bottom: -40px;
  left: 18%;
  right: auto;
  animation-delay: -11s;
}

.register-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(13, 59, 76, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 59, 76, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, black 20%, transparent 72%);
  animation: registerGridPulse 9s ease-in-out infinite;
}

.register-page .register-illustration-column {
  height: 100%;
  min-height: 0;
}

.register-page .register-illustration-column .auth-cover-bg {
  position: relative;
  z-index: 1;
}

.register-page .auth-cover-bg-color {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(13, 59, 76, 0.08);
}

.register-page .auth-illustration {
  animation: registerFloat 5s ease-in-out infinite;
  position: relative;
  z-index: 2;
  max-width: 82% !important;
  max-height: 62% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.register-page .platform-bg {
  animation: registerGridPulse 10s ease-in-out infinite;
}

.register-content-wrap {
  position: relative;
  z-index: 1;
}

.register-page .authentication-inner {
  flex: 1;
  height: auto;
  min-height: 0;
  margin: 0 !important;
}

.register-page .authentication-inner.row {
  flex: 1;
  min-height: 0;
  height: 100%;
  margin-left: 0;
  margin-right: 0;
}

.register-page .authentication-inner .auth-cover-bg {
  margin: 1rem 0 1rem 1rem;
  height: calc(100% - 2rem);
  max-height: calc(100dvh - 2rem);
}

.auth-register-shell {
  align-items: stretch !important;
  height: 100%;
  max-height: 100dvh;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.auth-register-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
  flex: 1;
}

.auth-register-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.auth-register-shell .auth-legal-footer {
  margin-top: 0;
  flex-shrink: 0;
  padding-top: 1rem;
  padding-bottom: 0.25rem;
}

@media (max-width: 991.98px) {
  .register-page.authentication-wrapper {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    min-height: 100svh;
    overflow: visible;
  }

  body:has(.register-page.authentication-wrapper) {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
  }

  .auth-register-shell {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    min-height: 100svh;
    overflow: visible;
  }

  .auth-register-layout {
    height: auto;
    min-height: auto;
  }

  .auth-register-body {
    overflow: visible;
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .auth-legal-footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .auth-legal-footer__copy {
    white-space: normal;
    text-align: center;
  }
}

.auth-legal-footer__text {
  font-size: 0.8125rem;
  color: #a1acb8;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.auth-legal-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.auth-legal-footer__links {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0;
}

.auth-legal-footer__links a {
  color: #566a7f;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.auth-legal-footer__links a:hover {
  color: #0d3b4c;
}

.auth-legal-footer__separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c5cdd3;
  flex-shrink: 0;
}

.auth-legal-footer__copy {
  font-size: 0.8125rem;
  color: #b4bac2;
  margin-bottom: 0;
  white-space: nowrap;
}

/* Shared animated auth backgrounds (login, OTP, register) */
.auth-animated-page.authentication-wrapper.authentication-bg {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbfc 45%, #eef6f8 100%);
}

.auth-animated-page .register-illustration-column {
  height: 100%;
  min-height: 0;
}

.auth-animated-page .register-illustration-column .auth-cover-bg {
  position: relative;
  z-index: 1;
}

.auth-animated-page .auth-cover-bg-color {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(13, 59, 76, 0.08);
}

.auth-animated-page .auth-illustration {
  animation: registerFloat 5s ease-in-out infinite;
  position: relative;
  z-index: 2;
  max-width: 82% !important;
  max-height: 62% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.auth-animated-page .platform-bg {
  animation: registerGridPulse 10s ease-in-out infinite;
}

.auth-animated-page .authentication-inner .auth-cover-bg {
  margin: 1rem 0 1rem 1rem;
  height: calc(100% - 2rem);
  min-height: 320px;
}

@keyframes authFadeDown {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-page-enter .auth-enter-logo {
  animation: authFadeDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-page-enter .auth-enter-heading {
  animation: authFadeDown 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.auth-page-enter .auth-enter-form {
  animation: authFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}

.auth-page-enter .auth-enter-footer {
  animation: authFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

/* Auth cover pages: login, OTP, forgot, reset */
.auth-page-logo img,
.auth-enter-logo img {
  max-width: 250px;
  max-height: 80px;
  width: auto;
  height: auto;
  margin: 24px 0 32px;
}

.auth-animated-page .register-content-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-animated-page .auth-enter-heading {
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  line-height: 1.35;
}

.auth-animated-page p.auth-enter-heading,
.auth-animated-page .auth-enter-heading + p {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  line-height: 1.55;
}

@media (max-width: 991.98px) {
  .auth-animated-page.authentication-wrapper.authentication-cover {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    min-height: 100svh;
    overflow: visible;
  }

  body:has(.auth-animated-page.authentication-wrapper.authentication-cover) {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
  }

  .auth-animated-page .authentication-inner {
    min-height: 100dvh;
    min-height: 100svh;
    align-items: stretch;
  }

  .auth-animated-page .register-page-column-bg:not(.auth-register-shell) {
    min-height: 100dvh;
    min-height: 100svh;
    flex: 1 1 auto;
    flex-direction: column !important;
    padding-top: max(1rem, env(safe-area-inset-top)) !important;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom)) !important;
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .auth-animated-page .register-page-column-bg:not(.auth-register-shell) .register-content-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
  }

  .auth-animated-page .register-page-column-bg.auth-register-shell {
    min-height: 100dvh;
    min-height: 100svh;
    padding-top: max(1rem, env(safe-area-inset-top)) !important;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom)) !important;
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  .auth-animated-page .register-content-wrap {
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .auth-page-logo img,
  .auth-enter-logo img {
    max-width: 200px;
    margin: 12px 0 20px;
  }

  .auth-animated-page .auth-input-wrapper {
    gap: 0.25rem !important;
    justify-content: space-between !important;
  }

  .auth-animated-page .auth-input-wrapper .auth-input {
    max-width: 44px;
    min-width: 0;
    flex: 1 1 0;
    margin-left: 0.15rem !important;
    margin-right: 0.15rem !important;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    font-size: 1.25rem;
    height: 46px !important;
  }
}

@media (max-width: 575.98px) {
  .auth-page-logo img,
  .auth-enter-logo img {
    max-width: 168px;
    margin: 8px 0 16px;
  }

  .auth-animated-page .register-content-wrap,
  .auth-animated-page .w-px-400 {
    width: 100% !important;
    max-width: 100% !important;
  }

  .auth-animated-page .form-control,
  .auth-animated-page .auth-input {
    font-size: 16px;
  }

  .auth-animated-page .btn {
    min-height: 44px;
  }

  .auth-animated-page .auth-input-wrapper .auth-input {
    max-width: 42px;
    height: 44px !important;
    font-size: 1.15rem;
  }

  .auth-animated-page .auth-enter-footer .btn {
    width: 100%;
  }
}

@media (max-width: 359.98px) {
  .auth-page-logo img,
  .auth-enter-logo img {
    max-width: 148px;
  }

  .auth-animated-page .auth-input-wrapper .auth-input {
    max-width: 36px;
    font-size: 1rem;
    margin-left: 0.08rem !important;
    margin-right: 0.08rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page-enter .auth-enter-logo,
  .auth-page-enter .auth-enter-heading,
  .auth-page-enter .auth-enter-form,
  .auth-page-enter .auth-enter-footer,
  .auth-animated-page .register-page-column-bg,
  .auth-animated-page .register-bg-blob,
  .auth-animated-page .register-bg-grid,
  .auth-animated-page .auth-illustration,
  .auth-animated-page .platform-bg {
    animation: none !important;
  }
}

/* Remove template square decorations across auth pages */
.authentication-wrapper .platform-bg,
.authentication-wrapper .auth-illustration,
.authentication-wrapper .register-bg-grid,
.authentication-wrapper.authentication-basic .authentication-inner:before,
.authentication-wrapper.authentication-basic .authentication-inner:after {
  display: none !important;
}
