:root {
  --bg: #091312;
  --panel: #10201e;
  --panel-2: #142a27;
  --ink: #f2fbf8;
  --muted: #9fb8b0;
  --line: rgba(255,255,255,.10);
  --brand: #43e0b7;
  --brand-2: #86ffd9;
  --warn: #ffbf5f;
  --danger: #ff7c7c;
  --good: #8bf08b;
  --shadow: 0 20px 60px rgba(0,0,0,.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(67,224,183,.18), transparent 38%), var(--bg);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(1240px, calc(100% - 28px)); margin: 0 auto; padding: 24px 0 48px; }
.hero {
  display: flex; justify-content: space-between; gap: 24px; align-items: end;
  padding: 28px; border: 1px solid var(--line); border-radius: 28px;
  background: linear-gradient(135deg, rgba(20,42,39,.94), rgba(9,19,18,.9)); box-shadow: var(--shadow);
}
.eyebrow { color: var(--brand); text-transform: uppercase; letter-spacing: .13em; font-weight: 800; font-size: .78rem; margin: 0 0 10px; }
h1 { font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: .9; margin: 0; }
h2 { margin: 0 0 10px; font-size: 1.1rem; }
p { color: var(--muted); line-height: 1.5; }
.subhead { max-width: 680px; font-size: 1.05rem; margin-bottom: 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.button {
  border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px; color: var(--ink);
  background: var(--panel-2); font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.button.primary { background: var(--brand); color: #06201a; border-color: transparent; }
.button.secondary:hover, .filter:hover { border-color: rgba(134,255,217,.45); }
.wide { width: 100%; }
.panel, .stat-card, .lead-card {
  border: 1px solid var(--line); background: rgba(16,32,30,.88); border-radius: 22px; box-shadow: 0 12px 34px rgba(0,0,0,.18);
}
.setup-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; padding: 20px; margin: 18px 0; }
.format-card { background: rgba(255,255,255,.05); border-radius: 16px; padding: 16px; overflow: auto; }
code { display: block; color: var(--brand-2); white-space: nowrap; margin-top: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.stat-card { padding: 18px; }
.stat-card span { color: var(--muted); display: block; font-size: .86rem; }
.stat-card strong { display: block; font-size: 2rem; margin-top: 6px; }
.stat-card.hot { border-color: rgba(67,224,183,.38); }
.workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.controls, .detail { padding: 16px; position: sticky; top: 16px; }
.filter-stack { display: grid; gap: 8px; margin: 16px 0; }
.filter { text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); border-radius: 14px; padding: 11px 12px; font-weight: 800; }
.filter.active { background: rgba(67,224,183,.15); border-color: rgba(67,224,183,.5); color: var(--brand-2); }
.mini-help { color: var(--muted); font-size: .9rem; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); margin-bottom: 14px; line-height: 1.45; }
.lead-list { display: grid; gap: 10px; }
.lead-card { padding: 14px; display: grid; gap: 10px; background: rgba(16,32,30,.72); }
.lead-card.selected { outline: 2px solid var(--brand); }
.lead-top { display: flex; justify-content: space-between; gap: 12px; }
.lead-name { font-weight: 900; font-size: 1.02rem; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: .75rem; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted); }
.badge.hot { color: #211301; background: var(--warn); border-color: transparent; }
.badge.overdue { color: #240808; background: var(--danger); border-color: transparent; }
.badge.good { color: #061c07; background: var(--good); border-color: transparent; }
.meta-row { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.detail label { display: block; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: 13px 0 6px; }
.detail input, .detail select, .detail textarea {
  width: 100%; color: var(--ink); background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px;
}
.script-box { white-space: pre-wrap; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 16px; padding: 14px; color: var(--ink); line-height: 1.45; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.empty-state { text-align: center; padding: 46px 10px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--brand); color: #06201a; border-radius: 999px; padding: 12px 18px; font-weight: 900; box-shadow: var(--shadow); }
@media (max-width: 980px) {
  .hero, .setup-panel { grid-template-columns: 1fr; display: grid; align-items: start; }
  .hero-actions { justify-content: start; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .workspace { grid-template-columns: 1fr; }
  .controls, .detail { position: static; }
}
@media (max-width: 560px) {
  .app-shell { width: min(100% - 18px, 1240px); padding-top: 10px; }
  .hero { padding: 20px; border-radius: 22px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card strong { font-size: 1.55rem; }
}
