/*
 * Listclean before-login auth UI system.
 * Scoped to .web-auth-shell so dashboard screens are not affected.
 */

:root {
  --auth-brand-primary: #f1416c;
  --auth-brand-primary-hover: #d9214e;
  --auth-brand-accent: #f1416c;
  --auth-brand-accent-hover: #d9214e;
  --auth-brand-accent-text: #ffffff;
  --auth-page-bg-start: #fff7fa;
  --auth-page-bg-end: #f7f9fc;
  --auth-card-bg: rgba(255, 255, 255, 0.96);
  --auth-surface: #ffffff;
  --auth-input-bg: #fbfcfe;
  --auth-text: #181c32;
  --auth-muted-text: #646b7a;
  --auth-footer-text: #7b8492;
  --auth-label: #353b4a;
  --auth-secondary-text: #242a33;
  --auth-border: #eaedf3;
  --auth-soft-border: rgba(24, 28, 50, 0.08);
  --auth-input-border: #dfe4ec;
  --auth-button-border: #dfe4ec;
  --auth-button-border-hover: #c5ceda;
  --auth-secondary-hover-bg: #fff5f8;
  --auth-focus-ring: rgba(241, 65, 108, 0.18);
  --auth-brand-tint: rgba(241, 65, 108, 0.08);
  --auth-accent-glow: rgba(241, 65, 108, 0.16);
  --auth-accent-shadow: rgba(241, 65, 108, 0.28);
  --auth-accent-shadow-hover: rgba(217, 33, 78, 0.34);
  --auth-shadow-soft: rgba(24, 28, 50, 0.08);
  --auth-shadow-card: rgba(24, 28, 50, 0.13);
  --auth-shadow-card-mobile: rgba(24, 28, 50, 0.11);
  --auth-shadow-small: rgba(24, 28, 50, 0.06);
  --auth-radius-card: 8px;
  --auth-radius-control: 6px;
  --auth-footer-height: 62px;
  --auth-transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

.web-auth-shell.wrapper.custom-bg-light {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: visible;
  background:
    radial-gradient(circle at 82% 18%, var(--auth-accent-glow), transparent 32%),
    linear-gradient(135deg, var(--auth-page-bg-start) 0%, var(--auth-page-bg-end) 100%) !important;
}

.web-auth-shell #web {
  position: relative;
  z-index: 1;
  flex: 1 1 48%;
  width: 48%;
  height: 100%;
  background: transparent;
  overflow: visible;
}

.web-auth-shell #web.custom-body-top {
  padding-top: 0;
}

.web-auth-shell #web.container-fluid {
  padding-left: 0;
  padding-right: 0;
}

.auth-page {
  box-sizing: border-box;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: clamp(20px, 4vh, 42px) clamp(24px, 4vw, 48px) calc(var(--auth-footer-height) + clamp(16px, 3vh, 32px));
}

.auth-card-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.web-auth-shell #websiteSidebar.website-sidebar {
  position: relative;
  z-index: 0;
  flex: 0 0 52%;
  width: 52%;
  height: 100%;
  min-height: 0;
  float: none;
  padding: 0 !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: none;
  overflow: hidden;
}

.web-auth-shell #websiteSidebar.website-sidebar:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(24, 28, 50, 0.08), rgba(24, 28, 50, 0.01)),
    linear-gradient(0deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
  pointer-events: none;
}

.web-auth-shell .auth-image-logo {
  position: absolute;
  top: 34px;
  left: 34px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
}

.web-auth-shell .auth-image-logo img {
  display: block;
  width: 150px;
  max-width: 36vw;
  height: auto;
}

.auth-card {
  width: 100%;
  max-width: 470px;
  max-height: none;
  overflow: visible;
  padding: clamp(24px, 4vh, 36px);
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-soft-border);
  border-radius: var(--auth-radius-card);
  box-shadow: 0 24px 70px var(--auth-shadow-card), 0 1px 2px var(--auth-shadow-small);
}

.auth-card-large {
  max-width: 500px;
}

.auth-heading {
  margin-bottom: clamp(16px, 3vh, 24px);
}

.website_page.auth-page h1 {
  margin-bottom: 8px;
  color: var(--auth-text);
  font-size: clamp(30px, 4.5vh, 38px);
  line-height: 1.16;
  letter-spacing: 0;
}

.auth-heading p,
.auth-helper-row {
  margin-bottom: 0;
  color: var(--auth-muted-text);
  font-size: 15px;
  line-height: 23px;
}

.auth-helper-row p {
  margin-bottom: 0;
}

.auth-inline-helper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  margin-bottom: 14px;
  text-align: center;
}

.auth-card a {
  color: var(--auth-brand-primary);
  font-weight: 600;
}

