/* Core Lexes — Approved cobalt Sign In portal (scoped) */
body.clx-login-page {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  background: #000000 !important;
}

body.clx-login-page .auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  padding: 0 !important;
  margin: 0 !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  background: #000000 !important;
  background-image: none !important;
  overflow: hidden;
}

body.clx-login-page .auth-shell > .auth-footer,
body.clx-login-page .auth-shell > .global-site-footer {
  display: none !important;
}

body.clx-login-page .clxp-pill {
  display: none !important;
}

body.clx-login-page,
body.clx-login-page .clx-login-portal,
body.clx-login-page .clx-login-portal *,
body.clx-login-page .clx-login-portal *::before,
body.clx-login-page .clx-login-portal *::after {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
}

.clx-login-portal {
  --clx-cobalt: #0d6efd;
  --clx-cobalt-bright: #3d8bfd;
  --clx-cobalt-glow: rgba(13, 110, 253, 0.55);
  --clx-cobalt-dim: rgba(13, 110, 253, 0.45);
  --clx-silver: #c0c7d6;
  --clx-silver-dim: rgba(192, 199, 214, 0.55);
  --clx-panel: rgba(0, 0, 0, 0.88);
  --clx-input: rgba(0, 0, 0, 0.92);
  --clx-text: #ffffff;
  --clx-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--clx-text);
  font-family: var(--clx-font) !important;
  background:
    linear-gradient(
      105deg,
      rgba(0, 0, 0, 0.15) 0%,
      rgba(13, 110, 253, 0.12) 45%,
      rgba(0, 0, 0, 0.55) 100%
    ),
    url("/static/img/login-portal-scene.jpg") center center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.clx-login-portal *,
.clx-login-portal *::before,
.clx-login-portal *::after {
  box-sizing: border-box;
}

.clx-lp-top {
  flex: 0 0 auto;
  padding: 14px 22px 8px;
  z-index: 3;
}

.clx-lp-top-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  width: 100%;
}

.clx-lp-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-decoration: none;
  color: var(--clx-text);
  max-width: min(100%, calc(100% - 170px));
  min-width: 0;
  flex: 1 1 auto;
}

.clx-lp-brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--clx-cobalt-glow));
}

.clx-lp-brand-line {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.clx-lp-brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--clx-text) !important;
  -webkit-text-fill-color: var(--clx-text) !important;
  text-shadow: none;
}

.clx-lp-brand-sep {
  color: var(--clx-silver);
  opacity: 0.9;
  font-weight: 400;
  font-size: 0.95rem;
}

.clx-lp-brand-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--clx-cobalt) !important;
  -webkit-text-fill-color: var(--clx-cobalt) !important;
  text-transform: uppercase;
}

.clx-lp-join {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
  flex: 0 0 auto;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--clx-cobalt);
  background: transparent;
  color: var(--clx-text) !important;
  -webkit-text-fill-color: var(--clx-text) !important;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(13, 110, 253, 0.25);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  z-index: 2;
}

.clx-lp-join:hover,
.clx-lp-join:focus {
  background: rgba(13, 110, 253, 0.12);
  border-color: var(--clx-cobalt-bright);
  box-shadow: 0 0 18px rgba(13, 110, 253, 0.4);
  outline: none;
  color: var(--clx-text) !important;
}

.clx-lp-join:focus-visible {
  outline: 2px solid var(--clx-cobalt-bright);
  outline-offset: 2px;
}

.clx-lp-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px clamp(18px, 4vw, 48px) 8px 24px;
  width: 100%;
  z-index: 2;
}

.clx-lp-panel {
  width: min(400px, 92vw);
  min-width: 0;
  max-width: 400px;
  background: var(--clx-panel);
  border: 1px solid var(--clx-cobalt-dim);
  border-radius: 12px;
  padding: 24px 26px 20px;
  box-shadow:
    0 0 0 1px rgba(13, 110, 253, 0.2),
    0 0 28px rgba(13, 110, 253, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.clx-lp-title {
  margin: 0 0 18px;
  text-align: center;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--clx-text) !important;
  -webkit-text-fill-color: var(--clx-text) !important;
  letter-spacing: 0.02em;
  text-shadow: none;
}

.clx-lp-alert {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(220, 38, 38, 0.45);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
  font-size: 0.82rem;
  line-height: 1.35;
}

.clx-lp-field {
  margin-bottom: 12px;
}

.clx-lp-label {
  display: block;
  margin: 0 0 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clx-text) !important;
  -webkit-text-fill-color: var(--clx-text) !important;
  letter-spacing: 0.02em;
}

