:root {
  --bs-primary: #7a7d6a;
  --bs-primary-rgb: 122, 125, 106;
  --bs-link-color: #7a7d6a;
  --bs-link-hover-color: #7a7d6a;
  --bs-focus-ring-color: rgba(122, 125, 106, 0.3);
  --bs-primary-bg-subtle: rgba(28, 36, 48, 0.08);
  --bs-primary-border-subtle: rgba(28, 36, 48, 0.2);
  --login-right-bg: #ffffff;
  --login-accent: #7a7d6a;
  --login-primary-bg: #1c2430;
  --login-primary-bg-soft: rgba(28, 36, 48, 0.82);
  --divider-bottom-image: url("/assets/app/images/bottom.svg");
  --divider-bottom-size: contain;
  --divider-bottom-height: 100px;
  --divider-bottom-offset-x: 0px;
  --divider-bottom-color: #ffffff;
  --divider-bottom-opacity: 1;
  --divider-bottom-flip: scale(1, 1);
  --divider-bottom-filter: none;
  --login-left-bottom-svg: url("/assets/app/images/bottom.svg");
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(122, 125, 106, 0.16), rgba(28, 36, 48, 0.08) 58%, rgba(28, 36, 48, 0.14) 100%);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#main-wrapper > .row {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

#main-wrapper > .row::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/app/images/login-bg.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  z-index: 0;
  pointer-events: none;
}

.login-left {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: #1c2430;
  border-right: 0;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.login-left::before {
  content: "";
  position: absolute;
  left: var(--divider-bottom-offset-x, 0px);
  bottom: 0;
  width: 100%;
  height: var(--divider-bottom-height, clamp(140px, 26vh, 260px));
  background-image: var(--divider-bottom-image, var(--login-left-bottom-svg, none));
  background-repeat: repeat-x;
  background-position: left bottom;
  background-size: var(--divider-bottom-size, contain);
  border-color: var(--divider-bottom-color, currentColor);
  filter: var(--divider-bottom-filter, none);
  transform: var(--divider-bottom-flip, none);
  opacity: var(--divider-bottom-opacity, 1);
  pointer-events: none;
  z-index: 1;
}

.login-left::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #1c2430;
  opacity: 0.52;
  z-index: 0;
  pointer-events: none;
}

.login-left > * {
  position: relative;
  z-index: 2;
}

.login-slides {
  position: absolute !important;
  inset: 0;
  z-index: -1 !important;
  pointer-events: none;
  overflow: hidden;
}

.login-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: loginSlideShow 28s linear infinite;
}

.login-slide:nth-child(1) { animation-delay: 0s; }
.login-slide:nth-child(2) { animation-delay: 4s; }
.login-slide:nth-child(3) { animation-delay: 8s; }
.login-slide:nth-child(4) { animation-delay: 12s; }
.login-slide:nth-child(5) { animation-delay: 16s; }
.login-slide:nth-child(6) { animation-delay: 20s; }
.login-slide:nth-child(7) { animation-delay: 24s; }

@keyframes loginSlideShow {
  0% { opacity: 0; }
  3.57%, 10.71% { opacity: 1; }
  14.28%, 100% { opacity: 0; }
}

.login-left-brand {
  background: transparent;
  border-bottom: 0;
}

.login-mobile-brand-wrap {
  background: rgba(28, 36, 48, 0.12);
  border-bottom: 1px solid rgba(28, 36, 48, 0.2);
}

.login-mobile-brand {
  min-height: 3.25rem;
}

