:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --ink: #162033;
  --muted: #667085;
  --line: #d6dde7;
  --primary: #0f766e;
  --primary-dark: #134e4a;
  --accent: #d97706;
  --danger: #be123c;
  --shadow: 0 16px 40px rgba(22, 32, 51, .08);
  --shadow-soft: 0 8px 24px rgba(22, 32, 51, .06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #f8faf9 0, var(--bg) 360px);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}
.brand { font-weight: 900; font-size: 20px; color: var(--primary-dark); }
.topbar nav { display: flex; align-items: center; gap: 8px; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a, .topbar .link-button { border-radius: 6px; padding: 8px 10px; }
.topbar nav a.active { background: #e6f0ef; color: var(--primary-dark); font-weight: 800; }
.topbar form { margin: 0; }
.shell { max-width: 1180px; margin: 0 auto; padding: 32px 24px 56px; }
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading h1 { font-size: 36px; line-height: 1.08; margin: 0; letter-spacing: 0; }
.eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #0f8178, var(--primary));
  color: white;
  min-height: 40px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .18);
}
.button.secondary { background: #e8f1ef; color: var(--primary-dark); box-shadow: none; }
.button.danger { background: linear-gradient(180deg, #d61f4d, var(--danger)); box-shadow: 0 8px 18px rgba(190, 18, 60, .16); }
.button.small { min-height: 32px; padding: 0 12px; }
.button[disabled], button[disabled] { opacity: .45; cursor: not-allowed; }
.link-button { background: transparent; color: var(--muted); padding: 0; min-height: auto; box-shadow: none; }
.flash-stack { display: grid; gap: 10px; margin-bottom: 22px; }
.flash { padding: 12px 14px; background: #e6f0ef; border: 1px solid #bad7d4; border-radius: 6px; box-shadow: var(--shadow-soft); }
.flash.error { background: #fee4e2; border-color: #fda29b; }
.auth-panel { max-width: 560px; margin: 44px auto; }
.form-card, .panel, .email-item, .price-card, .metric, .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.form-card { display: grid; gap: 16px; padding: 22px; }
.form-card.narrow { max-width: 560px; }
.form-card.compact-form { margin: 14px 0 24px; }
.stacked-form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: white;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
  outline: none;
}
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; }
.hero-band {
  min-height: calc(100vh - 160px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  align-items: center;
  gap: 42px;
  margin: -6px 0 40px;
}
.hero-copy h1 { font-size: 76px; line-height: .95; margin: 0 0 18px; }
.hero-subtitle { font-size: 21px; line-height: 1.55; color: #475467; max-width: 720px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.product-console {
  background: #101828;
  color: white;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .22);
}
.console-bar { display: flex; gap: 7px; margin-bottom: 18px; }
.console-bar span { width: 11px; height: 11px; border-radius: 50%; background: #667085; }
.console-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.console-grid div, .console-email { background: #1d2939; border: 1px solid #344054; border-radius: 6px; padding: 14px; }
.console-grid small { color: #98a2b3; display: block; margin-bottom: 8px; }
.console-grid strong { font-size: 18px; }
.console-email h2 { font-size: 20px; margin: 14px 0 10px; }
.console-email p { color: #d0d5dd; line-height: 1.55; }
.logo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 0 38px;
  color: var(--muted);
  font-weight: 800;
}
.section-heading { margin: 44px 0 18px; max-width: 780px; }
.section-heading h2 { font-size: 34px; line-height: 1.2; }
.feature-grid, .workflow, .roadmap-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 34px;
}
.feature, .workflow article, .roadmap-list article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.workflow article span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e6f0ef;
  color: var(--primary-dark);
  font-weight: 900;
  margin-bottom: 14px;
}
.feature-list { padding-left: 18px; color: #475467; line-height: 1.8; min-height: 172px; }
.price-card.featured { border-color: var(--primary); box-shadow: 0 18px 46px rgba(17, 100, 102, .15); }
.comparison-table { margin-top: 28px; }
.comparison-table .row { grid-template-columns: repeat(4, 1fr); }
.comparison-table .header { font-weight: 900; color: var(--primary-dark); }
.selected-plan { color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; margin-bottom: 28px; }
.metric-grid.compact { grid-template-columns: repeat(6, 1fr); }
.metric { padding: 18px; }
a.metric { display: block; transition: border-color .15s ease, box-shadow .15s ease; }
a.metric:hover { border-color: rgba(15, 118, 110, .45); box-shadow: var(--shadow); }
.metric span { display: block; color: var(--muted); font-size: 13px; }
.metric strong { display: block; font-size: 28px; margin-top: 8px; }
.action-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 28px; }
.action-list { display: grid; gap: 10px; }
.action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfe;
}
.action-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.45;
}
.action-row:hover {
  border-color: rgba(15, 118, 110, .35);
  box-shadow: var(--shadow-soft);
}
.action-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.action-tile span, .section-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e6f0ef;
  color: var(--primary-dark);
  font-weight: 900;
}
.action-tile small { grid-column: 2; color: var(--muted); line-height: 1.45; }
.workflow-note { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; color: var(--muted); border-left: 4px solid var(--accent); }
.workflow-note strong { color: var(--ink); }
.scenario-strip { display: grid; gap: 14px; margin: 0 0 24px; }
.scenario-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--surface);
  border: 1px solid rgba(15, 118, 110, .24);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.scenario-card h2 { margin: 10px 0 8px; }
.scenario-card p { color: var(--muted); line-height: 1.55; margin: 0; max-width: 860px; }
.scenario-note {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(15, 118, 110, .24);
  border-radius: 8px;
  padding: 14px;
  background: #f8faf9;
}
.scenario-note p { color: var(--muted); margin: 0; line-height: 1.5; }
.strategy-list { display: grid; gap: 12px; }
.strategy-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfe;
}
.source-status-list { margin-top: 16px; }
.strategy-list h3 { margin: 9px 0 6px; }
.strategy-list p { color: var(--muted); line-height: 1.5; margin: 0; }
.advanced-block {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfe;
}
.advanced-block summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--primary-dark);
}
.advanced-block[open] summary { margin-bottom: 4px; }
.compact-source-list { max-height: 220px; overflow: auto; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.section-title h2 { margin: 0; }
.split { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; margin-bottom: 28px; }
.panel { padding: 20px; }
.table { display: grid; gap: 8px; }
.row {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(22, 32, 51, .035);
}
.row:hover, .card:hover, .conversation-card:hover, .action-tile:hover {
  border-color: rgba(15, 118, 110, .35);
  box-shadow: var(--shadow);
}
.admin-table .row { grid-template-columns: 1fr .6fr 1fr 1.4fr; }
.lead-table .row { grid-template-columns: 1fr 1fr .7fr .45fr auto; }
.method-table .row { grid-template-columns: .55fr 1fr minmax(360px, 1.8fr) auto; }
.method-table small { display: block; color: var(--muted); margin-top: 3px; }
.ledger-table { display: grid; gap: 8px; }
.ledger-table .row { grid-template-columns: .8fr .5fr .45fr 1.5fr; }
.ledger-table .header { font-weight: 900; color: var(--primary-dark); }
.positive { color: var(--primary); }
.negative { color: var(--danger); }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  background: #eef4f2;
  color: var(--primary-dark);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  width: fit-content;
}
.card-grid, .pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card, .price-card { padding: 20px; transition: border-color .15s ease, box-shadow .15s ease; }
.card h2, .price-card h2 { margin: 14px 0 10px; }
.price-card strong { display: block; font-size: 32px; margin-bottom: 10px; }
.price-card span { font-size: 15px; color: var(--muted); }
.queue-list { display: grid; gap: 16px; }
.email-item { padding: 20px; }
.conversation-list { display: grid; gap: 14px; margin-bottom: 28px; }
.sequence-list { display: grid; gap: 14px; margin-bottom: 18px; }
.sequence-step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.sequence-step-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.sequence-step-heading h3 { margin: 8px 0 0; }
.sequence-step-heading .actions { margin-top: 0; }
.analytics-band { margin: 28px 0; }
.analytics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.billing-summary { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.detail-list { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; align-items: center; }
.detail-list.compact-details { grid-template-columns: auto 1fr; margin: 14px 0; }
.detail-list span, .credit-stack span, .credit-stack small { color: var(--muted); }
.detail-list strong { min-width: 0; overflow-wrap: anywhere; }
.meter { height: 10px; overflow: hidden; border-radius: 999px; background: #eef1f6; margin: 14px 0; }
.meter span { display: block; height: 100%; max-width: 100%; background: var(--primary); }
.credit-stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.credit-stack div { border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.credit-stack strong { display: block; font-size: 28px; margin: 5px 0; }
.compact-heading { margin-top: 0; }
.stat-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stat-line span { color: var(--muted); text-transform: capitalize; }
.stat-line strong { color: var(--ink); }
.conversation-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.briefing-preview {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.briefing-preview p { margin: 0; color: #475467; line-height: 1.45; }
.briefing-preview strong { color: var(--ink); }
.touch-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.touch-strip span { background: #eef1f6; border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 800; color: #344054; }
.timeline { display: grid; gap: 14px; }
.timeline-item { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.timeline-item.inbound { border-color: var(--primary); background: #f5fbfa; }
.email-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); margin-bottom: 12px; }
.email-body { padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.task-body { white-space: pre-wrap; font: inherit; line-height: 1.55; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.actions, .inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.method-table .inline-form { margin-top: 0; }
.inline-form input { max-width: 120px; }
.inline-form select { max-width: 180px; }
.compact-check { font-size: 13px; font-weight: 700; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.list-row .button { min-height: 32px; padding: 0 10px; }
.list-add-form { margin-top: 16px; }
.empty { color: var(--muted); }
.empty-state {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px dashed #b8c2d1;
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.empty-state.compact { padding: 18px; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 620px; }
.error-text { color: var(--danger); font-weight: 700; }

@media (max-width: 900px) {
  .topbar { height: auto; align-items: flex-start; padding: 18px; gap: 14px; }
  .topbar, .topbar nav, .page-heading, .scenario-card { flex-direction: column; }
  .topbar nav { align-items: flex-start; }
  .sequence-step-heading { flex-direction: column; }
  .metric-grid, .metric-grid.compact, .card-grid, .card-grid.two, .pricing-grid, .split, .hero-band, .logo-strip, .feature-grid, .workflow, .roadmap-list, .form-grid, .analytics-grid, .billing-summary, .credit-stack, .action-strip { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 52px; }
  .product-console { width: 100%; }
  .console-grid { grid-template-columns: 1fr; }
  .row, .admin-table .row, .method-table .row { grid-template-columns: 1fr; }
  .comparison-table .row { grid-template-columns: 1fr; }
}
