:root {
  color-scheme: light;
  --ink: #172022;
  --muted: #667174;
  --line: #dce3e0;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --sage: #58776a;
  --teal: #0f766e;
  --coral: #d96c5f;
  --gold: #b2873f;
  --plum: #63506c;
  --charcoal: #223033;
  --shadow: 0 18px 45px rgba(29, 43, 45, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #192527;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.brand h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.1;
}

.brand span {
  color: #b8c9c2;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: #cbd8d3;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: #293a3d;
  color: #fff;
}

.nav svg,
.icon,
.search svg,
.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.trial-box {
  margin-top: 28px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.trial-box.expired {
  border-color: rgba(217, 108, 95, 0.55);
  background: rgba(217, 108, 95, 0.12);
}

.trial-box strong {
  display: block;
  margin-bottom: 6px;
}

.trial-box p {
  margin: 0 0 12px;
  color: #cbd8d3;
  font-size: 13px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 22px 28px 38px;
}

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

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 34px 0 12px;
  background: #fff;
  color: var(--ink);
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--plum);
  color: #fff;
  font-weight: 700;
}

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

.hero-copy {
  padding: 30px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero h2,
.section h2 {
  margin: 0;
  color: var(--charcoal);
}

.hero h2 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 0.96;
}

.hero p {
  max-width: 720px;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-actions,
.row-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-visual {
  min-height: 390px;
  border-radius: 8px;
  background: #dfe7e2 url("assets/hostcommand-operations.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 8px;
  background: var(--charcoal);
  color: #fff;
  font-weight: 700;
}

.btn.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--charcoal);
}

.btn.gold {
  background: var(--gold);
}

.btn.ghost {
  background: transparent;
  color: var(--sage);
}

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

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric,
.section,
.list-item,
.plan,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  padding: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.metric small {
  color: var(--teal);
  font-weight: 700;
}

.content-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.section {
  padding: 20px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.brain-list,
.job-list,
.property-list,
.activity-list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.list-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.list-item h3 {
  margin: 0;
  font-size: 16px;
}

.list-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8efeb;
  color: var(--sage);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tag.warn {
  background: #fae7e4;
  color: #ab4438;
}

.tag.gold {
  background: #f4ead8;
  color: #7b5a20;
}

.tag.plum {
  background: #ece7ef;
  color: var(--plum);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.tabs button.active {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.wide {
  grid-column: 1 / -1;
}

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

.paywall {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #efc8c3;
  border-radius: 8px;
  background: #fff4f2;
}

.paywall h2,
.paywall p {
  margin: 0;
}

.paywall p:last-child {
  margin-top: 7px;
  color: var(--muted);
}

.plan {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.trial-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.trial-plan h3 {
  margin: 10px 0 4px;
}

.plan.featured {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(178, 135, 63, 0.12);
}

.plan h3,
.plan p {
  margin: 0;
}

.legal-card {
  align-content: start;
}

.legal-card p {
  line-height: 1.45;
}

.legal-card p + p {
  margin-top: 2px;
}

.price {
  font-size: 30px;
  font-weight: 800;
}

.plan ul,
.checklist {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan li,
.checklist li {
  display: flex;
  gap: 9px;
  color: var(--muted);
}

.readiness {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf8;
}

.readiness-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.readiness-row .status-dot {
  margin-top: 0;
}

.readiness-row strong {
  color: var(--charcoal);
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.status-dot.warn {
  background: var(--coral);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--charcoal);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu {
  display: none;
}

.welcome-shell {
  min-height: 100vh;
  padding: 28px;
  background:
    linear-gradient(rgba(247, 248, 244, 0.82), rgba(247, 248, 244, 0.92)),
    url("assets/hostcommand-operations.png") center / cover no-repeat;
}

.welcome-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 56px);
  max-width: 1180px;
  margin: 0 auto;
}

.welcome-copy h1 {
  max-width: 760px;
  margin: 0;
  color: var(--charcoal);
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.95;
}

.welcome-copy p:not(.eyebrow) {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.welcome-logo {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.auth-panel h2 {
  margin: 0 0 18px;
}

.onboarding-panel {
  margin-bottom: 18px;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.onboarding-step.done {
  background: #f4f8f5;
}

.onboarding-step small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

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

  .trial-box {
    display: none;
  }

  .hero,
  .content-grid,
  .split,
  .welcome-hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 320px;
  }

  .metrics,
  .plans,
  .onboarding-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main {
    padding: 16px;
  }

  .topbar,
  .section-header,
  .list-item-top,
  .paywall,
  .trial-plan {
    align-items: stretch;
    flex-direction: column;
  }

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

  .hero-copy {
    padding: 22px;
  }

  .metrics,
  .plans,
  .form-grid,
  .onboarding-steps {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 38px;
  }

  .welcome-shell {
    padding: 16px;
  }

  .welcome-copy h1 {
    font-size: 42px;
  }
}
