/* MarchForward Outreach — same palette and type as the MarchForward VSL page. */
:root {
  --blue: #1f5eff;
  --blue-dark: #0b3fd1;
  --blue-tint: #e8efff;
  --navy: #0a1a3a;
  --text: #1b2540;
  --muted: #5b6785;
  --line: #e3e9f5;
  --soft: #f4f7fd;
  --white: #ffffff;
  --green: #12925a;
  --green-tint: #e3f5ec;
  --amber: #b26a00;
  --amber-tint: #fff3dd;
  --red: #d3324a;
  --red-tint: #fdecef;
  --radius: 16px;
  --shadow: 0 10px 30px -18px rgba(16, 42, 110, .2);
  --shadow-lg: 0 20px 50px -20px rgba(16, 42, 110, .28);
  /* names the chart code uses */
  --accent: var(--blue);
  --warn: #f2b544;
  --violet: var(--navy);
  --border: var(--line);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--soft); color: var(--text); font: 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
code { font-size: 12.5px; background: var(--blue-tint); color: var(--blue-dark); padding: 1px 6px; border-radius: 6px; }
h1 { font-size: 30px; line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -.03em; color: var(--navy); }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 700; letter-spacing: -.01em; color: var(--navy); }
h3 { font-size: 12px; margin: 0 0 10px; color: var(--blue); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 15; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 32px; }
.logo { font-weight: 800; font-size: 18px; color: var(--navy); letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.logo span { color: var(--blue); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { position: relative; display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--navy); }
.nav a.active { color: var(--blue); }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.nav a[data-view=settings] { margin-left: auto; }
.me-chip { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 600; font-size: 13.5px; padding: 0 4px; }
.me-chip:not([hidden]) + a[data-view=settings] { margin-left: 0; }
.me-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
/* Team members never see owner-only controls (the server refuses them too). */
.is-member .owner-only { display: none !important; }
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge { background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; line-height: 1.5; }

main { max-width: 1160px; margin: 0 auto; padding: 36px 24px 96px; outline: none; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.lead { color: var(--muted); font-size: 15px; margin-top: 6px; max-width: 640px; }

/* ---------- cards ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.section { margin-top: 32px; }
.grid.two.section .card, .section > .card { margin: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }

.kpi { padding: 20px 22px; }
.kpi .label { color: var(--muted); letter-spacing: .06em; font-size: 11.5px; }
.kpi .value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--navy); line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.bar { height: 6px; background: var(--blue-tint); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .4s ease; }
.bar.good > i { background: var(--green); }

/* ---------- sign in ---------- */
.login-page { min-height: 100vh; background: linear-gradient(180deg, var(--soft) 0%, var(--white) 100%); }
.login-wrap { max-width: 400px; margin: 0 auto; padding: 12vh 20px 40px; }
.login-logo { display: block; text-align: center; font-size: 22px; margin-bottom: 22px; }
.login-card { padding: 30px 28px; box-shadow: var(--shadow-lg); }
.login-card h1 { margin-bottom: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-btn { width: 100%; padding: 12px; font-size: 15px; margin-top: 4px; }
.login-error { margin: 0; color: var(--red); font-weight: 600; font-size: 13.5px; }
.login-foot { text-align: center; margin-top: 16px; }

/* ---------- revenue goal ---------- */
.goal-card { padding: 26px 28px; border-color: #cfdcfb; background: linear-gradient(180deg, #f7f9ff 0%, var(--white) 60%); box-shadow: var(--shadow-lg); }
.goal-amount { font-size: 44px; font-weight: 800; letter-spacing: -.03em; color: var(--navy); line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; }
.goal-amount span { font-size: 22px; color: var(--muted); font-weight: 700; letter-spacing: -.01em; }
.goal-bar { position: relative; height: 16px; background: var(--blue-tint); border-radius: 99px; margin-top: 22px; }
.goal-bar > i { display: block; height: 100%; min-width: 16px; background: linear-gradient(90deg, var(--blue), #4d7dff); border-radius: 99px; transition: width .6s ease; }
.goal-marker { position: absolute; top: -5px; width: 3px; height: 26px; background: var(--navy); border-radius: 2px; transform: translateX(-1.5px); }
.countdown { display: flex; gap: 8px; }
.cd-unit { background: var(--navy); color: #fff; border-radius: 12px; padding: 8px 10px; min-width: 58px; text-align: center; }
.cd-unit b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-unit span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.goal-plan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.goal-step { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.goal-step b { font-size: 24px; font-weight: 800; color: var(--blue); letter-spacing: -.02em; line-height: 1.1; }
.goal-step span { font-weight: 600; color: var(--navy); font-size: 13.5px; }
.goal-step em { font-style: normal; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- buttons + inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--white); padding: 9px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; color: var(--navy); transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; }
.btn:hover { border-color: #c9d5ee; background: var(--soft); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 8px 20px -10px rgba(31, 94, 255, .7); }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-1px); }
.btn.good { background: var(--green-tint); border-color: transparent; color: var(--green); }
.btn.good:hover { background: #d3eee1; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-tint); border-color: transparent; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--navy); background: var(--soft); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #9aa5bf; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 94, 255, .15); }
.btn:focus-visible, .pill:focus-visible, .nav a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
textarea { width: 100%; resize: vertical; min-height: 80px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
label.field input, label.field select, label.field textarea { color: var(--text); font-weight: 400; font-size: 14.5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.quick-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.quick-add input[name=handle] { flex: 1 1 220px; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; line-height: 1.6; }
.stage-Prospect { }
.stage-Warming { background: var(--amber-tint); color: var(--amber); border-color: transparent; }
.stage-Contacted, .stage-Audit-sent { background: var(--blue-tint); color: var(--blue); border-color: transparent; }
.stage-Replied { background: var(--navy); color: #fff; border-color: var(--navy); }
.stage-Call-booked { background: var(--green-tint); color: var(--green); border-color: transparent; }
.stage-Won { background: var(--green); color: #fff; border-color: var(--green); }
.stage-Churned { background: var(--red-tint); color: var(--red); border-color: transparent; }
.stage-Lost { color: #9aa5bf; }

/* ---------- lists ---------- */
.card.list { padding: 6px 22px; }
.list { display: flex; flex-direction: column; }
.item { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .who { flex: 1; min-width: 0; cursor: pointer; }
.item .who b { font-weight: 700; color: var(--navy); font-size: 15px; }
.item .who:hover b { color: var(--blue); }
.item .who .meta { color: var(--muted); font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.item .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.overdue { color: var(--red); font-weight: 600; }
.due-today { color: var(--blue); font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty b { display: block; color: var(--navy); font-size: 16px; margin-bottom: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border-top: 0; white-space: nowrap; padding-top: 4px; }
td b { color: var(--navy); }
tbody tr { cursor: pointer; transition: background .1s; }
tbody tr:hover { background: var(--soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { flex: 1 1 240px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { border: 1px solid var(--line); background: var(--white); border-radius: 99px; padding: 5px 13px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s; }
.pill:hover { color: var(--navy); border-color: #c9d5ee; }
.pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill b { font-weight: 700; margin-left: 5px; opacity: .65; }

/* ---------- drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10, 26, 58, .28); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); background: var(--white); z-index: 21; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; padding: 26px 28px 72px; box-shadow: var(--shadow-lg); }
.drawer.open { transform: none; }
.drawer-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.drawer-head h1 { font-size: 24px; word-break: break-all; }
.drawer .block { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.log-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.log-grid .btn { justify-content: flex-start; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.timeline li:first-child { border-top: 0; }
.timeline b { color: var(--navy); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: #c3ccdf; }
.dot.out { background: var(--blue); } .dot.in { background: var(--navy); } .dot.warm { background: #f2b544; } .dot.milestone { background: var(--green); }
.timeline .txt { flex: 1; min-width: 0; }
.timeline .note { color: var(--text); white-space: pre-wrap; font-size: 13.5px; margin-top: 4px; }
.due-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }

/* ---------- scripts ---------- */
.script-card { display: flex; flex-direction: column; gap: 10px; }
.script-card b { color: var(--navy); font-size: 15px; }
.script-body { white-space: pre-wrap; font-size: 13.5px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; max-height: 200px; overflow: auto; }

/* ---------- chart ---------- */
.chart svg { width: 100%; height: 190px; display: block; }
.chart .legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 90px; gap: 12px; align-items: center; margin: 10px 0; }
.funnel-row .bar { height: 22px; margin: 0; border-radius: 6px; }
.funnel-row .bar > i { border-radius: 6px; }

/* ---------- modal + toast ---------- */
dialog { border: 1px solid var(--line); border-radius: 20px; background: var(--white); color: var(--text); padding: 28px; width: min(640px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px; }
dialog::backdrop { background: rgba(10, 26, 58, .35); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-lg); font-weight: 500; font-size: 14px; }
.toast.error { background: var(--red); }
.toast button { background: none; border: 0; color: #9db8ff; font-weight: 700; cursor: pointer; padding: 0; }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  .topbar { backdrop-filter: none; background: var(--white); } /* a filter here would trap the fixed bottom nav inside the header */
  .topbar-inner { height: 56px; padding: 0 16px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; gap: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); z-index: 15; }
  .nav a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; height: 54px; padding: 0 1px; font-size: 9.5px; letter-spacing: -.01em; }
  .nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav a[data-view=settings] { margin-left: 0; }
  .me-chip { display: none !important; }
  .nav a.active::after { top: -5px; bottom: auto; left: 30%; right: 30%; }
  .nav svg { width: 21px; height: 21px; }
  .nav-badge { position: absolute; top: 4px; left: 54%; font-size: 10px; padding: 0 6px; }
  main { padding: 24px 16px 110px; }
  h1 { font-size: 26px; }
  .card { padding: 18px; }
  .card.list { padding: 4px 16px; }
  .item { flex-wrap: wrap; gap: 10px; }
  .item .actions { width: 100%; justify-content: flex-start; }
  .hide-sm { display: none; }
  .grid.two { grid-template-columns: 1fr; }
  .grid.kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 16px; }
  .kpi .value { font-size: 24px; }
  .funnel-row { grid-template-columns: 80px 1fr 70px; }
  .goal-card { padding: 20px 18px; }
  .goal-amount { font-size: 34px; }
  .goal-plan { grid-template-columns: 1fr 1fr; }
  .cd-unit { min-width: 0; flex: 1; padding: 6px 4px; }
  .countdown { width: 100%; }
  .drawer { padding: 20px 16px 72px; }
  .toasts { bottom: 84px; }
}
