/* Client Portal login — Rewards-style landing shell (keeps SPA form + legal footer) */

:root {
  --cp-navy: #10203c;
  --cp-gold: #d8a52f;
  --cp-page: #0b1220;
  --cp-text: #e8edf7;
  --cp-muted: #9aa6bd;
  --cp-footer-body: #9aa6bd;
  --cp-footer-label: #e8edf7;
  --cp-line: #2a3548;
  --cp-surface: #141c2c;
  --cp-input: #0f1624;
}

body.cp-auth-landing {
  margin: 0;
  background: var(--cp-page) !important;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.cp-auth-landing #initial-splash {
  display: none !important;
}

#cp-landing {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  padding: 0 12px 0;
  color: var(--cp-text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at 85% 8%, rgba(216, 165, 47, 0.08), transparent 23rem),
    var(--cp-page);
  flex: 0 0 auto;
}

#cp-landing[hidden] {
  display: none !important;
}

.cp-topbar {
  width: min(1180px, 100%);
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cp-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.cp-theme-toggle {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(216, 165, 47, 0.35);
  border-radius: 11px;
  color: #f0d278;
  background: rgba(16, 32, 60, 0.55);
  cursor: pointer;
  padding: 0;
}

.cp-theme-toggle:hover {
  border-color: var(--cp-gold);
  color: #fff;
  background: rgba(216, 165, 47, 0.14);
}

.cp-theme-toggle svg {
  display: block;
}

.cp-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.cp-brand-logo-wrap {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 45%, rgba(216, 165, 47, 0.28), transparent 68%),
    rgba(16, 32, 60, 0.92);
  border: 1px solid rgba(216, 165, 47, 0.45);
  box-shadow:
    0 0 0 1px rgba(216, 165, 47, 0.12),
    0 0 18px rgba(216, 165, 47, 0.28);
}

.cp-brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 6px rgba(216, 165, 47, 0.55));
}

.cp-brand strong {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.cp-hero-panel {
  width: min(1180px, 100%);
  margin: 0 auto 12px;
  min-height: 490px;
  padding: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  grid-template-areas:
    "copy orbit"
    "actions orbit";
  align-items: center;
  gap: 24px 56px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 45%),
    radial-gradient(circle at 12% 18%, rgba(224, 184, 74, 0.16), transparent 22rem),
    #0c1526;
  border: 1px solid #2a3548;
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  transition:
    opacity 0.45s ease,
    filter 0.45s ease,
    transform 0.45s ease;
}

.cp-hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
}

.cp-hero-panel > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.cp-hero-copy {
  grid-area: copy;
  align-self: end;
}

.cp-reward-orbit {
  grid-area: orbit;
}

.cp-hero-actions {
  grid-area: actions;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.cp-eyebrow {
  margin: 0 0 12px;
  color: #f0d278;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cp-hero-copy h1 {
  margin: 0 0 22px;
  max-width: 680px;
  color: #fff;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.cp-hero-text {
  margin: 0;
  max-width: 590px;
  color: #c5cede;
  font-size: 17px;
  line-height: 1.7;
}

.cp-hero-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 19px;
  border: 0;
  border-radius: 10px;
  color: #59400b;
  background: var(--cp-gold);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.cp-hero-signin:hover {
  filter: brightness(1.06);
}

.cp-hero-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid rgba(216, 165, 47, 0.65);
  border-radius: 10px;
  color: #f0d278;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.cp-hero-signup:hover {
  border-color: var(--cp-gold);
  color: #fff;
  background: rgba(216, 165, 47, 0.12);
}

.cp-hero-actions > span {
  color: #c5cede;
  font-size: 12px;
}

.cp-hero-panel.is-faded {
  opacity: 0.42;
  filter: brightness(0.72) saturate(0.85);
  transform: translateY(10px) scale(0.985);
  pointer-events: none;
}

.cp-reward-orbit {
  width: 340px;
  height: 340px;
  margin: auto;
  position: relative;
  display: grid;
  place-items: center;
}

.cp-orbit-ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.cp-orbit-ring-one {
  width: 100%;
  height: 100%;
  animation: cp-orbit-ring-pulse 4.8s ease-in-out infinite;
}

