:root {
  --bg: #f4efe6;
  --panel: #fffdf8;
  --panel-2: #fff5e8;
  --panel-3: #f6fbf9;
  --ink: #171412;
  --muted: #74665b;
  --line: #dfd3c3;
  --accent: #0e8f71;
  --accent-strong: #0a6f59;
  --accent-2: #ff824d;
  --accent-soft: #d9f3ec;
  --alert: #df5d47;
  --warning: #c58c1f;
  --shadow: 0 18px 40px rgba(73, 46, 26, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 181, 124, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(14, 143, 113, 0.15), transparent 24%),
    var(--bg);
}

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

pre,
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

.sidebar {
  padding: 24px;
  border-right: 1px solid rgba(117, 102, 91, 0.16);
  background: rgba(255, 252, 246, 0.9);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.brand-kicker,
.eyebrow,
.section-kicker,
.hero-kicker,
.sidebar-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
}

.brand h1,
.topbar h2,
.section-heading h3,
.hero-card h3,
.card-head h4,
.site-card h4 {
  margin: 0;
}

.nav {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.nav-link {
  border: 0;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(14, 143, 113, 0.18);
}

.sidebar-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.tone-dark {
  background: linear-gradient(160deg, #17211d, #0c1512);
  color: #f3ede6;
}

.tone-dark .sidebar-label,
.tone-dark .sidebar-copy,
.tone-dark .sidebar-list {
  color: rgba(243, 237, 230, 0.86);
}

.sidebar-copy,
.sidebar-list,
.hero-copy,
.flow-step p,
.mvp-item p,
.diagnostic-item p,
.site-card p,
.site-meta,
.activity-item p,
.snippet-title {
  margin: 8px 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.sidebar-list,
.plain-list {
  padding-left: 18px;
  margin: 12px 0 0;
  line-height: 1.7;
}

.content {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.topbar-actions,
.inline-actions,
.form-actions {
  display: flex;
  gap: 12px;
}

.inline-actions select {
  min-width: 124px;
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: 160ms ease;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
}

.primary-btn:hover {
  background: var(--accent-strong);
}

.ghost-btn {
  background: var(--panel);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.ghost-btn:hover {
  background: var(--panel-2);
}

.full-width {
  width: 100%;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.hero-grid,
.split-section,
.overview-grid,
.manage-grid,
.dashboard-grid,
.engine-grid,
.settings-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: 2fr 1fr 1fr 1fr;
  margin-bottom: 18px;
}

.hero-card,
.surface-card,
.metric-card {
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-card,
.surface-card {
  padding: 24px;
}

.hero-primary {
  background: linear-gradient(140deg, rgba(14, 143, 113, 0.98), rgba(11, 106, 84, 0.96));
  color: #fff;
}

.hero-primary .hero-kicker,
.hero-primary .hero-copy {
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-tags span,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
}

.metric-card {
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.metric-card p,
.metric-card span {
  margin: 0;
  color: var(--muted);
}

.metric-card strong,
.stats-row strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
}

.metric-card strong {
  font-size: 40px;
}

.split-section {
  grid-template-columns: 1.25fr 1fr;
  margin-bottom: 18px;
}

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

.section-heading {
  margin-bottom: 18px;
}

.flow-band.stacked,
.mvp-list,
.site-list,
.diagnostic-list,
.activity-list,
.member-list {
  display: grid;
  gap: 14px;
}

.flow-step,
.diagnostic-item,
.activity-item {
  padding: 18px;
  border-radius: 18px;
  background: var(--panel-2);
}

.flow-step span,
.mvp-item span {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.flow-step span {
  color: var(--accent-2);
}

.mvp-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  align-items: start;
}

.mvp-item span {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.focus-card {
  display: grid;
  gap: 10px;
}

.focus-card .focus-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel-3);
  border: 1px solid rgba(14, 143, 113, 0.1);
}

.focus-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.focus-value {
  margin: 0;
  font-weight: 600;
}

.manage-grid {
  grid-template-columns: 1fr 1.15fr;
}

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

.prototype-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.prototype-form input,
.prototype-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
}

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

.site-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--panel-3);
  border: 1px solid rgba(14, 143, 113, 0.12);
}

.member-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--panel-3);
  border: 1px solid rgba(14, 143, 113, 0.12);
}

.site-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.member-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.site-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.member-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.member-actions .full-width {
  flex: 1;
}

.site-actions button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(14, 143, 113, 0.14);
}

.site-actions button:hover {
  background: var(--panel-2);
}

.member-actions button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(14, 143, 113, 0.14);
}

.member-actions button:hover {
  background: var(--panel-2);
}

.member-card.current-member {
  border-color: rgba(14, 143, 113, 0.32);
  box-shadow: inset 0 0 0 1px rgba(14, 143, 113, 0.18);
}

.dashboard-grid {
  grid-template-columns: 1fr 1.4fr;
}

.task-layout .surface-card:last-child {
  grid-column: 1 / -1;
}

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

.status-pill {
  background: #f2eee7;
  color: var(--muted);
}

.status-live,
.status-ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-alert,
.status-bad {
  background: rgba(223, 93, 71, 0.12);
  color: var(--alert);
}

.status-warn {
  background: rgba(197, 140, 31, 0.12);
  color: var(--warning);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.stats-row strong {
  font-size: 34px;
}

.stats-row.compact strong {
  font-size: 28px;
}

.stats-row span {
  color: var(--muted);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(116, 102, 91, 0.16);
  text-align: left;
}

.ok {
  color: var(--accent);
}

.warn {
  color: var(--warning);
}

.bad {
  color: var(--alert);
}

.diagnostic-item {
  background: #fff8f4;
  border: 1px solid rgba(223, 93, 71, 0.15);
}

.diagnostic-item strong,
.activity-item strong {
  display: block;
}

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

.snippet-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: #171819;
}

.vip-card {
  position: relative;
}

.vip-featured {
  border: 1px solid rgba(14, 143, 113, 0.25);
  background: linear-gradient(180deg, #fffdf8, #eefaf6);
}

.vip-price {
  margin: 12px 0;
  font-size: 36px;
  font-family: "Space Grotesk", sans-serif;
}

.snippet-title {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.72);
}

.snippet-box pre,
.settings-grid pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #f5f5f5;
}

@media (max-width: 1200px) {
  .hero-grid,
  .split-section,
  .overview-grid,
  .manage-grid,
  .dashboard-grid,
  .engine-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(117, 102, 91, 0.16);
  }

  .topbar {
    flex-direction: column;
    align-items: start;
  }

  .topbar-actions,
  .form-actions {
    width: 100%;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .member-actions {
    flex-direction: column;
  }

  .hero-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 18px;
  }
}
