:root {
  --bg: #eaf5f8;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #637083;
  --line: #d9e0ea;
  --dark: #07111f;
  --green: #10b981;
  --green-soft: #dff8ec;
  --blue: #2f8f5b;
  --amber: #f59e0b;
  --shadow: 0 18px 48px rgba(15, 23, 42, .11);
  --app-shadow: 0 28px 70px rgba(15, 23, 42, .13);
  --accent: #48a86f;
  --accent-2: #2f8f5b;
  --logo-lime: #a8ff38;
  --logo-deep: #173d2a;
  --surface: #f7fbfd;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #cfeff8 0, #eef8fb 380px, #f8fbfc 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  border-radius: 8px;
  display: block;
  height: 34px;
  object-fit: cover;
  width: 34px;
}

.brand-word {
  color: inherit;
  display: inline-block;
  letter-spacing: 0;
}

.login-page {
  background: var(--dark);
}

.login-shell {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-height: 100vh;
  padding: 8vw;
}

.login-copy {
  align-self: center;
  color: white;
  max-width: 720px;
}

.login-copy h1 {
  font-size: clamp(42px, 6vw, 82px);
  line-height: .96;
  margin: 46px 0 22px;
}

.login-copy p {
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.45;
  margin: 0;
}

.auth-kicker {
  color: var(--green) !important;
  font-size: 13px !important;
  font-weight: 900;
  letter-spacing: .08em;
  margin: 42px 0 0 !important;
  text-transform: uppercase;
}

.auth-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-proof strong {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: white;
  font-size: 13px;
  padding: 10px 12px;
}

.login-card {
  align-self: center;
  background: white;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 24px;
}

.login-card h2 {
  font-size: 26px;
  line-height: 1.1;
  margin: 0;
}

.login-card a {
  color: var(--blue);
  font-weight: 800;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 0 12px;
}

select {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 0 12px;
}

button {
  background: var(--dark);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 900;
  min-height: 44px;
  padding: 0 16px;
}

.button-link {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-weight: 900;
  min-height: 44px;
  padding: 0 16px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 4px 0 0;
}

.auth-message {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #9f1239;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  padding: 11px 12px;
}

.auth-message.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #065f46;
}

.auth-message.waiting {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  align-items: center;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.tab-nav {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
}

.tab-nav a,
.logout {
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 12px;
  white-space: nowrap;
}

.tab-nav a.active {
  background: var(--dark);
  color: white;
}

.logout {
  border: 1px solid var(--line);
  color: var(--ink);
}

.dashboard {
  margin: 0 auto;
  max-width: 1220px;
  padding: 20px 18px 92px;
  width: 100%;
}

.bottom-tabs {
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--line);
  bottom: 0;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  left: 0;
  padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  position: fixed;
  right: 0;
  z-index: 30;
}

.bottom-tabs a {
  align-items: center;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 3px;
  justify-items: center;
  min-height: 42px;
  padding: 7px 4px;
  text-align: center;
}

.bottom-tabs svg {
  display: block;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 18px;
}

.bottom-tabs span {
  display: block;
  line-height: 1;
}

.bottom-tabs a.active {
  background: rgba(16, 185, 129, .14);
  color: var(--dark);
}

.module-view {
  display: none;
}

.module-view.active {
  display: block;
}

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

.topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-switcher {
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(170, 186, 202, .55);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px 6px 12px;
  white-space: nowrap;
}

.source-switcher span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.source-switcher select {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  min-height: 32px;
  min-width: 190px;
  padding: 0 30px 0 10px;
}

.source-switcher.is-active {
  border-color: #bbf7d0;
}

.help-button {
  background: #effdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: var(--logo-deep);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  min-height: 42px;
  padding: 0 14px;
}

.help-button.active {
  background: var(--logo-deep);
  border-color: var(--logo-deep);
  color: #fff;
}

.dashboard-help-panel {
  background: linear-gradient(135deg, #effdf5, #ffffff);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
  margin: -4px 0 14px;
  padding: 16px;
}

.dashboard-help-panel h2 {
  font-size: 20px;
  margin: 0 0 8px;
}

.dashboard-help-panel p:last-child {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1 {
  font-size: 36px;
  letter-spacing: 0;
  line-height: 1.02;
  margin: 0 0 6px;
}

.topbar span,
.empty {
  color: var(--muted);
}

.status,
.panel,
.metrics article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status {
  color: var(--muted);
  margin-bottom: 16px;
  padding: 14px 16px;
}

.status:empty {
  display: none;
}

.status.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #065f46;
}

.status.error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.status.waiting {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.period-panel {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, .5fr) minmax(0, 1fr);
  margin-bottom: 14px;
  padding: 12px 14px;
}

.period-summary {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.period-date-badge {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  flex: 0 0 54px;
  height: 54px;
  justify-items: center;
  overflow: hidden;
}

.period-date-badge span {
  background: #f1f5f9;
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 0;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
}

.period-date-badge strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.decision-strip,
.source-choice {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.decision-strip article,
.source-choice article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
}

.decision-strip small,
.source-choice small {
  align-items: center;
  background: #ecfdf5;
  border-radius: 8px;
  color: #047857;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.source-choice small {
  background: #eef4ff;
  color: var(--blue);
  padding: 0 9px;
  width: max-content;
}

.decision-strip strong,
.source-choice strong {
  font-size: 18px;
}

.decision-strip span,
.source-choice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.period-panel .eyebrow {
  margin-bottom: 4px;
}

.period-panel strong {
  display: block;
  font-size: 16px;
}

.period-summary div:last-child {
  min-width: 0;
}

.period-summary #periodRangeLabel {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 3px;
}

.period-controls {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.period-controls button,
.period-controls select,
.custom-period button {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  min-height: 36px;
  padding: 6px 9px;
}

.period-controls button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.custom-period {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr auto;
  justify-self: end;
  width: 100%;
}

.custom-period label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 4px;
  text-transform: uppercase;
}

.custom-period input {
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  min-height: 36px;
  padding: 8px 10px;
}

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

.metrics article {
  min-height: 118px;
  padding: 16px;
}

.metrics small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  font-size: 30px;
  margin-bottom: 8px;
}

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

