:root {
  --bg: #0b1220;
  --panel: #121b2e;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #16a34a;
  --primary-dark: #15803d;
  --accent: #f59e0b;
  --hot: #dc2626;
  --warm: #f59e0b;
  --cold: #3b82f6;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: #f1f5f9; line-height: 1.5; }
a { color: inherit; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.urgent-bar { background: var(--hot); color: #fff; text-align: center; padding: 8px 12px; font-size: 14px; }

.hero { background: radial-gradient(circle at 20% 0%, #1e3a8a 0%, var(--bg) 60%); color: #fff; padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.badge { display: inline-block; background: rgba(22,163,74,.18); color: #4ade80; border: 1px solid rgba(74,222,128,.4); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 16px 0; }
.accent { color: var(--accent); }
.lead { font-size: 1.15rem; color: #cbd5e1; }
.checks { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 8px; }
.phone { color: #cbd5e1; margin-top: 12px; }
.phone a { color: #fff; font-weight: 700; }

.btn { border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; transition: .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid #cbd5e1; }
.btn-lg { padding: 16px 28px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }

.card { background: var(--card); color: var(--text); border-radius: var(--radius); padding: 28px; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.form-card { scroll-margin-top: 20px; }
.form-card h2 { margin: 0 0 14px; font-size: 1.35rem; }
.form-card h3 { font-size: 1rem; margin: 18px 0 10px; }
fieldset { border: 0; padding: 0; margin: 0; }
.form-step { display: none; }
.form-step.active { display: block; animation: fade .25s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

.steps { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.step { width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.step.active { background: var(--primary); color: #fff; }
.steps .line { width: 50px; height: 2px; background: #e2e8f0; }

.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.option { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 10px; padding: 12px; font-size: .95rem; cursor: pointer; text-align: left; font-weight: 600; }
.option:hover { border-color: #94a3b8; }
.option.selected { border-color: var(--primary); background: #f0fdf4; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
label.inline { display: flex; gap: 8px; align-items: center; font-weight: 500; }
input, select { width: 100%; margin-top: 4px; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 1rem; font-family: inherit; }
input[type=checkbox] { width: auto; margin: 0; }
input:focus, select:focus { outline: 2px solid var(--primary); border-color: transparent; }
.row { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; }
.row .btn-primary { flex: 1; }
.form-step > .btn-block { margin-top: 16px; }
.fine { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 10px; }
.error { color: var(--hot); font-size: .9rem; min-height: 1.2em; margin: 8px 0 0; }
.success { text-align: center; }
.success .big { font-size: 3rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -36px; position: relative; }
.stats div { background: #fff; border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.06); }
.stats strong { display: block; font-size: 1.6rem; color: var(--primary); }
.stats span { color: var(--muted); font-size: .9rem; }

section h2 { font-size: 1.8rem; }
.how { padding: 48px 20px 16px; }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.how .card { box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }

.calc { margin: 40px auto; max-width: 1100px; }
.calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.calc input[type=range] { padding: 0; accent-color: var(--primary); }
.calc output { font-weight: 800; color: var(--primary); }
.calc-result { font-size: 1.4rem; text-align: center; margin: 20px 0 0; }
.calc-result strong { color: var(--primary); font-size: 2rem; }

.faq { padding-bottom: 60px; }
details { background: #fff; border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
summary { font-weight: 700; cursor: pointer; }

.footer { background: var(--bg); color: #94a3b8; padding: 24px 0; text-align: center; font-size: .9rem; }
.sticky-cta { display: none; }

@media (max-width: 860px) {
  .hero { text-align: center; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; justify-items: center; }
  .hero-grid > div:first-child { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }
  .hero h1 { text-align: center; }
  .hero .lead { text-align: center; max-width: 540px; margin-left: auto; margin-right: auto; }
  .hero .badge { align-self: center; }
  .checks { display: inline-flex; flex-direction: column; text-align: left; margin: 16px auto 22px; max-width: 100%; }
  .proof-strip { justify-content: center; text-align: center; }
  .phone { text-align: center; }
  .form-card { max-width: 500px; margin: 0 auto; width: 100%; text-align: left; }

  .how-grid, .calc-grid, .t-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .stats { grid-template-columns: 1fr 1fr; margin: 20px auto 0; max-width: 520px; }
  
  section h2, .how h2, .problem h2, .faq h2, .calc h2, .testimonials h2 { text-align: center; }
  .calc { max-width: 540px; margin: 30px auto; }
  details { max-width: 600px; margin-left: auto; margin-right: auto; }

  .sticky-cta { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; box-shadow: 0 -4px 14px rgba(0,0,0,.15); padding: 0; }
  .sticky-cta a { padding: 15px; text-align: center; font-weight: 800; text-decoration: none; color: #fff; }
  .sticky-cta .call { background: var(--bg); flex: 0 0 35%; }
  .sticky-cta .go { background: var(--primary); flex: 1; }
  .footer { padding-bottom: 75px; }
}

@media (max-width: 540px) {
  .container { padding: 0 14px; }
  .card { padding: 20px 16px; }
  .hero { padding: 32px 0 44px; }
  .option-grid.three { grid-template-columns: 1fr; }
  .option { text-align: center; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 12px; }
  .stats { gap: 10px; }
  .stats div { padding: 14px 10px; }
  .stats strong { font-size: 1.35rem; }
  .calc-result strong { font-size: 1.6rem; }
}

/* ---------- Admin dashboard ---------- */
.admin { background: #f1f5f9; }
.admin-header { background: var(--bg); color: #fff; padding: 18px 0; }
.admin-header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-header h1 { font-size: 1.4rem; margin: 0; }
.admin-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-header .btn-ghost { color: #cbd5e1; border-color: #334155; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px auto; }
.kpi { background: #fff; padding: 16px; border-radius: 12px; }
.kpi strong { font-size: 1.8rem; display: block; }
.kpi.hot strong { color: var(--hot); } .kpi.warm strong { color: var(--warm); } .kpi.cold strong { color: var(--cold); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { width: auto; flex: 1; min-width: 160px; margin: 0; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
th { white-space: normal; line-height: 1.25; }
td { vertical-align: top; }
td a[href^="tel:"] { white-space: nowrap; }
th { background: #f8fafc; font-size: .78rem; text-transform: uppercase; color: var(--muted); }
.tag { padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .78rem; color: #fff; }
.tag.Hot { background: var(--hot); } .tag.Warm { background: var(--warm); } .tag.Cold { background: var(--cold); }
td select { width: auto; margin: 0; padding: 4px 6px; font-size: .85rem; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
@media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- Cloudflare additions ---------- */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.login-card { max-width: 380px; margin: 60px auto; }
.embed-card { margin-top: 20px; }
.embed-card h3 { margin-top: 0; }
.embed-card textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; margin-bottom: 10px; resize: vertical; }
.embed-card code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }
button:disabled { opacity: .6; cursor: wait; }

/* ---------- Conversion upgrades ---------- */
.widget { background: transparent; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 12px; }
.widget .form-card { box-shadow: none; border: 1px solid #e2e8f0; max-width: 480px; width: 100%; margin: 0 auto; }
.widget-head { text-align: center; margin: 0 0 12px; }
.widget-head h1 { font-size: 1.5rem; margin: 0; }
.widget-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

.progress { margin-bottom: 18px; }
.progress-bar { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 33%; background: var(--primary); transition: width .3s; }
.progress-labels { display: flex; justify-content: space-between; list-style: none; padding: 0; margin: 6px 0 0; font-size: .75rem; color: var(--muted); }
.progress-labels li.active { color: var(--primary); font-weight: 700; }

.option-grid.three { grid-template-columns: repeat(3, 1fr); }
.option { min-height: 48px; }
.microcopy { font-size: .85rem; color: var(--muted); text-align: center; margin: 10px 0 0; }
.microcopy.good { background: #f0fdf4; color: #166534; padding: 8px 10px; border-radius: 8px; text-align: left; margin: 0 0 12px; }
.opt { color: var(--muted); font-weight: 400; }
input.invalid { border-color: var(--hot); background: #fef2f2; }
input.valid { border-color: var(--primary); }
.field-err { color: var(--hot); font-weight: 500; font-size: .78rem; display: block; min-height: 0; }
.consent { font-size: .78rem; color: var(--muted); align-items: flex-start; }
.consent input { margin-top: 2px; }
.btn-cta { font-size: 1.05rem; padding: 14px 18px; box-shadow: 0 6px 16px rgba(22,163,74,.35); }
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 12px 0 0; font-size: .78rem; color: var(--muted); }
.best-time { background: #f8fafc; border-radius: 10px; padding: 12px; margin: 14px 0; text-align: left; }
.best-time h3 { margin: 0 0 8px; font-size: .95rem; }

.proof-strip { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: #e2e8f0; }
.stars { color: var(--accent); font-size: 1.2rem; letter-spacing: 2px; }

.fit { padding-top: 40px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chips span { background: #fff; border: 1px solid #e2e8f0; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: .9rem; }

.testimonials { padding-top: 32px; }
.t-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.t-grid figure { margin: 0; box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.t-grid blockquote { margin: 0 0 10px; font-size: 1rem; }
.t-grid figcaption { color: var(--muted); font-size: .85rem; font-weight: 600; }



/* Admin additions */
.funnel-wrap { margin: 0 0 18px; }
.funnel-wrap h3 { margin: 0 0 10px; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.late { color: var(--hot); }
.timer.ok { color: var(--primary); }
tr.row-abandoned { opacity: .7; background: #fffbeb; }
.tag.Abandoned { background: #94a3b8; }
.kpi small { color: var(--muted); display: block; font-size: .75rem; }

/* Cannabis focus */
.calc-grid.four { grid-template-columns: repeat(4, 1fr); }
.problem { padding-top: 48px; }
.problem h3 { margin-top: 0; }
@media (max-width: 860px) { .calc-grid.four { grid-template-columns: 1fr; } }

/* ---------- Proposal page ---------- */
.hero-sm { padding: 40px 0 70px; }
.hero-sm h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: -40px; padding-bottom: 60px; }
.p-grid section { display: grid; gap: 20px; align-content: start; }
.p-grid h2 { font-size: 1.2rem; margin-top: 0; }
.p-big { font-size: 2.4rem; font-weight: 800; color: var(--primary); margin: 0; }
.p-big small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.checks.dark { margin: 0; }
.p-steps { padding-left: 20px; margin: 0; display: grid; gap: 8px; }
.phone-dark a { font-weight: 700; color: var(--primary); }
@media (max-width: 860px) { .p-grid { grid-template-columns: 1fr; } }

/* ---------- Automation (admin) ---------- */
.auto-card { margin-bottom: 18px; }
.auto-card .auto-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.toggle input { width: 18px; height: 18px; margin: 0; }
.providers { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8rem; }
.providers span { padding: 3px 10px; border-radius: 99px; background: #f1f5f9; }
.providers .on { background: #dcfce7; color: #166534; }
.providers .off { background: #fef3c7; color: #92400e; }
.queue-item { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; margin-top: 10px; }
.queue-item textarea, .modal textarea { width: 100%; font: inherit; font-size: .9rem; padding: 8px; border: 1px solid #cbd5e1; border-radius: 8px; resize: vertical; }
.queue-item .row { justify-content: flex-start; flex-wrap: wrap; }
.queue-item .row .btn { white-space: nowrap; }
.queue-item .row .btn-primary { flex: 0; }
.ready-card { border: 2px solid var(--primary); margin-bottom: 18px; }
.ready-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; border-top: 1px solid #e2e8f0; }
.ready-item:first-of-type { border-top: 0; }
.auto-badge { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #e2e8f0; color: #334155; white-space: nowrap; }
.auto-badge.active { background: #dbeafe; color: #1e40af; }
.auto-badge.pending { background: #fef3c7; color: #92400e; }
.auto-badge.paused { background: #fee2e2; color: #991b1b; }
.auto-badge.done { background: #dcfce7; color: #166534; }
.tag.Engaged { background: #8b5cf6; }
.tag.ReadytoSign, .tag.Ready { background: var(--primary); }
tr.row-ready { background: #f0fdf4; }
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 50; display: flex; justify-content: center; align-items: flex-start; overflow: auto; padding: 30px 12px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 640px; padding: 22px; }
.modal h2 { margin: 0 0 4px; }
.timeline { max-height: 50vh; overflow: auto; display: grid; gap: 8px; margin: 14px 0; padding: 4px; }
.msg { padding: 10px 12px; border-radius: 12px; max-width: 85%; font-size: .9rem; white-space: pre-wrap; }
.msg.out { background: #f1f5f9; justify-self: end; }
.msg.in { background: #dcfce7; justify-self: start; }
.msg .meta { display: block; font-size: .7rem; color: var(--muted); margin-top: 4px; }
.msg.pending { border: 2px dashed var(--warm); }
.msg.failed { border: 2px solid var(--hot); }
.compose { display: grid; gap: 8px; }
.compose .row { margin: 0; }
.signup-box { background: #f0fdf4; border-radius: 10px; padding: 12px; font-size: .9rem; margin-top: 10px; }

/* Prospects */
.prospect-card { margin-top: 20px; }
.import-box { margin-top: 12px; background: #f8fafc; border-radius: 10px; padding: 10px 14px; }
.import-box summary { font-weight: 700; cursor: pointer; }
.p-notes { margin: 0; padding: 6px 8px; font-size: .85rem; min-width: 160px; }

/* Lead finder */
.finder-card { margin-top: 20px; }
.s-group h4 { margin: 14px 0 6px; font-size: .95rem; }
.s-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 6px 14px; }
.s-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: #f8fafc; border-radius: 8px; font-size: .9rem; }
.s-btns { display: flex; gap: 4px; flex-shrink: 0; }
.s-btns .btn-sm { padding: 4px 9px; font-size: .78rem; }
.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; align-items: center; }
.qa-grid input, .qa-grid select { margin: 0; }
.qa-wide { grid-column: span 2; }
@media (max-width: 860px) { .qa-grid { grid-template-columns: 1fr; } .qa-wide { grid-column: auto; } }