.clx-lp-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.clx-lp-input-wrap > .clx-lp-ico {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--clx-silver);
  pointer-events: none;
  z-index: 1;
}

.clx-lp-input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 36px;
  border-radius: 8px;
  border: 1px solid var(--clx-silver-dim);
  background: var(--clx-input);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  font-size: 0.9rem;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(192, 199, 214, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.clx-lp-input::placeholder {
  color: #8b93a7 !important;
  -webkit-text-fill-color: #8b93a7 !important;
  opacity: 1;
}

.clx-lp-input:focus {
  border-color: var(--clx-cobalt);
  box-shadow:
    0 0 0 1px rgba(13, 110, 253, 0.45),
    0 0 14px rgba(13, 110, 253, 0.25);
}

.clx-lp-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--clx-silver);
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
}

.clx-lp-toggle:hover,
.clx-lp-toggle:focus {
  color: var(--clx-cobalt-bright);
  outline: none;
}

.clx-lp-toggle:focus-visible {
  outline: 2px solid var(--clx-cobalt);
  outline-offset: 1px;
}

.clx-lp-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}

.clx-lp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 14px;
  flex-wrap: wrap;
}

.clx-lp-remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--clx-text);
  user-select: none;
}

.clx-lp-remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--clx-cobalt);
  cursor: pointer;
  border: 1px solid var(--clx-silver);
}

.clx-lp-forgot {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clx-cobalt) !important;
  -webkit-text-fill-color: var(--clx-cobalt) !important;
  text-decoration: none !important;
}

.clx-lp-forgot:hover,
.clx-lp-forgot:focus {
  color: var(--clx-cobalt-bright) !important;
  -webkit-text-fill-color: var(--clx-cobalt-bright) !important;
  text-decoration: underline !important;
  outline: none;
}

.clx-lp-submit {
  appearance: none;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #ffffff;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.clx-lp-submit:hover,
.clx-lp-submit:focus {
  filter: brightness(0.97);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  outline: none;
}

.clx-lp-submit:focus-visible {
  outline: 2px solid var(--clx-cobalt);
  outline-offset: 2px;
}

.clx-lp-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(192, 199, 214, 0.25);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clx-cobalt) !important;
  -webkit-text-fill-color: var(--clx-cobalt) !important;
}

.clx-lp-secure svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--clx-cobalt);
}

.clx-lp-foot {
  flex: 0 0 auto;
  text-align: center;
  padding: 6px 16px 12px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  z-index: 3;
}

@media (max-width: 960px) {
  body.clx-login-page .auth-shell {
    max-height: none;
    overflow-y: auto;
  }

  .clx-login-portal {
    max-height: none;
    min-height: 100vh;
    overflow: visible;
    background-position: 35% center;
  }

  .clx-lp-main {
    justify-content: center;
    padding: 12px 18px 16px;
  }

  .clx-lp-panel {
    width: min(400px, 100%);
    max-width: none;
  }

  .clx-lp-brand-line {
    flex-wrap: wrap;
    white-space: normal;
  }

  .clx-lp-top-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .clx-lp-brand-sub {
    display: none;
  }

  .clx-lp-brand-sep {
    display: none;
  }

  .clx-lp-join {
    padding: 7px 12px;
    font-size: 0.75rem;
  }

  .clx-lp-panel {
    padding: 18px 16px 14px;
  }

  .clx-lp-title {
    font-size: 1.4rem;
  }

  .clx-lp-brand {
    max-width: 100%;
  }
}

@media (max-height: 720px) and (min-width: 961px) {
  .clx-lp-top {
    padding-top: 8px;
    padding-bottom: 2px;
  }

  .clx-lp-panel {
    padding: 16px 20px 14px;
  }

  .clx-lp-title {
    margin-bottom: 10px;
    font-size: 1.4rem;
  }

  .clx-lp-input {
    height: 38px;
  }

  .clx-lp-submit {
    height: 40px;
  }

  .clx-lp-foot {
    padding-bottom: 8px;
  }
}