.loading-card strong,
.loading-box strong {
  animation: pulseText 1.2s ease-in-out infinite;
}

@keyframes pulseText {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

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

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

.overview-mobile-tabs {
  display: none;
}

.panel {
  padding: 18px;
}

.panel h2 {
  font-size: 20px;
  margin: 0 0 14px;
}

.panel-copy,
.section-panel p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 14px;
}

.section-panel {
  display: grid;
  gap: 16px;
}

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

.recovery-tabs {
  display: flex;
  gap: 8px;
  margin: -6px 0 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.recovery-tab {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-weight: 900;
  min-height: 38px;
  padding: 8px 16px;
}

.recovery-tab.active {
  background: var(--dark);
  border-color: var(--dark);
  color: white;
}

.recovery-tab-content {
  display: none;
}

.recovery-tab-content.active {
  display: block;
}

.recovery-create-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
}

.recovery-list {
  display: grid;
  gap: 10px;
}

.recovery-empty {
  background: #f8fafc;
  border: 1px dashed #b8c3d3;
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
}

.recovery-list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.recovery-list-item strong {
  font-size: 16px;
}

.recovery-list-item span,
.recovery-list-item em {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.recovery-list-item em {
  display: block;
  font-style: normal;
}

.recovery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.recovery-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.status-tag {
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.status-tag.muted {
  background: #64748b;
}

.status-tag.success {
  background: #10b981;
}

.status-tag.warning {
  background: #f59e0b;
}

.status-tag.error {
  background: #ef4444;
}

.status-tag.waiting {
  background: #0ea5e9;
}

.status-tag.info {
  background: #6366f1;
}

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

.recovery-asset-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.recovery-asset-cover {
  aspect-ratio: 16 / 9;
  background: #eef2f7 center / cover no-repeat;
  border-radius: 6px;
}

.recovery-asset-card strong {
  display: block;
}

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

.recovery-form {
  background: #fcfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.module-question {
  background: transparent;
  margin-bottom: 14px;
  max-width: 840px;
  padding: 4px 0 0;
}

.module-question h2 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  margin: 0 0 10px;
}

.module-question p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
  margin: 0;
}

.waiting-state {
  background: #f8fafc;
  border: 1px dashed #b8c3d3;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 14px;
}

.waiting-state strong {
  color: var(--ink);
}

.waiting-state span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.action-list,
.module-summary,
.business-list,
.question-status-list {
  display: grid;
  gap: 10px;
}

.action-item,
.module-summary,
.business-row,
.question-status-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.action-item strong,
.module-summary strong,
.business-row strong,
.question-status-list strong {
  display: block;
  margin-bottom: 4px;
}