.auth-card a:hover {
  color: var(--auth-brand-primary-hover);
  text-decoration: none;
}

.auth-action-row {
  margin-bottom: 10px;
}

.auth-secondary-action,
.btn-oauth.auth-oauth-button {
  width: 100%;
  min-height: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: var(--auth-radius-control);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  transition: var(--auth-transition);
}

.auth-secondary-action.btn-secondary {
  color: var(--auth-secondary-text) !important;
  background: var(--auth-surface);
  border: 1px solid var(--auth-button-border);
}

.auth-secondary-action.btn-secondary:hover,
.btn-oauth.auth-oauth-button:hover {
  color: var(--auth-text) !important;
  background: var(--auth-secondary-hover-bg) !important;
  border-color: var(--auth-button-border-hover);
  box-shadow: 0 8px 20px var(--auth-shadow-soft);
}

.btn-oauth.auth-oauth-button {
  color: var(--auth-secondary-text);
  background: var(--auth-surface) !important;
  border: 1px solid var(--auth-button-border);
  cursor: pointer;
}

.web-auth-shell .auth-card .auth-submit-button,
.web-auth-shell .auth-card .auth-submit-button.btn,
.web-auth-shell .auth-card .auth-submit-button.btn-primary,
.web-auth-shell .auth-card .auth-submit-button.btn-default,
.web-auth-shell .auth-card .auth-submit-button.bg-dark,
.web-auth-shell .auth-card .auth-submit-button.text-light {
  width: 100% !important;
  min-height: 48px !important;
  height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 18px !important;
  color: var(--auth-brand-accent-text) !important;
  background: var(--auth-brand-accent) !important;
  background-color: var(--auth-brand-accent) !important;
  border: 1px solid var(--auth-brand-accent) !important;
  border-radius: var(--auth-radius-control) !important;
  box-shadow: 0 12px 28px var(--auth-accent-shadow) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  cursor: pointer;
  transition: var(--auth-transition) !important;
}

.web-auth-shell .auth-card .auth-submit-button:hover,
.web-auth-shell .auth-card .auth-submit-button:focus,
.web-auth-shell .auth-card .auth-submit-button:active,
.web-auth-shell .auth-card .auth-submit-button.btn:hover,
.web-auth-shell .auth-card .auth-submit-button.btn:focus,
.web-auth-shell .auth-card .auth-submit-button.btn:active,
.web-auth-shell .auth-card .auth-submit-button.btn-primary:hover,
.web-auth-shell .auth-card .auth-submit-button.btn-primary:focus,
.web-auth-shell .auth-card .auth-submit-button.btn-primary:active,
.web-auth-shell .auth-card .auth-submit-button.btn-primary:not(:disabled):not(.disabled):active,
.web-auth-shell .auth-card .auth-submit-button.btn-default:hover,
.web-auth-shell .auth-card .auth-submit-button.btn-default:focus,
.web-auth-shell .auth-card .auth-submit-button.btn-default:active,
.web-auth-shell .auth-card .auth-submit-button.bg-dark:hover,
.web-auth-shell .auth-card .auth-submit-button.bg-dark:focus,
.web-auth-shell .auth-card .auth-submit-button.bg-dark:active {
  color: var(--auth-brand-accent-text) !important;
  background: var(--auth-brand-accent-hover) !important;
  background-color: var(--auth-brand-accent-hover) !important;
  border-color: var(--auth-brand-accent-hover) !important;
  box-shadow: 0 14px 34px var(--auth-accent-shadow-hover) !important;
  outline: 0 !important;
  text-decoration: none !important;
}

.auth-form-group {
  margin-bottom: clamp(12px, 2.2vh, 18px);
}

.auth-card label {
  margin-bottom: 8px;
  color: var(--auth-label);
  font-size: 14px;
  font-weight: 700;
}

.auth-card .form-control {
  height: 48px;
  padding: 10px 15px;
  color: var(--auth-text);
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-input-border);
  border-radius: var(--auth-radius-control);
  font-size: 16px;
  box-shadow: none;
}

.auth-card .form-control:focus {
  background: var(--auth-surface);
  border-color: var(--auth-brand-primary);
  box-shadow: 0 0 0 3px var(--auth-focus-ring);
}

.auth-password-group {
  position: relative;
}

.auth-password-group .form-control {
  padding-right: 84px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  z-index: 4;
  transform: translateY(-50%);
}

.auth-password-toggle a {
  color: var(--auth-brand-primary) !important;
  font-size: 14px;
  line-height: 1;
}

.auth-password-toggle a:hover,
.auth-password-toggle a:focus {
  color: var(--auth-brand-primary-hover) !important;
  text-decoration: none;
}

