/* Customer Portal build: CP-FIX-2026-05-29-v4 — BeyondHealth navy / blue / gold palette */
:root {
  color-scheme: light;
  --bg: #f7f3ea;
  --panel: #ffffff;
  --ink: #071424;
  --muted: #637085;
  --line: #dde3eb;
  --navy: #0b1f36;
  --navy-soft: #e8eef5;
  --gold: #c7a65a;
  --gold-soft: #f5ecd6;
  --shadow: 0 18px 50px rgba(7, 20, 36, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at top left, rgba(11, 31, 54, 0.10), transparent 34rem), var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  background: rgba(246, 247, 241, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy), #123a63);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
}

.portal-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.portal-header nav a,
.ghost-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  cursor: pointer;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 34px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.55fr);
  gap: 28px;
  align-items: center;
  margin: 18px 0 26px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 7vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

p,
li {
  color: var(--muted);
  line-height: 1.72;
}

.login-card,
#testForm,
#referralForm {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcf8;
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(199, 166, 90, 0.22);
}

.primary-button,
.secondary-button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: var(--navy);
  color: white;
  cursor: pointer;
  padding: 13px 18px;
  text-decoration: none;
  font-weight: 800;
}

.primary-button:hover,
.primary-link:hover {
  background: #061224;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--gold-soft);
  color: var(--navy);
}

.fine-print {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.hidden {
  display: none !important;
}

.dashboard {
  display: grid;
  gap: 24px;
  padding-bottom: 42px;
}

.dashboard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.grid {
  display: grid;
  gap: 24px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.steps {
  padding-left: 1.3rem;
}

.inline-form {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 10px;
  margin: 20px 0;
}

.timeline,
.referral-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li,
.referral-list li,
.result-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcf8;
  padding: 14px 16px;
}

.timeline time,
.referral-list strong,
.result-card strong,
.result-card span {
  display: block;
}

.timeline time,
.result-card strong {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.philosophy {
  position: relative;
  overflow: hidden;
  border-color: rgba(199, 166, 90, 0.28);
  background: linear-gradient(145deg, #fffdf8, #f8f1df);
}

.philosophy h2 {
  max-width: 760px;
  color: var(--navy);
}

.philosophy-copy {
  display: grid;
  max-width: 820px;
  gap: 12px;
}

.philosophy-copy p {
  margin: 0;
}

.philosophy-orbit {
  position: absolute;
  right: -70px;
  top: -90px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(199, 166, 90, 0.24);
  border-radius: 50%;
}

.philosophy-orbit::after {
  content: "";
  position: absolute;
  inset: 48px;
  border: 1px solid rgba(11, 31, 54, 0.12);
  border-radius: 50%;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-grid a {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #fbfcf8, var(--gold-soft));
  padding: 18px;
  text-decoration: none;
  font-weight: 850;
}

.resource-grid a:hover {
  border-color: rgba(199, 166, 90, 0.65);
}

.status-message {
  border: 1px solid rgba(199, 166, 90, 0.38);
  border-radius: 16px;
  background: var(--gold-soft);
  color: var(--navy);
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 750;
}

@media (max-width: 860px) {
  .portal-header,
  .dashboard-top {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-header nav {
    justify-content: flex-start;
  }

  .hero,
  .two-columns,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.2rem, 16vw, 3.4rem);
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1180px);
  }

  .panel {
    border-radius: 22px;
  }

  .portal-header nav a,
  .ghost-button {
    width: 100%;
    text-align: center;
  }
}

.portal-footer {
  display: flex;
  justify-content: center;
  padding: 0 0 28px;
}

.build-marker {
  border: 1px solid rgba(199, 166, 90, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 700;
}