.action-item span,
.module-summary span,
.business-row span,
.question-status-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.decision-panel {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.answer-hero {
  background: var(--dark);
  border-radius: 8px;
  color: #fff;
  display: grid;
  gap: 8px;
  padding: 22px;
}

.executive-answer {
  align-items: end;
  background:
    radial-gradient(circle at 85% 15%, rgba(16, 185, 129, .28), transparent 34%),
    linear-gradient(135deg, #07111f, #152338);
  border-radius: 8px;
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(20px, 4vw, 34px);
}

.executive-answer h3 {
  font-size: clamp(28px, 4.5vw, 52px);
  line-height: 1.02;
  margin: 0 0 12px;
}

.executive-answer p {
  color: #d6dee9;
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}

.executive-answer > strong {
  color: #fff;
  font-size: clamp(32px, 5vw, 58px);
  line-height: .95;
  text-align: right;
  white-space: nowrap;
}

.sales-answer {
  background:
    radial-gradient(circle at 85% 15%, rgba(37, 99, 235, .34), transparent 34%),
    linear-gradient(135deg, #07111f, #172033);
}

.answer-hero h3 {
  color: #c7d2fe;
  font-size: 20px;
  line-height: 1.15;
  margin: 0;
}

.answer-hero strong {
  display: block;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: 0;
  line-height: 1;
}

.answer-hero p {
  color: #d6dee9;
  font-size: 15px;
  margin: 0;
}

.answer-label {
  color: #55c690;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.retention-answer {
  background: linear-gradient(135deg, #07111f, #113329);
}

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

.answer-card,
.people-panel,
.campaign-panel,
.detail-block {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.answer-card {
  background: #f8fafc;
  display: grid;
  gap: 7px;
  padding: 16px;
}

.answer-card small {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.answer-card strong {
  font-size: 24px;
  line-height: 1.1;
}

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

.detail-block {
  background: #fff;
  overflow: hidden;
  padding: 0;
}

.detail-block h3,
.people-panel h3 {
  font-size: 16px;
  margin: 0 0 12px;
}

.people-panel,
.campaign-panel {
  background: #fff;
  overflow: hidden;
  padding: 0;
}

.detail-header {
  align-items: end;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 14px 16px;
}

.detail-header span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-header strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  text-align: right;
}

.business-list {
  margin: 0;
  padding: 14px 16px 0;
}

.business-list:last-child {
  padding-bottom: 16px;
}

.business-list h3 {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.compact-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.3fr) minmax(90px, .55fr) minmax(90px, .55fr);
  min-height: 42px;
}

.compact-row span,
.compact-row strong,
.compact-row em {
  min-width: 0;
}

.compact-row span {
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.compact-row strong {
  color: var(--ink);
  font-size: 14px;
  margin: 0;
  text-align: right;
}

.compact-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  text-align: right;
}

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

.campaign-card {
  background:
    linear-gradient(180deg, #f8fafc, #fff);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.campaign-card h3 {
  font-size: 20px;
  margin: 0;
}

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

.campaign-segment {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.message-template,
.campaign-reason {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.message-template strong,
.campaign-reason strong {
  font-size: 13px;
}

.message-template span,
.campaign-reason span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.campaign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campaign-actions button {
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  padding: 9px 12px;
}

.campaign-link {
  align-items: center;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #065f46;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  min-height: 38px;
  padding: 9px 12px;
}

.campaign-link.disabled {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
  opacity: .75;
}

.campaign-link.warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.campaign-link.pay {
  background: linear-gradient(135deg, var(--logo-deep), var(--accent));
  border-color: transparent;
  color: #fff;
}

.campaign-actions button.is-loading {
  cursor: wait;
  opacity: .72;
}

.campaign-audience {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}

.audience-list {
  display: grid;
  gap: 10px;
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
}

.audience-item {
  align-items: stretch;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px;
}

.audience-item strong,
.audience-item span,
.audience-item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.audience-person {
  align-content: center;
  display: grid;
  gap: 4px;
}

.audience-person strong {
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.audience-person span {
  color: #526173;
  font-size: 15px;
  font-weight: 800;
}

.audience-person small {
  color: #0f172a;
  font-size: 15px;
}

.audience-actions {
  align-content: center;
  align-items: end;
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 150px;
}

.audience-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-width: 92px;
  padding: 9px 14px;
}

.audience-status.pending {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.audience-status.viewed {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
}

.audience-status.converted {
  background: #ecfdf3;
  border: 1px solid #86efac;
  color: var(--logo-deep);
}

.audience-status.paid {
  background: #dcfce7;
  border: 1px solid #22c55e;
  color: #14532d;
}

.audience-views {
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .audience-item {
    grid-template-columns: 1fr;
  }

  .audience-actions {
    align-items: stretch;
    justify-items: stretch;
    min-width: 0;
  }

  .audience-status {
    width: max-content;
  }
}

.payment-provider-note {
  background: #effdf5;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  color: var(--logo-deep);
  display: grid;
  gap: 4px;
  padding: 12px;
}

.payment-provider-note span {
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
}

.membership-price-config {
  background: linear-gradient(180deg, #f1fbf5 0%, #ffffff 100%);
  border: 1px solid #b8ecc8;
  border-radius: 22px;
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 18px;
}

.membership-price-config h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.membership-price-config p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.membership-price-config textarea {
  min-height: 132px;
  resize: vertical;
}

.membership-price-status {
  border-radius: 16px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  padding: 12px 14px;
}

.membership-price-status.empty {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.membership-price-status.saved {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: var(--logo-deep);
}

.membership-price-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.membership-example-button,
.membership-save-button {
  justify-content: center;
}

.membership-save-button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--logo-deep), var(--logo-green));
  color: #fff;
  font-weight: 900;
  padding: 14px 16px;
}

@media (max-width: 640px) {
  .membership-price-actions {
    grid-template-columns: 1fr;
  }
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: -2px 0 0;
}

.source-list {
  display: grid;
  gap: 10px;
}

.sources-question {
  max-width: 920px;
}

.source-choice-expanded {
  gap: 16px;
}

.source-choice-expanded article {
  min-height: 132px;
  padding: 18px;
}

.sources-layout {
  align-items: start;
  grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
}

.source-list-panel,
.source-config-panel {
  min-width: 0;
}

.source-config-panel {
  padding: 24px;
}

.source {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px;
}

.source span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
}

.source-actions {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 260px;
}

.source .source-status-active {
  color: var(--green);
}

.source-secret-ok,
.source-secret-missing {
  font-size: 11px;
  font-weight: 800;
}

.source-secret-ok {
  color: var(--green);
}

.source-secret-missing {
  color: #ef4444;
}

.source-edit,
.source-delete,
.source-test {
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  padding: 9px 12px;
}

.source-edit {
  background: #eef4ff;
  color: var(--blue);
}

.source-delete {
  background: #fff1f2;
  color: #be123c;
}

.source strong {
  display: grid;
  gap: 3px;
}

.source small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.config-grid {
  margin-top: 16px;
}

.account-grid {
  align-items: start;
}

.config-form {
  display: grid;
  gap: 10px;
}

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

.source-config-panel .config-form label,
.source-config-panel .config-form input,
.source-config-panel .config-form select,
.source-config-panel .config-form button,
.source-config-panel .config-form .button-link {
  min-width: 0;
}

.source-config-panel .config-form label {
  grid-column: auto;
}

.source-config-panel .config-form input,
.source-config-panel .config-form select {
  width: 100%;
}

.source-config-panel .config-form button,
.source-config-panel .config-form .button-link {
  justify-content: center;
}

.account-source-entry {
  background: #f7fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 16px;
}

.account-source-entry strong {
  font-size: 16px;
}

.account-source-entry span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.account-source-entry button {
  margin-top: 4px;
  width: max-content;
}

.config-form button {
  margin-top: 8px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.report-config-form textarea {
  min-height: 92px;
  resize: vertical;
}

.checkbox-row {
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 10px;
  line-height: 1.25;
  margin: 0;
}

.checkbox-row input {
  height: 18px;
  margin: 0;
  width: 18px;
}

.checkbox-row.muted {
  color: var(--muted);
  cursor: not-allowed;
}

.check-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 4px;
}

.check-grid.compact {
  grid-template-columns: repeat(2, minmax(0, max-content));
}

.internal-channel-card,
.briefing-flow {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  line-height: 1.45;
  padding: 14px;
}

.internal-channel-card strong,
.briefing-flow strong {
  color: var(--ink);
}

.inline-action-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  line-height: 1.45;
  padding: 14px;
}

.inline-action-status strong {
  color: var(--ink);
}

.inline-action-status span {
  color: var(--muted);
}

.inline-action-status.success {
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.inline-action-status.error {
  background: #fff1f2;
  border-color: #fecdd3;
}

.inline-action-status.waiting {
  background: #effdf5;
  border-color: #bbf7d0;
}

.report-preview {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  line-height: 1.45;
  padding: 14px;
}

.report-preview strong {
  color: var(--ink);
}

.csv-wizard,
.webhook-guide {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
}

.wizard-head h3,
.webhook-guide h3 {
  font-size: 18px;
  margin: 0 0 6px;
}

.wizard-head p,
.webhook-guide p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.webhook-guide code,
.webhook-guide pre {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-actions button {
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  min-height: 38px;
}

.csv-insight,
.csv-preview-row {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.csv-insight span,
.csv-preview-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.csv-mapping {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
}

.csv-mapping label {
  align-self: center;
}

.csv-preview {
  display: grid;
  gap: 8px;
}

.landing-page,
.promo-page {
  background: #f8fafc;
}

.landing-nav {
  align-items: center;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 64px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.landing-nav nav {
  align-items: center;
  display: flex;
  gap: 16px;
}

.landing-nav nav a {
  color: var(--muted);
  font-weight: 900;
}

.landing-nav .nav-cta,
.primary-cta,
.secondary-cta {
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  min-height: 44px;
  padding: 12px 16px;
}

.landing-nav .nav-cta,
.primary-cta {
  background: var(--dark);
  color: white;
}

.secondary-cta {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.landing-hero {
  align-items: center;
  display: grid;
  gap: 38px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
  margin: 0 auto;
  max-width: 1180px;
  min-height: calc(94vh - 78px);
  padding: 52px 18px 34px;
}

.product-hero {
  max-width: 1240px;
}

.hero-copy h1,
.promo-landing h1 {
  font-size: clamp(42px, 7vw, 84px);
  line-height: .96;
  margin: 0 0 20px;
  max-width: 850px;
}

.hero-copy p,
.promo-landing p,
.landing-section p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
  margin: 0;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-proof span,
.hero-proof strong {
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  padding: 10px 12px;
}

.hero-proof span {
  background: #ecfdf5;
  color: #047857;
}

.hero-proof strong {
  background: white;
  border: 1px solid var(--line);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-product-shot {
  min-height: 590px;
  position: relative;
}

.gym-photo-card {
  background: #0f172a;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: 510px;
  overflow: hidden;
  position: relative;
}

.gym-photo {
  background:
    linear-gradient(180deg, rgba(7, 17, 31, .08), rgba(7, 17, 31, .72)),
    url("https://images.unsplash.com/photo-1534258936925-c58bed479fcb?auto=format&fit=crop&w=1200&q=82");
  background-position: center;
  background-size: cover;
  height: 100%;
  min-height: 510px;
}

.photo-caption {
  bottom: 18px;
  color: white;
  display: grid;
  gap: 4px;
  left: 18px;
  max-width: 320px;
  position: absolute;
  right: 18px;
}

.photo-caption strong {
  font-size: 24px;
  line-height: 1.05;
}

.photo-caption span {
  color: #dbe7ef;
  line-height: 1.35;
}

.decision-board {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.floating-board {
  bottom: 24px;
  left: -44px;
  max-width: 430px;
  position: absolute;
  width: calc(100% - 46px);
}

.board-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.board-top span,
.board-top strong {
  color: var(--muted);
  font-weight: 900;
}

.board-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.board-metrics article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.board-metrics small,
.board-campaign small,
.email-preview small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.board-metrics strong {
  font-size: 24px;
}

.board-campaign {
  background: var(--green-soft);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 18px;
}

.board-campaign h2,
.landing-section h2 {
  font-size: 34px;
  line-height: 1.05;
  margin: 0 0 12px;
}

.board-loop {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.board-loop span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 10px 6px;
  text-align: center;
}

.section-heading {
  max-width: 760px;
}

.proof-panel {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: -12px auto 16px;
  max-width: 1180px;
  padding: 0 18px 24px;
}

.proof-panel article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
  display: grid;
  gap: 7px;
  padding: 18px;
}

.proof-panel small {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.proof-panel strong {
  font-size: 20px;
}

.proof-panel span {
  color: var(--muted);
  line-height: 1.4;
}

.question-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.question-grid article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.question-grid strong {
  font-size: 18px;
}

.question-grid span {
  color: var(--muted);
  line-height: 1.4;
}

.signal-section {
  padding-top: 46px;
}

.signal-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.signal-grid article {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 230px;
  padding: 20px;
}

.signal-grid small {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.signal-grid strong {
  font-size: 22px;
  line-height: 1.08;
}

.signal-grid span,
.signal-grid em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.4;
}

.signal-grid em {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #065f46;
  font-size: 14px;
  font-weight: 800;
  margin-top: auto;
  padding: 10px;
}

.board-campaign p {
  color: #315c4f;
  line-height: 1.45;
}

.landing-band,
.landing-section,
.promo-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 18px;
}

.landing-band {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.landing-band article,
.csv-flow article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.landing-band span,
.csv-flow span {
  color: var(--muted);
  line-height: 1.4;
}

.split-section {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
}

.email-preview {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  padding: 18px;
}

.email-preview h3,
.email-preview h2 {
  margin: 0 0 10px;
}

.email-preview p {
  color: var(--muted);
  line-height: 1.45;
}

.email-preview a {
  background: var(--green);
  border-radius: 8px;
  color: var(--dark);
  display: inline-flex;
  font-weight: 900;
  margin-top: 12px;
  padding: 12px 14px;
}

.email-hero {
  background:
    linear-gradient(135deg, rgba(16, 185, 129, .85), rgba(37, 99, 235, .68)),
    url("https://images.unsplash.com/photo-1534438327276-14e5300c3a48?auto=format&fit=crop&w=900&q=80");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  height: 180px;
  margin-bottom: 16px;
}

.email-hero.gym {
  height: 220px;
}

.csv-flow,
.promo-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.promo-landing {
  background:
    linear-gradient(90deg, rgba(7, 17, 31, .82), rgba(7, 17, 31, .18)),
    url("https://images.unsplash.com/photo-1518611012118-696072aa579a?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  color: white;
  padding: clamp(32px, 8vw, 92px);
}

.promo-landing .eyebrow,
.promo-landing p {
  color: white;
}

.promo-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
}

.phone-message {
  background: #dcfce7;
  border-radius: 8px;
  color: #14532d;
  line-height: 1.45;
  margin-bottom: 14px;
  padding: 16px;
}

.recovery-conversion-page {
  background:
    radial-gradient(circle at 18% 8%, rgba(168, 255, 56, .24), transparent 23rem),
    radial-gradient(circle at 84% 20%, rgba(72, 168, 111, .16), transparent 28rem),
    linear-gradient(180deg, #dcefe8 0, #f4f8f3 52%, #e8f1ec 100%);
  color: var(--ink);
  min-height: 100svh;
}

.recovery-phone-shell {
  display: grid;
  min-height: 100svh;
  overflow-x: hidden;
  padding: clamp(18px, 3vw, 34px);
  place-items: center;
}

.recovery-conversion-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(23, 60, 42, .1);
  border-radius: 38px;
  box-shadow: 0 30px 90px rgba(23, 60, 42, .18);
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(390px, .72fr);
  max-height: calc(100svh - 44px);
  max-width: min(1120px, calc(100vw - 48px));
  min-height: min(720px, calc(100svh - 44px));
  overflow: hidden;
  position: relative;
  width: 100%;
}

.recovery-public-bar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 18px;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 4;
}

.recovery-public-brand {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-weight: 950;
  gap: 10px;
  padding: 8px 13px 8px 8px;
  text-decoration: none;
}

.recovery-public-brand img {
  border-radius: 12px;
  height: 34px;
  width: 34px;
}

.recovery-conversion-hero {
  background-position: center;
  background-size: cover;
  min-height: 100%;
  position: relative;
}

.recovery-conversion-hero::after {
  background:
    linear-gradient(180deg, rgba(7, 17, 31, .08), rgba(7, 17, 31, .38)),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .16));
  content: "";
  inset: 0;
  position: absolute;
}

.recovery-hero-pill {
  background: rgba(255, 255, 255, .9);
  border-radius: 999px;
  bottom: 22px;
  color: var(--logo-deep);
  font-size: 12px;
  font-weight: 950;
  left: 22px;
  letter-spacing: .08em;
  padding: 10px 13px;
  position: absolute;
  text-transform: uppercase;
  z-index: 2;
}

.recovery-close {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 31, .72);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 32px;
  font-weight: 300;
  height: 48px;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  width: 48px;
}

.recovery-conversion-body {
  align-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 243, .98));
  display: grid;
  gap: 16px;
  max-height: calc(100svh - 44px);
  min-width: 0;
  min-height: 520px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 104px clamp(24px, 4vw, 48px) calc(32px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 2;
}

.recovery-people-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  overflow: hidden;
}

.recovery-people-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recovery-people-row strong {
  background: #effdf5;
  border-radius: 999px;
  color: #111;
  max-width: 52%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  padding: 7px 10px;
  text-align: right;
}

.recovery-conversion-body h1 {
  color: #151515;
  font-size: clamp(32px, 3.8vw, 52px);
  letter-spacing: 0;
  line-height: .98;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.recovery-conversion-body p {
  color: #5f6b7a;
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.recovery-benefit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recovery-benefit-grid span {
  background: #f5f7f9;
  border-radius: 999px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  white-space: normal;
}

.recovery-price-card {
  background: linear-gradient(135deg, #effdf5, #ffffff);
  border: 1px solid rgba(47, 143, 91, .16);
  border-radius: 24px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 18px;
}

.recovery-price-card small {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.recovery-price-card strong {
  color: var(--logo-deep);
  font-size: clamp(30px, 3.8vw, 44px);
  letter-spacing: 0;
  line-height: 1;
  overflow-wrap: anywhere;
}

.recovery-price-card span {
  color: #5f6b7a;
  font-size: 14px;
  font-weight: 800;
}

.recovery-payment-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  min-width: 0;
}

.payment-cta {
  align-items: center;
  border-radius: 16px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 950;
  justify-content: center;
  line-height: 1.18;
  min-height: 54px;
  min-width: 0;
  padding: 14px;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
}

.payment-cta.clip {
  background: linear-gradient(135deg, var(--logo-deep), var(--accent));
  color: #fff;
}

.payment-cta.paypal {
  background: #eef6ff;
  color: #073b78;
}

.recovery-conversion-form {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  position: relative;
}

.recovery-conversion-form .primary-cta {
  background: #07111f;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(7, 17, 31, .16);
  font-size: 14px;
  justify-content: center;
  letter-spacing: .08em;
  line-height: 1.18;
  min-height: 62px;
  padding: 18px 24px;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
  white-space: normal;
  word-break: break-word;
}

.secondary-lead-cta {
  background: transparent;
  border: 0;
  color: #667085;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  padding: 4px;
  text-align: center;
}

.recovery-conversion-form .primary-cta:disabled {
  background: linear-gradient(90deg, var(--logo-deep), var(--accent));
  opacity: 1;
}

.recovery-conversion-body .landing-footnote {
  color: #8a94a3;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.recovery-payment-notice {
  border-radius: 18px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.recovery-payment-notice.success {
  background: #ecfdf3;
  border: 1px solid #86efac;
  color: var(--logo-deep);
}

.recovery-payment-notice.error {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

@media (max-width: 760px) {
  .recovery-conversion-page {
    background:
      radial-gradient(circle at 50% -8%, rgba(168, 255, 56, .24), transparent 18rem),
      linear-gradient(180deg, #d7edf0 0, #edf6f1 42%, #e7f0ea 100%);
  }

  .recovery-phone-shell {
    padding: 0;
  }

  .recovery-conversion-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: block;
    max-width: none;
    min-height: 100svh;
  }

  .recovery-public-bar {
    padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
  }

  .recovery-public-brand {
    font-size: 15px;
    max-width: calc(100vw - 86px);
    min-width: 0;
  }

  .recovery-public-brand span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .recovery-public-brand img {
    height: 32px;
    width: 32px;
  }

  .recovery-close {
    height: 44px;
    width: 44px;
  }

  .recovery-conversion-hero {
    min-height: 56svh;
  }

  .recovery-hero-pill {
    bottom: 86px;
    left: 18px;
  }

  .recovery-conversion-body {
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -22px 55px rgba(7, 17, 31, .16);
    gap: 14px;
    margin-top: -66px;
    max-height: none;
    min-height: 44svh;
    overflow: visible;
    padding: 24px 22px calc(42px + env(safe-area-inset-bottom));
  }

  .recovery-conversion-body h1 {
    font-size: clamp(32px, 10.5vw, 46px);
    line-height: 1;
  }

  .recovery-people-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .recovery-people-row strong {
    max-width: 100%;
    text-align: left;
  }

  .recovery-conversion-form {
    margin-top: 18px;
  }

  .recovery-conversion-form .primary-cta {
    border-radius: 24px;
    font-size: 13px;
    letter-spacing: .18em;
    min-height: 68px;
    padding: 18px 16px;
  }

  .recovery-payment-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .recovery-conversion-card {
    grid-template-columns: minmax(0, .82fr) minmax(360px, .7fr);
  }

  .recovery-conversion-body {
    padding-left: 28px;
    padding-right: 28px;
  }
}

@media (max-width: 920px) {
  .login-shell,
  .metrics,
  .grid,
  .overview-grid,
  .decision-strip,
  .source-choice,
  .period-panel,
  .landing-hero,
  .proof-panel,
  .landing-band,
  .split-section,
  .question-grid,
  .signal-grid,
  .csv-flow,
  .promo-grid {
    grid-template-columns: 1fr;
  }

  .custom-period {
    grid-template-columns: 1fr;
    justify-self: stretch;
  }

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

  .hero-product-shot {
    min-height: auto;
  }

  .floating-board {
    bottom: auto;
    left: auto;
    margin-top: 14px;
    max-width: none;
    position: relative;
    width: 100%;
  }

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

@media (min-width: 921px) {
  .app-header {
    padding: 16px 28px;
  }

  .dashboard {
    padding: 28px;
  }

  .bottom-tabs {
    display: none;
  }
}

@media (max-width: 720px) {
  .tab-nav-top {
    display: none;
  }

  .app-header {
    padding: 10px 14px;
  }

  .brand {
    font-size: 15px;
  }

  .brand-mark {
    height: 30px;
    width: 30px;
  }

  .logout {
    min-height: 38px;
    padding: 9px 11px;
  }

  .dashboard {
    padding: 16px 14px 92px;
  }

  h1 {
    font-size: 28px;
  }

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

  .metrics article {
    min-height: 108px;
    padding: 14px;
  }

  .metrics strong {
    font-size: 25px;
  }

  .check-grid,
  .check-grid.compact,
  .retention-grid,
  .retention-answer-grid,
  .answer-grid,
  .executive-answer,
  .compact-row,
  .csv-mapping,
  .board-metrics,
  .board-loop {
    grid-template-columns: 1fr;
  }

  .executive-answer > strong {
    text-align: left;
    white-space: normal;
  }

  .landing-nav {
    align-items: flex-start;
    gap: 14px;
  }

  .landing-nav,
  .landing-nav nav {
    flex-wrap: wrap;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 34px;
  }

  .gym-photo-card,
  .gym-photo {
    min-height: 380px;
  }

  .hero-copy p,
  .promo-landing p,
  .landing-section p {
    font-size: 17px;
  }

  .recovery-grid,
  .recovery-create-layout,
  .recovery-asset-grid,
  .sources-layout,
  .source-config-panel .config-form,
  .source {
    grid-template-columns: 1fr;
  }

  .source-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .account-source-entry button {
    width: 100%;
  }
}

/* Revenue app polish: mobile-first operational UI */
.app-shell {
  background: rgba(255, 255, 255, .62);
  min-height: 100vh;
}

.app-header {
  background: rgba(247, 251, 253, .9);
  border-bottom: 1px solid rgba(165, 183, 200, .42);
  backdrop-filter: blur(18px);
}

.tab-nav {
  background: rgba(237, 243, 247, .78);
  border: 1px solid rgba(170, 186, 202, .42);
  border-radius: 8px;
  padding: 5px;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-nav a.active {
  background: #111;
  box-shadow: 0 10px 22px rgba(17, 17, 17, .14);
}

.dashboard {
  max-width: 1180px;
}

.status,
.panel,
.metrics article,
.period-panel,
.decision-strip article,
.source-choice article {
  border-color: rgba(170, 186, 202, .55);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}

.period-controls button.active {
  background: linear-gradient(90deg, var(--logo-deep), var(--accent));
  border-color: transparent;
}

.bottom-tabs {
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid rgba(165, 183, 200, .42);
  box-shadow: 0 -20px 42px rgba(15, 23, 42, .08);
  backdrop-filter: blur(18px);
}

.bottom-tabs a.active {
  background: #effdf5;
  color: var(--dark);
}

.recovery-tabs {
  background: #edf3f7;
  border: 1px solid rgba(170, 186, 202, .52);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: -2px 0 18px;
  overflow-x: auto;
  padding: 6px;
}

.recovery-tab {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  min-height: 50px;
  padding: 8px 12px;
  text-align: center;
}

.recovery-tab.active {
  background: #111;
  box-shadow: 0 14px 28px rgba(17, 17, 17, .18);
  color: #fff;
}

.recovery-tab::before {
  align-items: center;
  background: rgba(72, 168, 111, .16);
  border-radius: 999px;
  color: var(--accent);
  content: "1";
  display: inline-flex;
  font-size: 11px;
  height: 21px;
  justify-content: center;
  margin-right: 7px;
  width: 21px;
}

.recovery-tab:nth-child(2)::before {
  content: "2";
}

.recovery-tab:nth-child(3)::before {
  content: "3";
}

.recovery-tab.active::before {
  background: var(--logo-lime);
  color: #111;
}

.sales-tabs .recovery-tab::before {
  background: rgba(72, 168, 111, .16);
  color: var(--accent);
  content: "$";
}

.sales-tabs .recovery-tab:nth-child(2)::before {
  content: "+";
}

.sales-tabs .recovery-tab:nth-child(3)::before {
  content: "%";
}

.sales-tabs .recovery-tab.active::before {
  background: var(--logo-lime);
  color: #111;
}

.metrics article {
  overflow: hidden;
  position: relative;
}

.metrics article::after {
  background: linear-gradient(90deg, var(--logo-deep), var(--accent));
  border-radius: 99px;
  bottom: 0;
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  width: 68%;
}

.executive-answer,
.sales-answer,
.retention-answer {
  background: linear-gradient(90deg, var(--logo-deep), var(--accent));
}

.business-row {
  background:
    linear-gradient(90deg, rgba(72, 168, 111, .18) var(--bar, 0%), transparent var(--bar, 0%)),
    #fff;
  overflow: hidden;
  position: relative;
}

.business-row::before {
  background: linear-gradient(90deg, var(--logo-deep), var(--accent));
  border-radius: 99px;
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  opacity: .72;
  position: absolute;
  width: var(--bar, 0%);
}

.recovery-list-item,
.answer-card,
.campaign-card,
.source,
.waiting-state,
.inline-action-status,
.report-preview,
.internal-channel-card,
.briefing-flow {
  background-color: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
}

.recovery-create-layout article {
  min-width: 0;
}

.sales-opportunity-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.sales-opportunity-card {
  background: #fff;
  border: 1px solid rgba(170, 186, 202, .55);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
  display: grid;
  gap: 7px;
  min-height: 142px;
  padding: 16px;
}

.sales-opportunity-card small {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sales-opportunity-card strong {
  font-size: 20px;
  line-height: 1.12;
}

.sales-opportunity-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.sales-action-card {
  max-width: 760px;
}

.sales-action-card .campaign-actions button:last-child {
  background: #effdf5;
  color: var(--logo-deep);
}

.compact-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.compact-actions button {
  background: #effdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: var(--logo-deep);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  min-height: 36px;
  padding: 8px 10px;
}

@media (min-width: 921px) {
  .dashboard {
    padding: 30px 28px 40px;
  }
}

@media (max-width: 720px) {
  body {
    background: #cfeff8;
  }

  .app-shell {
    background: #eef7fb;
    margin: 0 auto;
    max-width: 430px;
    min-height: 100vh;
  }

  .app-header {
    border-bottom: 0;
    box-shadow: none;
    position: sticky;
  }

  .topbar {
    margin-bottom: 14px;
  }

  .topbar h1 {
    font-size: 22px;
    line-height: 1.08;
  }

  .topbar p {
    font-size: 15px;
    line-height: 1.25;
  }

  .source-switcher {
    flex: 1 1 100%;
    min-width: 0;
  }

  .source-switcher select {
    min-width: 0;
    width: 100%;
  }

  .topbar-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .source-switcher {
    flex: initial;
  }

  .help-button {
    min-height: 42px;
    padding: 0 12px;
  }

  .dashboard-help-panel {
    margin-top: -2px;
    padding: 14px;
  }

  .dashboard-help-panel h2 {
    font-size: 18px;
  }

  .status,
  .period-panel,
  .panel,
  .metrics article,
  .decision-strip article,
  .source-choice article {
    border-color: rgba(170, 186, 202, .38);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
  }

  .metrics {
    gap: 10px;
  }

  .period-panel {
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
  }

  .period-summary {
    align-items: center;
  }

  .period-date-badge {
    flex-basis: 46px;
    height: 46px;
  }

  .period-panel .eyebrow {
    font-size: 10px;
  }

  .period-panel strong {
    font-size: 15px;
  }

  .period-summary #periodRangeLabel {
    font-size: 12px;
  }

  .period-controls {
    display: flex;
    gap: 8px;
    margin: 0 -2px;
    overflow-x: auto;
    padding: 0 2px 2px;
    scroll-snap-type: x proximity;
  }

  .period-controls button,
  .period-controls select,
  .custom-period button,
  .custom-period input {
    flex: 0 0 auto;
    min-height: 36px;
    min-width: 124px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .custom-period {
    grid-template-columns: 1fr 1fr;
  }

  .custom-period button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .decision-strip {
    display: flex;
    gap: 10px;
    margin: 0 -14px 12px;
    overflow-x: auto;
    padding: 0 14px 4px;
    scroll-snap-type: x mandatory;
  }

  .decision-strip article {
    flex: 0 0 72%;
    min-height: 112px;
    padding: 14px;
    scroll-snap-align: start;
  }

  .decision-strip strong {
    font-size: 20px;
  }

  .decision-strip span {
    font-size: 14px;
  }

  .metrics {
    display: flex;
    gap: 10px;
    margin: 0 -14px 12px;
    overflow-x: auto;
    padding: 0 14px 4px;
    scroll-snap-type: x proximity;
  }

  .metrics article {
    flex: 0 0 42%;
    min-height: 92px;
    padding: 12px;
    scroll-snap-align: start;
  }

  .overview-mobile-tabs {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(170, 186, 202, .38);
    border-radius: 16px;
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 12px;
    padding: 6px;
  }

  .overview-mobile-tabs button {
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    min-height: 40px;
  }

  .overview-mobile-tabs button.active {
    background: #effdf5;
    color: var(--ink);
  }

  .overview-grid {
    display: block;
  }

  .overview-grid [data-overview-panel] {
    display: none;
  }

  .overview-grid [data-overview-panel].active {
    display: block;
  }

  .overview-grid .panel {
    padding: 14px;
  }

  .overview-grid .panel h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .action-list,
  .question-status-list {
    gap: 8px;
    max-height: 300px;
    overflow: auto;
    padding-right: 2px;
  }

  .detail-block,
  .people-panel {
    max-height: 520px;
    overflow: auto;
  }

  .business-list {
    padding: 12px;
  }

  .business-row:nth-of-type(n+5) {
    display: none;
  }

  .compact-row {
    gap: 6px;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .compact-row strong,
  .compact-row em {
    font-size: 12px;
  }

  .metrics strong {
    font-size: 23px;
  }

  .recovery-tabs {
    position: sticky;
    top: 58px;
    z-index: 12;
  }

  .recovery-tab {
    font-size: 12px;
    min-height: 48px;
    padding: 8px 6px;
  }

  .bottom-tabs a {
    font-size: 11px;
  }

  .sales-opportunity-grid {
    grid-template-columns: 1fr;
  }
}

/* Revenue shell inspired by MiTribu mobile public views */
body {
  background:
    radial-gradient(circle at 12% 0%, rgba(168, 255, 56, .22), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(72, 168, 111, .16), transparent 24rem),
    linear-gradient(180deg, #e9f2ec 0, #f7faf3 48%, #eef6f1 100%);
}

.app-shell {
  background: rgba(247, 248, 243, .76);
  min-height: 100svh;
  padding: 1px 18px 24px;
}

.app-header {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(23, 60, 42, .1);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(23, 60, 42, .1);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 1fr) auto minmax(90px, 1fr);
  margin: 18px auto 0;
  max-width: 1180px;
  padding: 10px 12px;
  top: 12px;
}

.header-logout {
  justify-self: end;
}

.dashboard {
  padding-top: 22px;
}

.module-question,
.status,
.panel,
.metrics article,
.period-panel,
.dashboard-help-panel {
  border-radius: 18px;
}

@media (max-width: 720px) {
  body {
    background:
      radial-gradient(circle at 50% -10%, rgba(168, 255, 56, .26), transparent 18rem),
      linear-gradient(180deg, #dfeee6 0, #edf6f1 42%, #e7f0ea 100%);
  }

  .app-shell {
    background: #f7f8f3;
    border: 1px solid rgba(23, 60, 42, .1);
    border-radius: 28px;
    box-shadow: 0 26px 80px rgba(23, 60, 42, .16);
    margin: 0 auto;
    max-width: 460px;
    min-height: 100svh;
    overflow: hidden;
    padding: 0;
  }

  .app-header {
    background: rgba(255, 255, 255, .94);
    border: 0;
    border-bottom: 1px solid rgba(23, 60, 42, .08);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    gap: 10px;
    margin: 0;
    max-width: none;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    top: 0;
  }

  .dashboard {
    padding: 14px 14px calc(104px + env(safe-area-inset-bottom));
  }

  .topbar {
    background: transparent;
    margin-bottom: 12px;
  }

  .period-panel,
  .panel,
  .metrics article,
  .dashboard-help-panel,
  .module-question,
  .recovery-list-item,
  .waiting-state,
  .inline-action-status,
  .report-preview {
    background: rgba(255, 255, 255, .94);
    border-color: rgba(23, 60, 42, .12);
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(23, 60, 42, .09);
  }

  .period-panel {
    padding: 12px;
  }

  .metrics article {
    flex-basis: 44%;
    min-height: 96px;
  }

  .overview-mobile-tabs {
    border-color: rgba(23, 60, 42, .12);
    border-radius: 18px;
  }

  .bottom-tabs {
    border-radius: 22px 22px 0 0;
  }
}

@media (max-width: 520px) {
  .app-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
  }
}

.data-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 15, 29, 0.48);
  backdrop-filter: blur(10px);
}

.data-modal[hidden] {
  display: none;
}

.data-modal-card {
  width: min(440px, 100%);
  border: 1px solid rgba(214, 223, 235, 0.95);
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
  box-shadow: 0 26px 80px rgba(12, 22, 38, 0.24);
  padding: 30px;
  text-align: center;
}

.data-modal-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: #eef8f1;
  color: #245f3d;
  font-weight: 900;
}

.data-modal-icon::before {
  content: "";
  width: 28px;
  height: 28px;
  border: 4px solid rgba(36, 95, 61, 0.18);
  border-top-color: #245f3d;
  border-radius: 999px;
  animation: dataModalSpin 0.82s linear infinite;
}

.data-modal.success .data-modal-icon::before {
  content: "✓";
  width: auto;
  height: auto;
  border: 0;
  animation: none;
  font-size: 32px;
  line-height: 1;
}

.data-modal.error .data-modal-icon {
  background: #fff2f0;
  color: #b42318;
}

.data-modal.error .data-modal-icon::before {
  content: "!";
  width: auto;
  height: auto;
  border: 0;
  animation: none;
  font-size: 34px;
  line-height: 1;
}

.data-modal-card h2 {
  margin: 4px 0 10px;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.04em;
}

.data-modal-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.data-modal-card button {
  width: 100%;
  margin-top: 24px;
  border: 0;
  border-radius: 18px;
  background: var(--ink);
  color: white;
  padding: 16px 18px;
  font-weight: 900;
  cursor: pointer;
}

@keyframes dataModalSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .data-modal {
    align-items: end;
    padding: 16px;
  }

  .data-modal-card {
    border-radius: 28px;
    padding: 24px;
  }
}