.cp-orbit-ring-two {
  width: 72%;
  height: 72%;
  border-style: dashed;
  animation: cp-orbit-ring-pulse 4.8s ease-in-out infinite reverse;
}

.cp-orbit-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: cp-orbit-spin 14s linear infinite;
}

.cp-orbit-track-inner {
  inset: 14%;
  animation-duration: 9s;
  animation-direction: reverse;
}

.cp-orbit-track-offset {
  animation-delay: -7s;
}

.cp-orbit-track-offset-inner {
  animation-delay: -4.5s;
}

.cp-orbit-dot {
  width: 12px;
  height: 12px;
  position: absolute;
  top: 0;
  left: 50%;
  border: 3px solid var(--cp-navy);
  border-radius: 50%;
  background: var(--cp-gold);
  box-shadow: 0 0 18px rgba(216, 165, 47, 0.8);
  transform: translate(-50%, -50%);
}

.cp-orbit-dot-sm {
  width: 9px;
  height: 9px;
  border-width: 2px;
}

.cp-reward-core {
  width: 150px;
  height: 150px;
  z-index: 2;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(216, 165, 47, 0.48);
  border-radius: 50%;
  color: var(--cp-gold);
  background: radial-gradient(circle, rgba(216, 165, 47, 0.18), rgba(216, 165, 47, 0.04));
  box-shadow: 0 0 80px rgba(216, 165, 47, 0.16);
  animation: cp-core-glow 3.2s ease-in-out infinite;
}

.cp-reward-core span,
.cp-reward-core strong {
  display: block;
}

.cp-reward-core span {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cp-reward-core strong {
  margin-top: 2px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes cp-orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cp-orbit-ring-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@keyframes cp-core-glow {
  0%,
  100% {
    box-shadow: 0 0 60px rgba(216, 165, 47, 0.14);
    border-color: rgba(216, 165, 47, 0.42);
  }
  50% {
    box-shadow: 0 0 90px rgba(216, 165, 47, 0.32);
    border-color: rgba(240, 210, 120, 0.8);
  }
}

body.cp-auth-landing #root {
  flex: 0 0 auto;
  min-height: 0 !important;
  height: auto !important;
}

body.cp-auth-landing #root > div,
body.cp-auth-landing .cp-auth-column {
  background: transparent !important;
  min-height: 0 !important;
  height: auto !important;
}

body.cp-auth-landing:not(.cp-login-open) .cp-auth-form-wrap {
  display: none !important;
}

body.cp-auth-landing.cp-login-open .cp-auth-form-wrap {
  position: fixed !important;
  inset: 0 !important;
  z-index: 80 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px 16px !important;
  background: rgba(8, 12, 20, 0.42) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

body.cp-auth-landing.cp-login-open #cp-landing .cp-hero-panel {
  opacity: 0.42;
  filter: brightness(0.72) saturate(0.85);
  transform: translateY(10px) scale(0.985);
  pointer-events: none;
}

body.cp-auth-landing #root .cp-auth-logo-bar {
  display: none !important;
}

body.cp-auth-landing.cp-login-open #root .MuiPaper-root,
body.cp-auth-landing.cp-login-open #root [class*="MuiPaper-root"] {
  width: min(440px, 100%) !important;
  max-width: 440px !important;
  margin: 0 auto !important;
  border-radius: 24px !important;
  background: var(--cp-surface) !important;
  color: var(--cp-text) !important;
  border: 1px solid var(--cp-line) !important;
  box-shadow: 0 28px 80px rgba(8, 12, 20, 0.35) !important;
  animation: cp-login-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

body.cp-auth-landing.cp-login-open #root .MuiPaper-root h4,
body.cp-auth-landing.cp-login-open #root .MuiPaper-root .MuiTypography-root {
  color: var(--cp-text) !important;
}

body.cp-auth-landing.cp-login-open #root .MuiPaper-root .MuiTypography-colorTextSecondary {
  color: var(--cp-muted) !important;
}

