:root {
  --ink: #171717;
  --muted: #6f6a62;
  --line: #e7e0d6;
  --paper: #fffaf2;
  --panel: #ffffff;
  --charcoal: #23211f;
  --gold: #c9a85d;
  --emerald: #2f6f5e;
  --blue: #315f82;
  --rose: #9f5363;
  --shadow: 0 22px 70px rgba(35, 33, 31, 0.14);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) 1.18fr;
  background:
    radial-gradient(circle at 12% 12%, rgba(201, 168, 93, 0.2), transparent 28%),
    linear-gradient(135deg, #fffaf2 0%, #f5efe6 44%, #22201e 44.2%);
}

.login-panel {
  align-self: center;
  width: min(520px, calc(100% - 48px));
  margin: 48px auto;
  background: rgba(255, 250, 242, 0.94);
  border: 1px solid rgba(201, 168, 93, 0.36);
  box-shadow: var(--shadow);
  padding: 40px;
  border-radius: 8px;
}

.brand-lockup,
.side-brand,
.member-chip,
.metric-head,
.course-head,
.resource-row,
.story-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.crown-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  color: #201d18;
  background:
    linear-gradient(140deg, #f8e8b8, #b9913f),
    #c9a85d;
  border-radius: 8px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.crown-mark.small {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  font-size: 0.8rem;
}

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

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 5vw, 3.55rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.tagline {
  margin-bottom: 0;
  color: var(--emerald);
  font-weight: 800;
}

.mission {
  margin: 28px 0;
  color: #4c4740;
  font-size: 1.05rem;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: #4d473f;
  font-weight: 700;
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d8cdbc;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 13px 14px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 93, 0.18);
}

.login-form button,
.primary-button {
  border: 0;
  background: var(--charcoal);
  color: #fff8ea;
  border-radius: 8px;
  padding: 14px 16px;
  font-weight: 800;
}

.ghost-button,
.small-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--charcoal);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.small-button {
  padding: 8px 10px;
  font-size: 0.86rem;
}

.form-error {
  min-height: 20px;
  color: #9b2332;
  font-weight: 700;
  margin: 0;
}

.demo-note {
  color: var(--muted);
  font-size: 0.87rem;
  margin: 18px 0 0;
}

.visual-panel {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
}

.visual-panel img {
  width: min(92%, 920px);
  max-height: calc(100vh - 48px);
  object-fit: cover;
  aspect-ratio: 16 / 11;
  border-radius: 8px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: #24221f;
  color: #fff8ea;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.side-brand span,
.member-chip small {
  display: block;
  color: #bfb4a4;
  font-size: 0.82rem;
}

.side-nav {
  display: grid;
  gap: 7px;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-button {
  border: 0;
  color: #f5ead7;
  background: transparent;
  border-radius: 8px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.nav-button[aria-current="page"] {
  background: rgba(201, 168, 93, 0.18);
  color: #fff;
}

.sidebar .ghost-button {
  margin-top: auto;
  background: transparent;
  color: #fff8ea;
  border-color: rgba(255, 248, 234, 0.2);
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0;
  letter-spacing: 0;
}

.member-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px 8px 8px;
}

.member-chip span {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e9f1ed;
  color: var(--emerald);
  font-weight: 900;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 0.8fr;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.welcome-card {
  background: var(--charcoal);
  color: #fff8ea;
  border-radius: 8px;
  padding: 30px;
  min-height: 252px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.welcome-card h3 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.08;
  margin-bottom: 16px;
  letter-spacing: 0;
}

.welcome-card p {
  color: #e5d7c2;
  line-height: 1.6;
}

.plan-list,
.clean-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.plan-list li,
.clean-list li {
  padding: 11px 12px;
  border: 1px solid rgba(255, 248, 234, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.white-panel,
.section-panel,
.tool-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(35, 33, 31, 0.06);
}

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

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

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

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

.metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  font-size: 1.28rem;
  margin-top: 6px;
}

.progress {
  height: 9px;
  background: #ede5d8;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 15px;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--emerald), var(--gold));
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 14px;
}

.section-title h3 {
  margin: 0;
  font-size: 1.35rem;
}

.kicker {
  color: var(--muted);
  line-height: 1.5;
}

.course-card,
.resource-card,
.story-card,
.tool-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf4f1;
  color: var(--emerald);
  font-size: 0.78rem;
  font-weight: 800;
}

.coach-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.chat-box {
  min-height: 320px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  background: #fbf7ef;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.message {
  max-width: 82%;
  padding: 13px 14px;
  border-radius: 8px;
  line-height: 1.5;
}

.message.ai {
  background: #fff;
  border: 1px solid var(--line);
}

.message.user {
  margin-left: auto;
  background: var(--charcoal);
  color: #fff8ea;
}

.coach-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.resource-row {
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.resource-row:last-child {
  border-bottom: 0;
}

.calendar-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.calendar-item:last-child {
  border-bottom: 0;
}

.date-box {
  border-radius: 8px;
  background: #f1eadf;
  text-align: center;
  padding: 10px;
  font-weight: 900;
}

.date-box span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.expert-form {
  display: grid;
  gap: 14px;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

@media (max-width: 1050px) {
  .login-shell,
  .app-shell,
  .hero-band,
  .coach-layout,
  .grid.four,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .visual-panel {
    min-height: auto;
    padding-top: 0;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

@media (max-width: 700px) {
  .login-panel,
  .workspace {
    width: auto;
    padding: 20px;
  }

  .topbar,
  .section-title,
  .calendar-item,
  .coach-form {
    grid-template-columns: 1fr;
    display: grid;
    align-items: stretch;
  }

  .grid.two,
  .side-nav {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }
}