.auth-password-toggle .show-link,
.auth-password-toggle .hide-link {
  background-image: none !important;
  float: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0;
}

.auth-password-toggle .show-link:before,
.auth-password-toggle .hide-link:before {
  display: inline-block;
  color: var(--auth-brand-primary);
  font-family: "Font Awesome 5 Free";
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.auth-password-toggle .show-link:before {
  content: "\f06e";
}

.auth-password-toggle .hide-link:before {
  content: "\f070";
}

.auth-helper-row {
  margin-top: -4px;
  margin-bottom: clamp(14px, 2.5vh, 22px);
}

.auth-submit-row {
  margin-bottom: 0;
}

.auth-submit-row + .auth-helper-row {
  margin-top: 16px;
}

.auth-divider {
  margin: clamp(12px, 2.5vh, 20px) 0;
  border: 0;
  border-top: 1px solid var(--auth-border);
}

.auth-captcha-wrap {
  display: flex;
  justify-content: center;
  margin: clamp(12px, 2.5vh, 18px) 0 clamp(14px, 2.5vh, 20px);
  max-width: 100%;
  overflow: hidden;
}

.auth-card .alert {
  margin-bottom: 14px;
  border-radius: var(--auth-radius-control);
  font-size: 14px;
}

#loader,
#errorBox,
#infoBox,
#successBox {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  z-index: 2147483000 !important;
  width: min(560px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  transform: translateX(-50%) !important;
  opacity: 0.98 !important;
  box-sizing: border-box;
}

#loader {
  top: 20px !important;
  min-height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 18px !important;
  color: var(--auth-text);
  background: var(--auth-surface) !important;
  background-image: none !important;
  border: 1px solid var(--auth-soft-border) !important;
  border-radius: var(--auth-radius-control);
  box-shadow: 0 18px 48px rgba(24, 28, 50, 0.18);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

#loader[style*="display: block"] {
  display: flex !important;
}

#errorBox,
#infoBox,
#successBox {
  top: 20px !important;
  margin: 0 !important;
  padding: 12px 46px 12px 16px;
  border-radius: var(--auth-radius-control);
  box-shadow: 0 18px 48px rgba(24, 28, 50, 0.18);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

#errorBox .close,
#infoBox .close,
#successBox .close {
  position: absolute;
  top: 8px;
  right: 12px;
  padding: 0;
}

.auth-status-box {
  margin-bottom: 18px;
}

.auth-language-menu {
  position: absolute;
  top: 0;
  right: 10px;
  z-index: 20;
}

.auth-language-menu:empty {
  display: none;
}

.auth-language-menu #languageMenuButton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 0;
  color: var(--auth-brand-primary);
  background: transparent !important;
  border: 0;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.auth-language-menu .dropdown-menu {
  right: 0;
  left: auto;
  margin-top: 8px;
  border: 1px solid var(--auth-soft-border);
  border-radius: var(--auth-radius-card);
  box-shadow: 0 18px 48px rgba(24, 28, 50, 0.14);
}

.auth-language-menu .dropdown-item {
  color: var(--auth-brand-primary);
  font-weight: 600;
}

.auth-language-menu .dropdown-item:hover,
.auth-language-menu .dropdown-item:focus {
  color: var(--auth-brand-primary-hover);
  background: var(--auth-brand-tint);
}

.web-auth-footer.footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  margin-bottom: 0 !important;
  background: var(--auth-surface);
  border-top: 1px solid var(--auth-border);
}

.web-auth-footer.footer hr {
  display: none;
}

.web-auth-footer.footer .container {
  max-width: 1120px;
  padding-top: 10px;
  padding-bottom: 8px;
}

.web-auth-footer.footer .nav {
  justify-content: center;
  gap: 4px 14px;
}

.web-auth-footer.footer .nav-link {
  padding: 4px 0;
  color: var(--auth-brand-primary);
  font-weight: 600;
}

.web-auth-footer.footer .nav-link:hover {
  color: var(--auth-brand-primary-hover);
}

.web-auth-footer.footer p {
  margin: 4px 0 0;
  color: var(--auth-footer-text);
}

@media (max-width: 1199.98px) {
  .web-auth-shell #websiteSidebar.website-sidebar {
    flex-basis: 48%;
    width: 48%;
  }

  .web-auth-shell #web {
    flex-basis: 52%;
    width: 52%;
  }

  .auth-page {
    padding: 38px 30px calc(var(--auth-footer-height) + 24px);
  }
}