body.cp-auth-landing.cp-login-open #root .MuiInputBase-root,
body.cp-auth-landing.cp-login-open #root .MuiOutlinedInput-root {
  background: var(--cp-input) !important;
  color: var(--cp-text) !important;
}

@keyframes cp-login-rise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.cp-auth-landing #root footer.cp-auth-footer,
body.cp-auth-landing #root .cp-auth-footer {
  position: relative !important;
  z-index: 3;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 20px 12px 18px !important;
  background:
    radial-gradient(circle at 85% 8%, rgba(216, 165, 47, 0.06), transparent 18rem),
    var(--cp-page) !important;
  border-top: 1px solid var(--cp-line) !important;
  color: var(--cp-footer-body) !important;
}

body.cp-auth-landing #root footer.cp-auth-footer .MuiContainer-root,
body.cp-auth-landing #root .cp-auth-footer .MuiContainer-root,
body.cp-auth-landing #root footer.cp-auth-footer [class*="MuiContainer-root"],
body.cp-auth-landing #root .cp-auth-footer [class*="MuiContainer-root"] {
  width: min(1180px, 100%) !important;
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.cp-auth-landing #root footer.cp-auth-footer,
body.cp-auth-landing #root .cp-auth-footer,
body.cp-auth-landing #root footer.cp-auth-footer *:not(svg):not(path),
body.cp-auth-landing #root .cp-auth-footer *:not(svg):not(path) {
  color: var(--cp-footer-body) !important;
  border-color: var(--cp-line) !important;
}

body.cp-auth-landing #root footer.cp-auth-footer [class*="MuiTypography-root"],
body.cp-auth-landing #root .cp-auth-footer [class*="MuiTypography-root"],
body.cp-auth-landing #root footer.cp-auth-footer p,
body.cp-auth-landing #root .cp-auth-footer p,
body.cp-auth-landing #root footer.cp-auth-footer div {
  color: var(--cp-footer-body) !important;
}

/* Section labels: Risk Warning / Regional Restrictions / Company Information */
body.cp-auth-landing #root footer.cp-auth-footer span[class*="MuiTypography"],
body.cp-auth-landing #root .cp-auth-footer span[class*="MuiTypography"],
body.cp-auth-landing #root footer.cp-auth-footer strong,
body.cp-auth-landing #root .cp-auth-footer strong,
body.cp-auth-landing #root footer.cp-auth-footer b,
body.cp-auth-landing #root .cp-auth-footer b {
  color: var(--cp-footer-label) !important;
  font-weight: 700 !important;
}

.cp-login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cp-line);
  border-radius: 10px;
  color: var(--cp-muted);
  background: var(--cp-input);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cp-login-close:hover {
  color: #fff;
  border-color: var(--cp-gold);
}

@media (max-width: 980px) {
  .cp-hero-panel {
    padding: 40px 28px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "orbit"
      "actions";
    gap: 28px;
    min-height: 0;
  }

  .cp-hero-actions {
    justify-content: center;
  }

  .cp-reward-orbit {
    width: 260px;
    height: 260px;
  }
}

@media (max-width: 700px) {
  #cp-landing {
    padding-inline: 12px;
  }

  .cp-topbar {
    min-height: 68px;
  }

  .cp-hero-panel {
    padding: 24px 16px;
    border-radius: 20px;
    gap: 20px;
  }

  .cp-hero-copy h1 {
    font-size: clamp(26px, 7.2vw, 34px);
    margin-bottom: 14px;
  }

  .cp-eyebrow {
    letter-spacing: 0.1em;
    font-size: 10px;
  }

  .cp-hero-text {
    font-size: 14px;
    line-height: 1.55;
  }

  .cp-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .cp-hero-actions > span {
    flex: 1 1 100%;
  }

  .cp-reward-orbit {
    width: min(200px, 58vw);
    height: min(200px, 58vw);
  }

  .cp-reward-core {
    width: 104px;
    height: 104px;
  }

  .cp-reward-core span {
    font-size: 16px;
  }
}

