html:has(body.pagelayout-login) {
  height: 100%;
  overflow: hidden;
}

body.pagelayout-login {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#page,
.ccnHeader1,
.inner_page_breadcrumb {
  display: none !important;
}

.emi-login-page {
  display: flex;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  font-family: 'Inter', 'Segoe UI', Roboto, 'Open Sans', sans-serif;
  background: #ffffff;
  position: relative;
}

.emi-login-lang-switch {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1100;
}

.emi-login-lang-switch__panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  width: max-content;
  min-width: 0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
}

.emi-login-lang-switch__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-height: 36px;
  padding: 6px 10px;
  background: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
  line-height: 1.2;
  text-align: left;
}

.emi-login-lang-switch.is-open .emi-login-lang-switch__toggle {
  border-bottom: 1px solid #e5e7eb;
}

.emi-login-lang-switch__toggle--static {
  cursor: default;
}

.emi-login-lang-switch__toggle:hover,
.emi-login-lang-switch__toggle:focus {
  outline: none;
  background: #fafafa;
}

.emi-login-lang-switch__flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.emi-login-lang-switch__label {
  white-space: nowrap;
}

.emi-login-lang-switch__chevron {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #111827;
  border-bottom: 1.5px solid #111827;
  transform: rotate(45deg);
  margin-top: -2px;
  margin-left: 2px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.emi-login-lang-switch.is-open .emi-login-lang-switch__chevron {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.emi-login-lang-switch__menu {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.emi-login-lang-switch__menu[hidden] {
  display: none !important;
}

.emi-login-lang-switch__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
  background: #ffffff;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.emi-login-lang-switch__item:hover,
.emi-login-lang-switch__item:focus {
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
}

.emi-login-lang-switch__item.is-active,
.emi-login-lang-switch__item.is-active:hover,
.emi-login-lang-switch__item.is-active:focus {
  background: #ff3200;
  color: #ffffff;
}

.emi-login-left {
  flex: 1 1 50%;
  max-width: 50%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.emi-login-illustration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.emi-login-right {
  flex: 1 1 50%;
  max-width: 50%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 48px 64px;
  overflow-y: auto;
  box-sizing: border-box;
}

.emi-login-form-wrapper {
  width: 100%;
  max-width: 420px;
}

.emi-login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.emi-login-logo img {
  max-width: 280px;
  width: 100%;
  height: auto;
}

.emi-login-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin: 0 0 12px;
  line-height: 1.3;
}

.emi-login-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #8c8c8c;
  text-align: center;
  margin: 0 0 28px;
  line-height: 1.5;
}

.loginerrors {
  margin: 0 0 16px;
}

.loginerrors .alert {
  margin-bottom: 0;
  border-radius: 8px;
  font-size: 14px;
}

.emi-login-form-wrapper .heading {
  display: none;
}

.emi-login-form-wrapper #login .form-group {
  margin-bottom: 20px;
}

.emi-login-form-wrapper #login label.emi-field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.emi-login-form-wrapper #login .form-control {
  width: 100%;
  height: 48px;
  padding: 12px 16px;
  font-size: 14px;
  color: #1a1a1a;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: none;
  transition: border-color 0.2s ease;
}

.emi-login-form-wrapper #login .form-control[readonly] {
  background-color: #ffffff !important;
  cursor: text;
}

.emi-login-form-wrapper #login .form-control:focus {
  border-color: #ff4500;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.12);
}

.emi-login-form-wrapper #login .form-control::placeholder {
  color: #b0b0b0;
  opacity: 1;
}

.emi-password-wrapper {
  position: relative;
}

.emi-password-wrapper .form-control {
  padding-right: 48px;
}

.emi-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #8c8c8c;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emi-password-toggle:hover {
  color: #555555;
}

.emi-password-toggle svg {
  width: 20px;
  height: 20px;
}

.emi-password-toggle.is-visible .emi-icon-eye {
  display: none;
}

.emi-password-toggle.is-visible .emi-icon-eye-off {
  display: block;
}

.emi-password-toggle .emi-icon-eye-off {
  display: none;
}

.emi-login-inline-error {
  margin-top: 8px;
}

.emi-login-inline-error .alert {
  margin-bottom: 0;
  border-radius: 8px;
  font-size: 13px;
  padding: 10px 12px;
}

