:root {
  --brand: #2f7d63;
  --brand-dark: #1f5a46;
  --brand-light: #eaf3ef;
  --bg: #f6f8f7;
  --card: #ffffff;
  --text: #1c2b26;
  --muted: #5f7570;
  --border: #dfe7e3;
  --danger: #c0392b;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--brand-dark); }

/* ---------------------------------------------------------------------
   Site-wide header / nav — used identically on every page so people can
   always get Home, see what the product does, and reach Pricing/FAQ.
------------------------------------------------------------------- */
.site-header {
  background: var(--brand-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}
.site-logo .emoji { font-size: 1.3rem; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  color: #fff;
  opacity: 0.82;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.site-nav a:hover { opacity: 1; background: rgba(255,255,255,0.08); }
.site-nav a.current { opacity: 1; font-weight: 600; background: rgba(255,255,255,0.12); }
.site-nav a.cta {
  background: #fff;
  color: var(--brand-dark);
  opacity: 1;
  font-weight: 700;
  padding: 8px 14px;
  margin-left: 4px;
}
.site-nav a.cta:hover { background: #eef6f2; }

/* ---------------------------------------------------------------------
   Site-wide footer
------------------------------------------------------------------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 36px 20px 28px;
  margin-top: 40px;
}
.site-footer .wrap {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.site-footer .brand-col { max-width: 320px; }
.site-footer .brand-col .site-logo { color: var(--brand-dark); margin-bottom: 8px; }
.site-footer .brand-col p { color: var(--muted); font-size: 0.85rem; line-height: 1.5; margin: 0; }
.site-footer .links-col h5 {
  margin: 0 0 10px; font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
}
.site-footer .links-col a {
  display: block; color: var(--text); text-decoration: none;
  font-size: 0.9rem; padding: 4px 0; opacity: 0.85;
}
.site-footer .links-col a:hover { opacity: 1; text-decoration: underline; }
.site-footer .bottom {
  max-width: 1080px; margin: 28px auto 0; padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.78rem; text-align: center;
}

/* ---------------------------------------------------------------------
   Marketing building blocks — shared by the homepage and pricing page
------------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, #1f5a46 0%, #2f7d63 55%, #3f9b7c 100%);
  color: #fff;
  padding: 56px 20px 84px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
}
.hero p.sub {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.1rem;
  opacity: 0.92;
}
.hero .hero-ctas {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 28px;
}
.hero .hero-ctas a {
  padding: 12px 22px; border-radius: 10px; font-weight: 700; text-decoration: none;
  font-size: 0.98rem;
}
.hero .hero-ctas a.primary { background: #fff; color: var(--brand-dark); }
.hero .hero-ctas a.primary:hover { background: #eef6f2; }
.hero .hero-ctas a.ghost { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.hero .hero-ctas a.ghost:hover { background: rgba(255,255,255,0.2); }

.wrap { max-width: 1040px; margin: -46px auto 0; padding: 0 20px 30px; position: relative; }
.wrap.flat { margin-top: 0; padding-top: 50px; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0 0 56px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.feature-card .icon { font-size: 1.6rem; margin-bottom: 8px; display: block; }
.feature-card h3 { margin: 0 0 6px; font-size: 1rem; }
.feature-card p { margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.45; }

.section-title { text-align: center; margin: 0 0 8px; font-size: 1.7rem; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 34px; font-size: 0.98rem; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 60px;
}
.plan-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan-card.featured {
  border: 2px solid var(--brand);
  box-shadow: 0 18px 40px -20px rgba(47,125,99,0.45);
}
.plan-card .ribbon {
  position: absolute;
  top: -13px; left: 28px;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
}
.plan-card h3 { margin: 6px 0 4px; font-size: 1.15rem; }
.plan-card .plan-desc { color: var(--muted); font-size: 0.88rem; margin: 0 0 18px; min-height: 40px; }
.plan-card .price { font-size: 2.4rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 2px; }
.plan-card .price small { font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.plan-card ul { list-style: none; padding: 0; margin: 18px 0 26px; flex-grow: 1; }
.plan-card li { padding: 6px 0 6px 26px; position: relative; font-size: 0.92rem; }
.plan-card li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.plan-card input[type=email] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 10px; font-size: 0.92rem;
}
.plan-card button {
  width: 100%; padding: 12px 16px; border: none; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 0.98rem; font-weight: 600; cursor: pointer;
}
.plan-card button:hover { background: var(--brand-dark); }
.plan-card .status-msg { margin-top: 10px; font-size: 0.85rem; text-align: center; }
.plan-card .status-msg.err { color: var(--danger); }
.plan-card .status-msg.ok { color: var(--brand-dark); }

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 56px;
}
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; margin-top: 22px; }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 0.9rem; margin-bottom: 10px;
}
.step h4 { margin: 0 0 6px; font-size: 0.98rem; }
.step p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.4; }

.faq { margin-bottom: 30px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item h4 { margin: 0 0 6px; font-size: 0.98rem; }
.faq-item p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.anchor-offset { scroll-margin-top: 70px; }

/* ---------------------------------------------------------------------
   Original app-shell styles (functional demo, onboarding form)
------------------------------------------------------------------- */
header.app-header {
  background: var(--brand);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header.app-header h1 { margin: 0; font-size: 1.25rem; }
header.app-header .badge { font-size: 0.75rem; opacity: 0.85; }

nav#tabs {
  display: flex;
  gap: 4px;
  background: var(--brand-dark);
  padding: 0 12px;
  overflow-x: auto;
}
nav#tabs button {
  background: none;
  border: none;
  color: #fff;
  opacity: 0.75;
  padding: 12px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
nav#tabs button.active {
  opacity: 1;
  border-bottom-color: #fff;
  font-weight: 600;
}

main.app-main {
  max-width: 720px;
  margin: 20px auto;
  padding: 0 16px 60px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card h2 { margin-top: 0; font-size: 1.05rem; }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 10px 0 4px;
}

input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  font-family: inherit;
}

button.primary {
  margin-top: 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}
button.primary:hover { background: var(--brand-dark); }

button.secondary {
  margin-top: 10px;
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.msg { margin-top: 10px; font-size: 0.9rem; }
.msg.ok { color: var(--brand-dark); }
.msg.err { color: var(--danger); }

.pill {
  display: inline-block;
  background: #eaf3ef;
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  margin: 2px 4px 2px 0;
}

.hidden { display: none !important; }

.list-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

footer.simple-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 20px;
}

code {
  background: #eef2f0;
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------
   Onboarding page
------------------------------------------------------------------- */
.onboard-wrap { max-width: 600px; margin: 30px auto 60px; padding: 0 16px; }
.onboard-intro { text-align: center; margin-bottom: 22px; }
.onboard-intro h1 { margin: 0 0 8px; font-size: 1.6rem; }
.onboard-intro p { margin: 0; color: var(--muted); }
.subdomain-preview { font-size: 0.85rem; color: var(--muted); margin-top: -4px; margin-bottom: 12px; }
.subdomain-preview strong { color: var(--brand-dark); }
.hint { font-size: 0.78rem; color: var(--muted); margin: -4px 0 4px; line-height: 1.4; }
.field-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 18px 0;
  background: #fbfdfc;
}
.field-group h4 { margin: 0 0 4px; font-size: 0.92rem; }
.field-group > p.explain { margin: 0 0 12px; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.domain-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.domain-compare .opt {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fff;
}
.domain-compare .opt h5 { margin: 0 0 4px; font-size: 0.82rem; color: var(--brand-dark); }
.domain-compare .opt p { margin: 0; font-size: 0.76rem; color: var(--muted); line-height: 1.4; }
.logo-upload-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.logo-preview {
  width: 64px; height: 64px; border-radius: 10px; border: 1px dashed var(--border);
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--muted); overflow: hidden; flex-shrink: 0;
}
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
#state-loading, #state-error, #state-done { text-align: center; padding: 40px 20px; }
#state-error { color: var(--danger); }
#state-done .live-link {
  display: inline-block; margin-top: 8px; font-weight: 600;
}

/* ---------------------------------------------------------------------
   Partner onboarding (whitelabel + affiliate) — step flow, agreement box
------------------------------------------------------------------- */
.step-indicator {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.step-indicator .step-dot {
  display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted);
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff;
}
.step-indicator .step-dot.active { color: var(--brand-dark); border-color: var(--brand); background: #eef6f2; font-weight: 600; }
.step-indicator .step-dot.done { color: var(--brand-dark); }
.step-panel.hidden { display: none !important; }

.agreement-box {
  max-height: 340px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; background: #fbfdfc; font-size: 0.85rem; line-height: 1.55; margin-bottom: 14px;
}
.agreement-box h2, .agreement-box h3, .agreement-box h4 { margin: 14px 0 6px; color: var(--brand-dark); }
.agreement-box h2:first-child, .agreement-box h3:first-child { margin-top: 0; }
.agreement-box p { margin: 0 0 8px; }
.agreement-box ul { margin: 0 0 10px; padding-left: 20px; }
.agreement-box li { margin-bottom: 4px; }
.agreement-box hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.agreement-disclaimer {
  font-size: 0.78rem; color: var(--muted); background: #fff8ea; border: 1px solid #f0dfa8;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; line-height: 1.5;
}
.consent-row {
  display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; padding: 12px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
}
.consent-row input[type=checkbox] { width: auto; margin-top: 3px; flex-shrink: 0; }
.consent-row label { margin: 0; color: var(--text); font-size: 0.85rem; line-height: 1.5; }
.referral-code-box {
  display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--brand);
  border-radius: 10px; background: #eef6f2; margin: 14px 0;
}
.referral-code-box code { font-size: 1.05rem; padding: 4px 10px; }
.provider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .provider-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------
   Staff dashboard
------------------------------------------------------------------- */
.dash-shell {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 70vh;
}
.dash-sidebar {
  width: 230px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 57px;
  max-height: calc(100vh - 57px);
  display: flex;
  flex-direction: column;
}
.dash-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 0;
}
.dash-sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}
.dash-sidebar .group-label {
  padding: 14px 20px 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.dash-sidebar button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 9px 20px;
  font-size: 0.87rem;
  color: var(--text);
  opacity: 0.72;
  border-left: 3px solid transparent;
  font-family: inherit;
}
.dash-sidebar button:hover { opacity: 1; background: var(--brand-light); }
.dash-sidebar button.active {
  opacity: 1;
  font-weight: 600;
  border-left-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-dark);
}
.dash-content {
  flex: 1;
  padding: 26px 28px 60px;
  min-width: 0;
}
.dash-content .dash-panel.hidden { display: none; }
.dash-panel h2 { margin: 0 0 4px; font-size: 1.35rem; }
.dash-panel .dash-sub { margin: 0 0 20px; color: var(--muted); font-size: 0.88rem; }
.dash-login-gate { max-width: 440px; margin: 60px auto; text-align: center; }
.dash-login-gate .card { text-align: left; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.stat-card .num { font-size: 1.55rem; font-weight: 700; color: var(--brand-dark); line-height: 1.2; }
.stat-card .label { font-size: 0.76rem; color: var(--muted); margin-top: 4px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin-top: 12px; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; }
.data-table tbody tr:hover { background: #fafcfb; }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-ok { background: #eaf3ef; color: var(--brand-dark); }
.badge-warn { background: #fdf1e2; color: #92600a; }
.badge-danger { background: #fbe9e7; color: var(--danger); }
.badge-muted { background: #eef1f0; color: var(--muted); }

.role-note {
  background: #fff8e6;
  border: 1px solid #f0dca0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: #7a5c00;
  margin-bottom: 16px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 .card { margin-bottom: 0; }

@media (max-width: 760px) {
  .dash-shell { flex-direction: column; }
  .dash-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: visible;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .dash-sidebar-nav {
    display: flex;
    flex: 1;
    overflow-x: auto;
    padding: 8px 0;
    min-width: 0;
  }
  .dash-sidebar-footer {
    flex-shrink: 0;
    border-top: none;
    border-left: 1px solid var(--border);
    padding: 8px 12px;
    display: flex;
    align-items: center;
  }
  .dash-sidebar .group-label { display: none; }
  .dash-sidebar button { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
  .dash-sidebar button.active { border-left: none; border-bottom-color: var(--brand); }
  .dash-content { padding: 20px 16px 50px; }
  .grid-2 { grid-template-columns: 1fr; }
}