/* Light mode for auth landing */
html[data-theme="light"] body.cp-auth-landing,
body.cp-theme-light.cp-auth-landing {
  --cp-page: #f5f7fb;
  --cp-text: #17233d;
  --cp-muted: #5b677c;
  --cp-footer-body: #435069;
  --cp-footer-label: #10203c;
  --cp-line: #e3e8f1;
  --cp-surface: #ffffff;
  --cp-input: #fbfcfe;
  background: var(--cp-page) !important;
}

html[data-theme="light"] #cp-landing,
body.cp-theme-light #cp-landing {
  color: var(--cp-text);
  background:
    radial-gradient(circle at 85% 8%, rgba(216, 165, 47, 0.13), transparent 23rem),
    var(--cp-page);
}

html[data-theme="light"] .cp-brand strong,
body.cp-theme-light .cp-brand strong {
  color: var(--cp-text);
}

html[data-theme="light"] .cp-theme-toggle,
body.cp-theme-light .cp-theme-toggle {
  color: #59400b;
  background: #fff;
  border-color: rgba(16, 32, 60, 0.12);
}

html[data-theme="light"] .cp-hero-panel,
body.cp-theme-light .cp-hero-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 45%),
    var(--cp-navy);
  border: 0;
  box-shadow: 0 24px 70px rgba(16, 32, 60, 0.18);
}

html[data-theme="light"] body.cp-auth-landing #root footer.cp-auth-footer,
html[data-theme="light"] body.cp-auth-landing #root .cp-auth-footer,
body.cp-theme-light.cp-auth-landing #root footer.cp-auth-footer,
body.cp-theme-light.cp-auth-landing #root .cp-auth-footer {
  background: #eef1f4 !important;
  border-top: 1px solid #d7dde8 !important;
  color: var(--cp-footer-body) !important;
}

html[data-theme="light"] body.cp-auth-landing #root footer.cp-auth-footer *:not(svg):not(path),
html[data-theme="light"] body.cp-auth-landing #root .cp-auth-footer *:not(svg):not(path),
body.cp-theme-light.cp-auth-landing #root footer.cp-auth-footer *:not(svg):not(path),
body.cp-theme-light.cp-auth-landing #root .cp-auth-footer *:not(svg):not(path) {
  color: var(--cp-footer-body) !important;
}

html[data-theme="light"] body.cp-auth-landing #root footer.cp-auth-footer span[class*="MuiTypography"],
html[data-theme="light"] body.cp-auth-landing #root .cp-auth-footer span[class*="MuiTypography"],
html[data-theme="light"] body.cp-auth-landing #root footer.cp-auth-footer strong,
body.cp-theme-light.cp-auth-landing #root footer.cp-auth-footer span[class*="MuiTypography"],
body.cp-theme-light.cp-auth-landing #root .cp-auth-footer span[class*="MuiTypography"],
body.cp-theme-light.cp-auth-landing #root footer.cp-auth-footer strong {
  color: var(--cp-footer-label) !important;
}

/* Dark mode footer labels stay bright */
html[data-theme="dark"] body.cp-auth-landing,
body.cp-theme-dark.cp-auth-landing {
  --cp-footer-body: #9aa6bd;
  --cp-footer-label: #e8edf7;
}

html[data-theme="light"] body.cp-auth-landing.cp-login-open #root .MuiPaper-root,
body.cp-theme-light.cp-auth-landing.cp-login-open #root .MuiPaper-root {
  background: #fff !important;
  color: #17233d !important;
  border-color: #e3e8f1 !important;
}

html[data-theme="light"] body.cp-auth-landing.cp-login-open #root .MuiPaper-root h4,
html[data-theme="light"] body.cp-auth-landing.cp-login-open #root .MuiPaper-root .MuiTypography-root,
body.cp-theme-light.cp-auth-landing.cp-login-open #root .MuiPaper-root h4,
body.cp-theme-light.cp-auth-landing.cp-login-open #root .MuiPaper-root .MuiTypography-root {
  color: #17233d !important;
}

html[data-theme="light"] body.cp-auth-landing.cp-login-open #root .MuiPaper-root .MuiTypography-colorTextSecondary,
body.cp-theme-light.cp-auth-landing.cp-login-open #root .MuiPaper-root .MuiTypography-colorTextSecondary {
  color: #5b677c !important;
}