.login-right {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  background: transparent;
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 1;
  border-left: 0;
  box-shadow: none;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.login-right::before {
  display: none;
}

.login-right > * {
  position: relative;
  z-index: 1;
}

#loginForm {
  width: 100%;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.auth-card {
  max-width: none;
  width: 100%;
  padding: 2.2rem 2.65rem 2.35rem;
  border: 1px solid rgba(20, 40, 64, 0.1);
  border-radius: 1.25rem;
  background: transparent;
  box-shadow: 0 18px 42px rgba(8, 28, 52, 0.18), 0 3px 10px rgba(8, 28, 52, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.liberty-logo {
  width: 7.4rem;
  height: 2.35rem;
  display: block;
  flex: 0 0 auto;
  background-color: #fff;
  -webkit-mask: url(/assets/app/images/logo.svg) no-repeat center/contain;
  mask: url(/assets/app/images/logo.svg) no-repeat center/contain;
  transform: scale(1.15);
  transform-origin: center;
}

.login-right-top-logo {
  position: absolute;
  top: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.login-right-top-logo .liberty-logo {
  width: 12rem;
  height: 3.8rem;
  transform: none;
  background-color: var(--bs-primary);
}

.login-illustration {
  max-width: 640px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-left-brand-image {
  max-width: 17.25rem;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.28));
}

.login-illustration-taglines {
  display: inline-flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1.1rem !important;
}

.login-tagline {
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 8px 22px rgba(0, 0, 0, 0.65), 0 0 26px rgba(0, 0, 0, 0.45) !important;
}

.login-tagline-white {
  color: #ffffff !important;
}

.login-tagline-primary {
  color: var(--bs-primary) !important;
}

.login-left .text-secondary {
  color: rgba(241, 244, 249, 0.78) !important;
}

.illustration-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(122, 125, 106, 0.2), rgba(28, 36, 48, 0.25));
  color: var(--login-accent);
  font-size: 2.25rem;
}

.login-right h2 {
  letter-spacing: -0.02em;
}

.login-right .form-control {
  min-height: 2.45rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  font-size: 0.95rem;
}

.login-right .btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #7a7d6a;
  --bs-btn-border-color: #7a7d6a;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #6c705d;
  --bs-btn-hover-border-color: #6c705d;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #666a58;
  --bs-btn-active-border-color: #666a58;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #7a7d6a;
  --bs-btn-disabled-border-color: #7a7d6a;
  --bs-btn-focus-shadow-rgb: 122, 125, 106;
  color: #fff;
}

.login-right .form-check-input:checked {
  background-color: #7a7d6a;
  border-color: #7a7d6a;
}

.login-right .form-check-input:focus {
  border-color: #7a7d6a;
  box-shadow: 0 0 0 0.25rem rgba(122, 125, 106, 0.25);
}

.alert ul {
  margin: 0;
}

.login-version {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(28, 36, 48, 0.58);
}

.login-right-footer {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 34rem;
}

.login-copyright {
  font-size: 0.78rem;
  color: rgba(28, 36, 48, 0.64);
  margin-bottom: 0.15rem;
}

#loginFormError {
  display: block;
}

@media (max-width: 767.98px) {
  html,
  body {
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
  }

  #main-wrapper,
  #main-wrapper > .row,
  #main-wrapper .min-vh-100 {
    min-height: 100svh !important;
    min-height: 100dvh !important;
    height: 100dvh;
  }

  #main-wrapper {
    height: 100dvh;
    overflow: hidden;
  }

  #main-wrapper > .row {
    overflow: hidden;
  }

  .login-left {
    clip-path: none;
  }

  .login-left::before {
    display: none;
  }

  .login-right {
    position: relative;
    border-left: 0;
    box-shadow: none;
    min-height: 100%;
    height: 100%;
    display: block;
    justify-content: initial !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
  }

  .login-right::before {
    display: none;
  }

  .login-right-top-logo {
    position: absolute;
    top: max(0.5rem, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 3;
  }

  .login-right-top-logo .liberty-logo {
    width: 13.2rem;
    height: 4.05rem;
  }

  #loginForm {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(max(0.5rem, env(safe-area-inset-top)) + 4.9rem);
    bottom: calc(max(0.5rem, env(safe-area-inset-bottom)) + 2.8rem);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    padding: 0 0.75rem;
    min-height: 0;
    overflow: hidden;
  }

  .auth-card {
    width: 100%;
    max-width: 100%;
    padding: 1.15rem 1rem 1rem;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .login-right-footer {
    position: absolute;
    left: 50%;
    bottom: calc(max(0px, env(safe-area-inset-bottom)) + 0.65rem);
    transform: translateX(-50%);
    width: calc(100% - 1.5rem);
    max-width: 34rem;
    margin: 0;
    padding-bottom: 0;
    z-index: 3;
  }

  .login-copyright,
  .login-version {
    font-size: 0.7rem;
  }
}

@media (max-width: 767.98px) and (max-height: 780px) {
  #loginForm {
    top: calc(max(0.25rem, env(safe-area-inset-top)) + 4.4rem);
    bottom: calc(max(0.35rem, env(safe-area-inset-bottom)) + 2.2rem);
    padding: 0 0.6rem;
  }

  .auth-card {
    padding: 0.85rem 0.85rem 0.8rem;
  }

  .auth-card h2 {
    margin-bottom: 0.75rem !important;
    font-size: 1.35rem;
  }

  .auth-card .form-label {
    margin-bottom: 0.2rem !important;
  }

  .auth-card .mb-3 {
    margin-bottom: 0.45rem !important;
  }

  .auth-card .mb-4 {
    margin-bottom: 0.45rem !important;
  }
}
