/* Core Lexes — Sitting-Lex Login Portal (scoped; staging login only) */
body.clx-login-page {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  background: #050a16 !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: #050a16 !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;
}

.clx-login-portal {
  --clx-gold: #c9a227;
  --clx-gold-bright: #e8c547;
  --clx-gold-dim: rgba(201, 162, 39, 0.55);
  --clx-panel: rgba(8, 14, 28, 0.92);
  --clx-input: rgba(6, 12, 28, 0.95);
  --clx-text: #f8fafc;
  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: "Times New Roman", Times, serif;
  background:
    linear-gradient(90deg, rgba(5, 10, 22, 0.08) 0%, rgba(5, 10, 22, 0.12) 55%, rgba(5, 10, 22, 0.35) 100%),
    url("/static/img/login-portal-scene.jpg") left 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: 12px 22px 6px;
  z-index: 3;
}

.clx-lp-top-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
}

.clx-lp-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--clx-gold);
  max-width: calc(100% - 170px);
  min-width: 0;
}

.clx-lp-brand-scales {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: block;
  filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.45));
}

.clx-lp-brand-line {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.clx-lp-brand-name {
  font-family: "Times New Roman", Times, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--clx-gold);
  text-shadow: 0 0 12px rgba(201, 162, 39, 0.35);
}

.clx-lp-brand-sep {
  color: var(--clx-gold-bright);
  opacity: 0.85;
  font-weight: 400;
  font-size: 0.95rem;
}

.clx-lp-brand-sub {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--clx-gold-bright);
  text-transform: uppercase;
  opacity: 0.95;
}

.clx-lp-join {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1.5px solid var(--clx-gold);
  background: linear-gradient(180deg, #e8c547 0%, #c9a227 55%, #a8861c 100%);
  color: #0a1424 !important;
  -webkit-text-fill-color: #0a1424 !important;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
  z-index: 2;
}

.clx-lp-join:hover,
.clx-lp-join:focus {
  filter: brightness(1.06);
  outline: none;
  color: #0a1424 !important;
}

.clx-lp-join:focus-visible {
  outline: 2px solid var(--clx-gold-bright);
  outline-offset: 2px;
}

.clx-lp-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  /* Sit Sign In just right of Lex (~15–20px). Lex right ≈ 764px in 1366×768 scene with cover+left. */
  justify-content: flex-start;
  padding: 8px 24px 8px calc(max(764 / 1366 * 100vw, 764 / 768 * 100vh) + 18px);
  width: 100%;
  z-index: 2;
}

.clx-lp-panel {
  width: min(380px, 34vw);
  min-width: 300px;
  background: var(--clx-panel);
  border: 1px solid var(--clx-gold-dim);
  border-radius: 12px;
  padding: 22px 24px 18px;
  box-shadow:
    0 0 0 1px rgba(201, 162, 39, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.clx-lp-title {
  margin: 0 0 16px;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--clx-gold);
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(201, 162, 39, 0.35);
}

.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-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.35;
}

.clx-lp-field {
  margin-bottom: 12px;
}

.clx-lp-label {
  display: block;
  margin: 0 0 5px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clx-gold);
  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: #e2e8f0;
  pointer-events: none;
  z-index: 1;
}

.clx-lp-input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 36px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: var(--clx-input);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.9rem;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.clx-lp-input::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1;
}

.clx-lp-input:focus {
  border-color: var(--clx-gold);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.35), 0 0 14px rgba(201, 162, 39, 0.2);
}

.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: #e2e8f0;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
}

.clx-lp-toggle:hover,
.clx-lp-toggle:focus {
  color: var(--clx-gold-bright);
  outline: none;
}

.clx-lp-toggle:focus-visible {
  outline: 2px solid var(--clx-gold);
  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-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  color: #e2e8f0;
  user-select: none;
}

.clx-lp-remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--clx-gold);
  cursor: pointer;
}

.clx-lp-forgot {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clx-gold) !important;
  -webkit-text-fill-color: var(--clx-gold) !important;
  text-decoration: none !important;
}

.clx-lp-forgot:hover,
.clx-lp-forgot:focus {
  color: var(--clx-gold-bright) !important;
  -webkit-text-fill-color: var(--clx-gold-bright) !important;
  text-decoration: underline !important;
  outline: none;
}

.clx-lp-submit {
  appearance: none;
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--clx-gold);
  border-radius: 7px;
  background: linear-gradient(180deg, #f0d56a 0%, #d4af37 40%, #b8941f 100%);
  color: #0a1424 !important;
  -webkit-text-fill-color: #0a1424 !important;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: filter 0.15s ease;
}

.clx-lp-submit:hover,
.clx-lp-submit:focus {
  filter: brightness(1.05);
  outline: none;
}

.clx-lp-submit:focus-visible {
  outline: 2px solid #fff;
  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(201, 162, 39, 0.28);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clx-gold);
}

.clx-lp-secure svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--clx-gold-bright);
}

.clx-lp-foot {
  flex: 0 0 auto;
  text-align: center;
  padding: 6px 16px 12px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 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: 20% center;
  }

  .clx-lp-main {
    justify-content: center;
    padding: 12px 18px 16px;
  }

  .clx-lp-panel {
    width: min(400px, 100%);
    min-width: 0;
  }

  .clx-lp-brand-line {
    flex-wrap: wrap;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .clx-lp-brand {
    max-width: calc(100% - 140px);
  }

  .clx-lp-top-inner {
    justify-content: flex-start;
  }

  .clx-lp-brand {
    justify-content: flex-start;
  }
}

@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;
  }
}

@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;
  }
}