@media (min-width: 992px) and (max-height: 820px) {
  :root {
    --auth-footer-height: 50px;
  }

  .auth-page {
    padding: 18px 28px calc(var(--auth-footer-height) + 12px);
  }

  .auth-card {
    padding: 20px 24px;
    max-height: none;
    overflow: visible;
  }

  .auth-card-large {
    max-width: 480px;
  }

  .auth-heading {
    margin-bottom: 14px;
  }

  .website_page.auth-page h1 {
    margin-bottom: 6px;
    font-size: 30px;
    line-height: 35px;
  }

  .auth-heading p,
  .auth-helper-row {
    font-size: 14px;
    line-height: 20px;
  }

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

  .auth-card label {
    margin-bottom: 5px;
    font-size: 13px;
  }

  .auth-card .form-control,
  .auth-secondary-action,
  .btn-oauth.auth-oauth-button,
  .web-auth-shell .auth-card .auth-submit-button,
  .web-auth-shell .auth-card .auth-submit-button.btn,
  .web-auth-shell .auth-card .auth-submit-button.btn-primary,
  .web-auth-shell .auth-card .auth-submit-button.btn-default,
  .web-auth-shell .auth-card .auth-submit-button.bg-dark,
  .web-auth-shell .auth-card .auth-submit-button.text-light {
    min-height: 40px !important;
    height: 40px !important;
  }

  .auth-action-row {
    margin-bottom: 8px;
  }

  .auth-divider {
    margin: 10px 0;
  }

  .auth-helper-row {
    margin-bottom: 12px;
  }

  .auth-captcha-wrap {
    margin: 6px 0 8px;
    min-height: 58px;
    transform: scale(0.78);
    transform-origin: center;
  }

  .web-auth-shell .auth-image-logo {
    top: 24px;
    left: 24px;
  }

  .web-auth-shell .auth-image-logo img {
    width: 132px;
  }

  .web-auth-footer.footer .container {
    padding-top: 6px;
    padding-bottom: 5px;
  }

  .web-auth-footer.footer .nav-link {
    padding: 2px 0;
  }

  .web-auth-footer.footer p {
    margin-top: 2px;
    font-size: 11px;
  }
}

@media (min-width: 992px) and (max-height: 740px) {
  :root {
    --auth-footer-height: 44px;
  }

  .auth-page {
    padding: 12px 24px calc(var(--auth-footer-height) + 8px);
  }

  .auth-card {
    padding: 16px 22px;
  }

  .auth-heading {
    margin-bottom: 10px;
  }

  .website_page.auth-page h1 {
    font-size: 28px;
    line-height: 32px;
  }

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

  .auth-card .form-control,
  .auth-secondary-action,
  .btn-oauth.auth-oauth-button,
  .web-auth-shell .auth-card .auth-submit-button,
  .web-auth-shell .auth-card .auth-submit-button.btn,
  .web-auth-shell .auth-card .auth-submit-button.btn-primary,
  .web-auth-shell .auth-card .auth-submit-button.btn-default,
  .web-auth-shell .auth-card .auth-submit-button.bg-dark,
  .web-auth-shell .auth-card .auth-submit-button.text-light {
    min-height: 38px !important;
    height: 38px !important;
  }

  .auth-divider {
    margin: 8px 0;
  }

  .auth-captcha-wrap {
    min-height: 52px;
    transform: scale(0.72);
  }

  .web-auth-footer.footer .nav {
    gap: 0 12px;
  }

  .web-auth-footer.footer .container {
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

@media (max-width: 991.98px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }

  .web-auth-shell.wrapper.custom-bg-light {
    display: block;
    height: auto;
    min-height: 0;
  }

  .web-auth-shell #websiteSidebar.website-sidebar {
    display: none !important;
  }

  .web-auth-shell #web {
    width: 100%;
    flex: none;
  }

  .auth-page {
    min-height: auto;
    padding: 76px 22px 30px;
  }

  .auth-card {
    max-height: none;
    overflow: visible;
    padding: 30px 26px;
  }

  .web-auth-footer.footer {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .web-auth-shell.wrapper.custom-bg-light {
    padding-top: 58px;
  }

  .auth-page {
    min-height: auto;
    padding: 72px 16px 30px;
  }

  .auth-card-section {
    display: block;
  }

  .auth-card {
    max-width: none;
    padding: 26px 20px;
    box-shadow: 0 16px 42px var(--auth-shadow-card-mobile), 0 1px 2px var(--auth-shadow-small);
  }

  .website_page.auth-page h1 {
    font-size: 32px;
    line-height: 38px;
  }

  .auth-secondary-action,
  .btn-oauth.auth-oauth-button,
  .auth-card .form-control {
    min-height: 50px;
    height: 50px;
  }

  .web-auth-footer.footer .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .web-auth-footer.footer .nav {
    align-items: center;
    gap: 2px 12px;
  }
}