.emi-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}

.emi-login-options .custom-control,
#login .custom-control,
body.pagelayout-login .custom-control {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  min-height: auto !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

.emi-login-options .custom-control-input,
#login .custom-control-input,
body.pagelayout-login .custom-control-input {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
}

.emi-login-options .custom-control-label,
#login .custom-control-label,
body.pagelayout-login .custom-control-label {
  position: relative !important;
  font-size: 14px !important;
  color: #1a1a1a !important;
  font-weight: 400 !important;
  padding-left: 28px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  user-select: none !important;
  min-height: 20px !important;
}

/* Beautiful custom checkbox box */
.emi-login-options .custom-control .custom-control-label::before,
.emi-login-options .custom-control-label::before,
#login .custom-control .custom-control-label::before,
#login .custom-control-label::before,
body.pagelayout-login .custom-control .custom-control-label::before,
body.pagelayout-login .custom-control-label::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  height: 18px !important;
  border: 2px solid #d1d5db !important; /* gray-300 */
  border-radius: 4px !important;
  background-color: #ffffff !important;
  background-image: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: block !important;
}

/* Custom checkmark symbol */
.emi-login-options .custom-control .custom-control-label::after,
.emi-login-options .custom-control-label::after,
#login .custom-control .custom-control-label::after,
#login .custom-control-label::after,
body.pagelayout-login .custom-control .custom-control-label::after,
body.pagelayout-login .custom-control-label::after {
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) rotate(45deg) !important;
  width: 6px !important;
  height: 10px !important;
  border: solid #ffffff !important;
  border-width: 0 2px 2px 0 !important;
  background: none !important;
  opacity: 0 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: block !important;
}

/* Checked state styling */
.emi-login-options .custom-control-input:checked ~ .custom-control-label::before,
#login .custom-control-input:checked ~ .custom-control-label::before,
body.pagelayout-login .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #ff4500 !important; /* Custom orange theme color */
  border-color: #ff4500 !important;
  background-image: none !important;
}

.emi-login-options .custom-control-input:checked ~ .custom-control-label::after,
#login .custom-control-input:checked ~ .custom-control-label::after,
body.pagelayout-login .custom-control-input:checked ~ .custom-control-label::after {
  opacity: 1 !important;
}

/* Hover & Focus styling */
.emi-login-options .custom-control-label:hover::before,
#login .custom-control-label:hover::before,
body.pagelayout-login .custom-control-label:hover::before {
  border-color: #ff4500 !important;
}

.emi-login-options .custom-control-input:focus ~ .custom-control-label::before,
#login .custom-control-input:focus ~ .custom-control-label::before,
body.pagelayout-login .custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.15) !important;
  border-color: #ff4500 !important;
}

.emi-login-options .btn-fpswd {
  font-size: 14px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 400;
  float: none;
  margin-left: auto;
}

.emi-login-options .btn-fpswd:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.emi-login-form-wrapper .btn-log {
  width: 100%;
  height: 48px;
  max-width: none;
  margin: 0;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: #ff4500;
  border: none;
  border-radius: 8px;
  transform: none;
  transition: background-color 0.2s ease;
}

.emi-login-form-wrapper .btn-log:hover,
.emi-login-form-wrapper .btn-log:focus {
  background: #e63e00;
  color: #ffffff;
}

.emi-login-form-wrapper .mt-2,
.emi-login-form-wrapper .potentialidplist,
.emi-login-form-wrapper .divide,
.emi-login-form-wrapper .ccn_first-time {
  margin-top: 16px;
}

@media (max-width: 991px) {
  html:has(body.pagelayout-login),
  body.pagelayout-login {
    overflow: hidden;
  }

  .emi-login-page {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
  }

  .emi-login-left,
  .emi-login-right {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .emi-login-left {
    flex: 0 0 240px;
    height: 240px;
    max-height: 240px;
  }

  .emi-login-right {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    padding: 32px 24px;
    overflow-y: auto;
  }

  .emi-login-form-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .emi-login-lang-switch {
    top: 16px;
    right: 16px;
  }

  .emi-login-lang-switch__toggle {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .emi-login-title {
    font-size: 24px;
  }

  .emi-login-right {
    padding: 24px 20px 40px;
  }

  .emi-login-logo img {
    max-width: 220px;
  }
}
