@font-face { font-family: 'Public Sans'; font-weight: 100 900; font-display: swap; src: url(/fonts/public-sans.woff2) format('woff2'); }
:root {
  --side: #0e1726; --side-2: #1a2537; --side-ink: #a9b4c6;
  --bg: #f5f6f8; --card: #fff; --ink: #121a26; --muted: #5f6b7d; --line: #e3e7ee;
  --go: #0f9f6e; --go-soft: #e3f6ee; --warn: #b7791f; --warn-soft: #fdf3e1; --bad: #c2362b; --bad-soft: #fde8e6;
  --blue: #2563eb; --blue-soft: #e8efff; --focus: #2563eb; --r: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 'Public Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }

/* Sign in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--side); }
.auth form { width: 100%; max-width: 380px; background: var(--card); border-radius: 14px; padding: 32px; display: grid; gap: 14px; }
.auth h1 { font-size: 24px; }
.auth p { margin: 0; color: var(--muted); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }

/* Layout */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-weight: 600; }
.side nav a:hover { background: var(--side-2); color: #fff; }
.side nav a[aria-current=page] { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 #34d399; }
.side nav svg { width: 18px; height: 18px; flex: none; }
.side .me { margin-top: auto; font-size: 13px; color: var(--side-ink); display: grid; gap: 6px; padding: 0 12px; }
.side .me b { color: #fff; font-weight: 600; overflow-wrap: anywhere; }
.side .me button { justify-self: start; background: none; border: 0; padding: 0; color: var(--side-ink); text-decoration: underline; cursor: pointer; }
main { padding: 28px 32px 64px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head h1 { font-size: 24px; }

/* Controls */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn.go { background: var(--go); }
.btn.quiet { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: wait; }
label.f { display: grid; gap: 5px; font-weight: 600; font-size: 13px; }
label.f small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
textarea { min-height: 70px; resize: vertical; }
.err { color: var(--bad); font-size: 14px; }
.err:empty { display: none; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { width: 260px; }
.filters select { width: auto; }

/* Cards and tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.tile { padding: 16px 18px; }
.tile span { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.tile b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; font-weight: 700; color: var(--muted); background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: #f7f9fc; }
td .sub { display: block; color: var(--muted); font-size: 13px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eef1f5; color: var(--muted); }
.pill.sold, .pill.active, .pill.appointment { background: var(--go-soft); color: #0b7a54; }
.pill.unsold, .pill.paused, .pill.contacted { background: var(--warn-soft); color: #8a5a12; }
.pill.duplicate, .pill.not_interested, .pill.bad_number { background: var(--bad-soft); color: var(--bad); }
.pill.filled, .pill.new { background: var(--blue-soft); color: var(--blue); }
select.status { width: auto; padding: 5px 8px; font-size: 13px; font-weight: 600; }

.prog { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.prog i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.prog i b { display: block; height: 100%; background: var(--go); }
.prog span { font-size: 13px; color: var(--muted); }

/* Panel (drawer) */
.scrim { position: fixed; inset: 0; background: rgba(14,23,38,.4); z-index: 40; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--card); z-index: 41; overflow-y: auto; box-shadow: -20px 0 50px -20px rgba(0,0,0,.35); }
.panel header { position: sticky; top: 0; background: var(--card); padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.panel header h2 { font-size: 20px; }
.panel header p { margin: 2px 0 0; color: var(--muted); }
.panel .x { background: none; border: 0; padding: 6px; cursor: pointer; border-radius: 6px; }
.panel .x:hover { background: var(--bg); }
.panel .body { padding: 20px 24px 40px; display: grid; gap: 22px; }
.panel h3 { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.notes { display: grid; gap: 10px; }
.formgrid { display: grid; gap: 14px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 2px solid var(--card); }
.timeline li.note::before { background: var(--blue); }
.timeline li.status::before { background: var(--warn); }
.timeline li.assigned::before, .timeline li.routed::before { background: var(--go); }
.timeline small { display: block; color: var(--muted); font-size: 12px; }
.timeline li.note span { background: var(--bg); border-radius: 8px; padding: 8px 10px; display: block; }
.formgrid .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.consent { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.keybox { display: flex; gap: 8px; align-items: center; }
.keybox code { flex: 1; background: var(--bg); border-radius: 6px; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; }
pre.snip { background: var(--side); color: #d6deea; padding: 14px; border-radius: 8px; overflow-x: auto; font-size: 13px; margin: 0; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 60; }

/* Phone */
.topbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; background: var(--side); color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 30; }
  .topbar button { background: none; border: 0; color: #fff; padding: 4px; cursor: pointer; }
  main { padding: 20px 16px 48px; }
  .filters input[type=search] { width: 100%; }
  .formgrid .two { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 0 0; }
  .kv dd { margin-bottom: 8px; }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Onboarding and profile form */
.auth.join { align-items: start; padding-block: 48px; }
.auth form.joincard, .joincard { width: 100%; max-width: 640px; background: var(--card); border-radius: 14px; padding: 32px; display: grid; gap: 22px; }
.joincard h1 { font-size: 26px; }
.joincard p { margin: 4px 0 0; color: var(--muted); }
.profile { padding: 28px; display: grid; gap: 22px; max-width: 760px; }
fieldset.group { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; min-width: 0; }
fieldset.group legend { font-weight: 800; font-size: 16px; padding: 0; margin-bottom: 12px; }
fieldset.group legend small { font-weight: 400; color: var(--muted); font-size: 13px; }
fieldset.group .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.statebar { display: flex; gap: 12px; align-items: center; }
.statebar input { max-width: 240px; }
.stcount { color: var(--muted); font-size: 13px; font-weight: 600; }
.states { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; max-height: 280px; overflow-y: auto; padding: 2px; }
.st { position: relative; }
.st input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.st span { display: flex; gap: 8px; align-items: baseline; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st span b { color: var(--ink); font-size: 13px; }
.st input:checked + span { background: var(--go-soft); border-color: var(--go); color: #0b5c40; }
.st input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.alert-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; }
.alert-row input:disabled { background: var(--bg); color: var(--muted); }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 40px; height: 24px; margin: 0; cursor: pointer; }
.switch span { width: 40px; height: 24px; border-radius: 99px; background: #cfd6e1; position: relative; flex: none; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--go); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.alert-for { display: grid; gap: 8px; padding-top: 4px; }
.alert-for > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--go); margin: 0; }
.btn.big { padding: 14px 20px; font-size: 16px; justify-content: center; }
@media (max-width: 860px) {
  .joincard, .profile { padding: 22px 18px; }
  fieldset.group .two, .alert-row { grid-template-columns: 1fr; }
  .alert-row { gap: 8px; }
  .states { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* Calendar, booking page, billing */
.pad { padding: 24px; }
.grid-gap { display: grid; gap: 14px; }
.muted { color: var(--muted); margin: 0; font-size: 14px; }
.sub-h { font-size: 15px; margin: 6px 0 10px; }
.cal-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-tab { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 14px; font-weight: 700; cursor: pointer; }
.cal-tab[aria-selected=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cal-row { display: flex; gap: 10px; }
.cal-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 10px; }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--warn-soft); border: 1px solid #f1dcb4; border-radius: var(--r); padding: 14px 18px; margin-bottom: 16px; }
.banner.ok { background: var(--go-soft); border-color: #bfe8d6; }
.banner div { overflow-wrap: anywhere; }
.prefix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.prefix span { padding: 9px 4px 9px 11px; color: var(--muted); background: var(--bg); white-space: nowrap; font-weight: 400; }
.prefix input { border: 0; border-radius: 0; min-width: 0; }
.photo-row { display: flex; gap: 16px; align-items: center; }
.photo { width: 84px; height: 84px; border-radius: 50%; background: var(--side); color: #34d399; display: grid; place-items: center; font-weight: 800; font-size: 26px; overflow: hidden; flex: none; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.link-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; }
#links { display: grid; gap: 8px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; }
.plan { padding: 24px; display: grid; gap: 12px; align-content: start; }
.plan h2 { font-size: 18px; }
.plan .price { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.plan .btn { justify-content: center; }
@media (max-width: 860px) {
  .plans, .link-row { grid-template-columns: 1fr; }
  .link-row { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .cal-row { flex-direction: column; }
  .prefix span { max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
}

/* Billing: lead order row */
.buy-row { display: flex; gap: 10px; align-items: end; }
.buy-row .f { flex: 1; }
.pill.requested { background: var(--warn-soft); color: #8a5a12; }
/* Booking page: form beside a phone-sized preview */
.page-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.phone-prev { position: sticky; top: 16px; }
.phone { width: 340px; height: 680px; border: 10px solid #121a26; border-radius: 36px; overflow: hidden; background: #f3f5f8; box-shadow: 0 20px 50px -24px rgba(14,23,38,.5); }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.phone.empty { display: grid; place-items: center; color: var(--muted); font-weight: 600; height: 240px; }
@media (max-width: 1100px) { .page-split { grid-template-columns: 1fr; } .phone-prev { position: static; justify-self: center; } }
@media (max-width: 400px) { .phone { width: calc(100vw - 48px); } }
/* Language tag on lead types */
.tag { display: inline-block; vertical-align: middle; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag.es { background: #fdeee0; color: #9a4a0c; }
.tag.en { background: var(--blue-soft); color: var(--blue); }
.plan-top { display: grid; gap: 8px; justify-items: start; }
/* Billing: lead order form */
.order-form { padding: 22px; display: grid; gap: 18px; max-width: 760px; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type { position: relative; cursor: pointer; }
.type input { position: absolute; opacity: 0; }
.type > span { display: grid; gap: 8px; justify-items: start; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r); height: 100%; }
.type em { font-style: normal; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.type em small { font-size: 13px; font-weight: 600; color: var(--muted); }
.type > input:checked + span { border-color: var(--go); box-shadow: 0 0 0 3px var(--go-soft); }
.type > input:focus-visible + span { outline: 3px solid #2563eb; outline-offset: 2px; }
.buy-row input { max-width: 140px; }
.total { margin: 0; font-weight: 700; color: var(--muted); }
@media (max-width: 640px) { .types { grid-template-columns: 1fr; } }
/* Billing tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab[aria-selected=true] { color: var(--ink); border-bottom-color: var(--ink); }
.tab .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--warn-soft); color: #8a5a12; font-size: 12px; }
.bill-sec { display: grid; gap: 12px; max-width: 760px; margin-bottom: 28px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 18px; }
.sec-head p { margin: 4px 0 0; }
.lang-pick { width: auto; flex: none; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.addon { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px; flex-wrap: wrap; }
.addon-main { flex: 1 1 260px; }
.addon-main h3 { margin: 0 0 4px; font-size: 17px; }
.addon-main p { margin: 0; }
.addon-side { display: grid; gap: 8px; justify-items: end; }
.addon-side .price { margin: 0; font-size: 28px; font-weight: 800; }
.addon-side .price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.addon-acts { display: flex; gap: 8px; }
.sm-note { margin: 0; font-size: 13px; }
@media (max-width: 640px) { .addon-side { justify-items: start; } }
.bill-sec.wide { max-width: none; }
/* Filters */
.filters { display: grid; gap: 10px; margin-bottom: 16px; }
.filters.filter-row, .filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filters .search input[type=search] { width: 100%; padding-left: 36px; border-radius: 99px; }
.seg { display: inline-flex; background: #eef1f5; border-radius: 99px; padding: 3px; gap: 2px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(14,23,38,.15); }
.seg input:focus-visible + span { outline: 3px solid #2563eb; outline-offset: 1px; }
.pick { position: relative; display: inline-block; }
.pick select { appearance: none; -webkit-appearance: none; width: auto; max-width: 220px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
  padding: 7px 30px 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); cursor: pointer; }
.pick::after { content: ''; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); pointer-events: none; color: var(--muted); }
.pick.on select { background: var(--ink); color: #fff; border-color: var(--ink); }
.pick.on::after { color: #fff; }
.pick select:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.clear { background: none; border: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px 4px; }
.result-count { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 640px) { .search { max-width: none; } .result-count { margin-left: 0; width: 100%; } }
/* Card on file */
.card-line { display: flex; align-items: center; gap: 10px; }
.card-form { flex: 1 1 100%; display: grid; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.pay-line { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pay-line span { font-size: 14px; }
.bad-text { color: var(--bad) !important; }
.card-form[hidden] { display: none; }
/* Licensed states: chips for picked states, a search to add more, and an optional full list */
.picked { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; align-items: center; }
.picked .muted { font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; border-radius: 99px; border: 1px solid #bfe8d6; background: var(--go-soft); color: #0b5c40; font: inherit; font-size: 13px; cursor: pointer; }
.chip b { font-weight: 800; }
.chip svg { opacity: .55; }
.chip:hover svg { opacity: 1; }
.chip:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.st-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.st-add .search { flex: 1 1 220px; max-width: 320px; }
.st-add .search input { width: 100%; padding-left: 36px; border-radius: 99px; }
.states[hidden] { display: none; }
.st[hidden] { display: none; }
/* Orders: close states */
.pill.declined { background: var(--bad-soft); color: var(--bad); }
.pill.canceled { background: #eef1f5; color: var(--muted); }
.row-acts { display: flex; gap: 6px; justify-content: flex-end; }
/* Lead feedback in the lead panel */
.fb .formgrid { gap: 12px; }
.fb-issue { display: grid; gap: 10px; }
.fb-issue[hidden], .fb-save[hidden] { display: none; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip { position: relative; cursor: pointer; }
.rchip input { position: absolute; opacity: 0; pointer-events: none; }
.rchip span { display: block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--card); }
.rchip input:checked + span { background: var(--bad-soft); border-color: #f2c4bf; color: var(--bad); }
.rchip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Lead Quality */
.q-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 28px; gap: 10px; align-items: center; font-size: 13px; }
.bar i { height: 8px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.bar i b { display: block; height: 100%; background: var(--bad); border-radius: 99px; }
.bar em { font-style: normal; font-weight: 700; text-align: right; }
.prog.bad i b { background: var(--bad); }
.timeline li.feedback span b { color: var(--ink); }
@media (max-width: 900px) { .q-grid { grid-template-columns: 1fr; } }
.fb .seg, .head .seg { justify-self: start; }
/* Add-on purchase: buy on the left, the agent's own page on the right */
.addon-buy { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.addon-left { display: grid; gap: 16px; }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.perk { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.perk-ic { width: 22px; height: 22px; flex: none; color: var(--go); }
.perk b { display: block; font-size: 14px; }
.perk span { display: block; font-size: 13px; color: var(--muted); }
.summary { display: grid; gap: 12px; padding: 16px; border-radius: 12px; background: #f6f8fb; border: 1px solid var(--line); }
.summary > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.summary > div:first-child { color: var(--ink); font-weight: 700; font-size: 16px; }
.summary > div:first-child b { font-size: 22px; }
.check.consent-chk { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.5; cursor: pointer; }
.check.consent-chk input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--go); }
.summary .btn { justify-self: start; }
.addon-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.addon-prev { display: grid; gap: 8px; justify-items: center; position: sticky; top: 16px; }
.addon-prev > span { font-size: 13px; font-weight: 600; }
.addon-prev .phone { width: 300px; height: 600px; }
.phone-empty { height: 100%; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; }
.face-ph { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #34d399; font-weight: 800; font-size: 28px; }
.phone-empty span { display: block; width: 100%; padding: 12px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 700; }
@media (max-width: 1000px) { .addon-buy { grid-template-columns: 1fr; } .addon-prev { position: static; } }
@media (max-width: 560px) { .perks { grid-template-columns: 1fr; } }
/* Add-on row: click to open the details */
.addon-box { overflow: hidden; }
.addon-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.addon-row:hover { background: #f8fafc; }
.addon-row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.addon-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--go-soft); }
.addon-name { flex: 1; min-width: 0; }
.addon-name b { display: block; font-size: 16px; }
.addon-name span { display: block; font-size: 13px; color: var(--muted); }
.addon-price { font-size: 18px; font-weight: 800; white-space: nowrap; }
.addon-price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.chev { color: var(--muted); transition: transform .2s; flex: none; }
.addon-row[aria-expanded=true] .chev { transform: rotate(180deg); }
.addon-box .addon-buy { padding: 4px 20px 22px; border-top: 1px solid var(--line); padding-top: 20px; }
.addon-buy[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }
.boxes { display: grid; gap: 16px; }
.box-title { margin: 0; font-size: 18px; }
.nav-sec { margin: 18px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: rgba(255,255,255,.45); }
.agent-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.agent-sub { margin: 0; color: var(--muted); font-size: 14px; }
.mini-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini-tiles div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mini-tiles span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-tiles b { font-size: 20px; }
@media (max-width: 480px) { .mini-tiles { grid-template-columns: 1fr 1fr; } }
/* Popup */
.dlg { border: 0; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(14,23,38,.45); }
.dlg::backdrop { background: rgba(14,23,38,.45); }
.dlg-body { display: grid; gap: 16px; padding: 22px; }
.dlg-body h2 { margin: 0; font-size: 18px; }
.dlg-acts { display: flex; justify-content: flex-end; gap: 8px; }
.comp-list { display: grid; gap: 8px; }
.comp-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.comp-row input { width: 18px; height: 18px; accent-color: var(--go); flex: none; }
.comp-row:has(input:checked) { border-color: var(--go); background: #f4fbf8; }
.comp-row.off { opacity: .6; cursor: default; }
.comp-name b { display: block; }
.comp-name span { display: block; font-size: 13px; color: var(--muted); }

/* Profile pages */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.prof-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.prof-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prof-head h1 .pill { font-size: 12px; }
.prof-head p { margin: 4px 0 0; }
.prof-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.prof-stats { margin-bottom: 20px; }
.prof-stats div { background: var(--card); }
.prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.prof-grid .kv { margin: 0; }
@media (max-width: 800px) { .prof-grid { grid-template-columns: 1fr; } }

/* Lead feedback, calm version: soft box, quiet choices, a plain checklist */
.fb { background: #f7f8fa; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.fb-form { display: grid; gap: 12px; }
.fb-form[hidden], .fb-done[hidden] { display: none; }
.fb-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fb-q > span { font-size: 14px; font-weight: 600; color: var(--ink); }
.fb-pick { display: flex; gap: 6px; }
.fb-pick label { position: relative; cursor: pointer; }
.fb-pick input { position: absolute; opacity: 0; pointer-events: none; }
.fb-pick span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: 13px; font-weight: 600; color: var(--muted); }
.fb-pick label:hover span { color: var(--ink); }
.fb-pick input:checked + span { color: var(--ink); border-color: #b9c2cf; box-shadow: inset 0 0 0 1px #b9c2cf; }
.fb-pick input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.fb-issue { display: grid; gap: 10px; }
.fb-issue[hidden] { display: none; }
.fb-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.fb-reasons label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; color: #3b4656; cursor: pointer; }
.fb-reasons input { width: 15px; height: 15px; margin: 0; accent-color: #4b5768; flex: none; }
.fb-issue textarea { font-size: 13px; min-height: 0; }
.fb-done { display: flex; align-items: flex-start; gap: 10px; }
.fb-done div { flex: 1; font-size: 13px; color: var(--muted); }
.fb-done b { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.fb-done span { display: block; margin-top: 2px; }
.fb-mark { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.fb-mark.good { color: #2f7d5b; }
.fb-mark.issue { color: #8a6a2f; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--ink); }
@media (max-width: 420px) { .fb-reasons { grid-template-columns: 1fr; } }

/* Lead profile page (admin) */
.lead-page { max-width: 820px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.lead-page > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.lead-page > header h2 { margin: 0; font-size: 24px; }
.lead-page > header p { margin: 4px 0 0; color: var(--muted); }
.lead-page > .body { padding: 20px 22px; display: grid; gap: 22px; }
.lead-page section h3 { margin: 0 0 10px; font-size: 15px; }
.same-person p { margin: 0 0 10px; }
.panel header .btn.sm { margin-left: auto; margin-right: 8px; align-self: center; }
.lead-page .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .lead-page input, .lead-page select, .lead-page textarea { max-width: 100%; box-sizing: border-box; }
.lead-page > .body > *, .lead-page .formgrid > * { min-width: 0; }
.known { display: grid; grid-template-columns: 80px 1fr; gap: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.known dt { color: var(--muted); font-weight: 600; padding-top: 4px; }
.known dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; background: #f7f8fa; }
.kchip small { color: var(--muted); font-weight: 700; }

/* Leads sheet: scrolls both ways, header and first column stay put, light grid lines like a spreadsheet */
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; max-height: calc(100vh - 290px); min-height: 160px; }
.sheet table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.sheet th, .sheet td { padding: 0 14px; height: 42px; border-bottom: 1px solid var(--line); border-right: 1px solid #eef1f5; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.sheet th { position: sticky; top: 0; z-index: 2; background: #f7f8fa; height: 38px; padding: 0; }
.sheet th:first-child, .sheet td:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); border-right: 1px solid var(--line); }
.sheet th:first-child { z-index: 3; background: #f7f8fa; }
.sheet tbody tr:hover td { background: #f7f9fc; }
.sheet tbody tr:last-child td { border-bottom: 0; }
.sort { display: flex; align-items: center; gap: 6px; width: 100%; height: 100%; padding: 0 14px; background: none; border: 0; font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; text-align: left; white-space: nowrap; }
.sort i { font-style: normal; opacity: .45; font-size: 11px; }
.sort[data-on=true] { color: var(--ink); }
.sort[data-on=true] i { opacity: 1; }
.sort:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.status-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.st-count { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.st-count b { color: var(--ink); }
.st-count.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa5b5; }
.dot.contacted { background: #d99a2b; } .dot.appointment { background: #7c6cf0; } .dot.sold { background: var(--go); }
.dot.not_interested { background: #c9a227; } .dot.bad_number { background: var(--bad); } .dot.new { background: #4a90e2; }

/* Lead row menu */
.lead-menu { position: fixed; z-index: 60; width: 240px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px -12px rgba(14,23,38,.35); }
.lead-menu .lm-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.lead-menu .lm-head b { display: block; font-size: 14px; }
.lead-menu .lm-head span { font-size: 12px; color: var(--muted); }
.lead-menu button, .lead-menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; }
.lead-menu button:hover, .lead-menu a:hover, .lead-menu button:focus-visible, .lead-menu a:focus-visible { background: #f2f4f7; outline: none; }
.lead-menu .lm-ic { color: var(--muted); flex: none; }
.lead-menu .lm-check { margin-left: auto; color: var(--muted); }
.lead-menu .lm-sep { height: 1px; background: var(--line); margin: 4px 0; }
.lead-menu .lm-label { padding: 6px 10px 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lead-menu .dot { flex: none; }

/* Pipeline bar: all statuses in one bar */
.pipeline { display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 6px 8px; margin-bottom: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.pipe { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.pipe b { color: var(--ink); font-weight: 700; }
.pipe:hover { background: #f2f4f7; }
.pipe.on { background: #eef1f5; color: var(--ink); }
.pipe:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.dot.callback { background: #3bb2c9; } .dot.bad_lead { background: #e06666; } .dot.bad_number { background: #e8913a; } .dot.not_interested { background: #d4b23a; }
.head-acts { display: flex; gap: 10px; align-items: center; }
/* Status pills: calm gray with the pipeline color as a dot */
.pill.new, .pill.contacted, .pill.callback, .pill.appointment, .pill.not_interested, .pill.bad_lead, .pill.bad_number { background: #f1f3f6; color: #3b4656; display: inline-flex; align-items: center; gap: 6px; }
.pill.new::before, .pill.contacted::before, .pill.callback::before, .pill.appointment::before, .pill.not_interested::before, .pill.bad_lead::before, .pill.bad_number::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dotc, #9aa5b5); }
.pill.new { --dotc: #4a90e2; } .pill.contacted { --dotc: #d99a2b; } .pill.callback { --dotc: #3bb2c9; } .pill.appointment { --dotc: #7c6cf0; }
.pill.not_interested { --dotc: #d4b23a; } .pill.bad_lead { --dotc: #e06666; } .pill.bad_number { --dotc: #e8913a; }
/* Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.bcol { background: #f3f5f8; border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 160px; }
.bcol.over { border-color: var(--ink); background: #eef1f5; }
.bcol header { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 2px 4px 10px; }
.bcol header b { margin-left: auto; color: var(--muted); }
.bcards { display: grid; gap: 8px; }
.bcard { display: grid; gap: 3px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; cursor: grab; }
.bcard b { font-size: 14px; }
.bcard:hover { border-color: #b9c2cf; }
.bcard.dragging { opacity: .5; }
.bcard:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.bmeta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.bmeta small { color: var(--muted); }

/* Filters button and its panel */
.fwrap { position: relative; }
.fbtn { display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; }
.fbtn.on { border-color: var(--ink); }
.fcount { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 12px; }
.fcount[hidden] { display: none; }
.fpop { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 320px; display: grid; gap: 12px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px -12px rgba(14,23,38,.3); }
.fpop[hidden] { display: none; }
.fpop .fl { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.fpop .pick, .fpop .pick select { width: 100%; max-width: none; }
.fpop .seg { justify-self: start; }
.fpop-acts { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; border-top: 1px solid var(--line); }
.filter-top .result-count { margin-left: auto; }
@media (max-width: 560px) { .fpop { position: fixed; left: 16px; right: 16px; top: auto; width: auto; } }
/* Pipeline bar on the same line as search and Filters */
.filter-top { flex-wrap: wrap; }
.filter-top .search { flex: 0 1 280px; }
.strip-inline { flex: 1 1 auto; min-width: 0; }
.strip-inline .pipeline { margin: 0; padding: 3px 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.strip-inline .pipeline::-webkit-scrollbar { display: none; }
.strip-inline .pipe { padding: 5px 8px; font-size: 13px; white-space: nowrap; }
.filter-top .result-count { margin-left: 0; white-space: nowrap; }

/* Columns: drag headers, or use the Columns panel */
.sheet th[draggable=true] { cursor: grab; }
.sheet th.drop { box-shadow: inset 3px 0 0 var(--ink); }
.col-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.col-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.col-list label { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.col-list input { width: 16px; height: 16px; accent-color: var(--ink); }
.col-list span { display: flex; gap: 4px; }
.col-list .btn.sm { padding: 4px 9px; }
#colBtn[hidden] { display: none; }
.export-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Row checkboxes and the selection bar */
.sheet .ck { width: 44px; min-width: 44px; max-width: 44px; padding: 0; text-align: center; position: sticky; left: 0; z-index: 1; background: var(--card); }
.sheet th.ck { z-index: 3; background: #f7f8fa; }
.sheet .ck input { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; vertical-align: middle; }
.sheet.has-ck th:nth-child(2), .sheet.has-ck td:nth-child(2) { position: sticky; left: 44px; z-index: 1; background: var(--card); border-right: 1px solid var(--line); }
.sheet.has-ck th:nth-child(2) { z-index: 3; background: #f7f8fa; }
.sheet.has-ck th:first-child, .sheet.has-ck td:first-child { border-right: 0; }
.sheet tbody tr.row-sel td { background: #f0f4fb; }
.selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.selbar[hidden], .filter-top[hidden] { display: none; }
.selbar b { margin-right: 6px; font-size: 14px; }
.x-btn { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.x-btn:hover { background: #f2f4f7; color: var(--ink); }
.fl-check { font-size: 13px; color: var(--ink); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.hidden-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #f3f5f8; border: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.hidden-note[hidden] { display: none; }

/* Row menu side menus */
.lm-sub { position: relative; }
.lm-arrow { margin-left: auto; color: var(--muted); font-size: 16px; line-height: 1; }
.lm-dot { margin: 0 4px; }
.lm-fly { display: none; position: absolute; left: calc(100% + 2px); top: -6px; width: 220px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px -12px rgba(14,23,38,.35); }
.lead-menu.fly-left .lm-fly { left: auto; right: calc(100% + 2px); }
.lm-sub.open > .lm-fly { display: block; }
.lm-sub.open > .lm-parent { background: #f2f4f7; }
.lm-fly svg { color: var(--muted); flex: none; }
.lt-cell { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #3b4656; }
.lang-mini { padding: 1px 6px; border-radius: 5px; background: #fdeee0; color: #9a4a0c; font-size: 11px; font-weight: 700; }

/* Column menu, "+" column and Undo toasts */
.sheet th.add-col, .sheet td.add-col { width: 44px; min-width: 44px; border-right: 0; }
.sheet th.add-col .sort { justify-content: center; font-size: 16px; }
.lm-label-inline { display: block; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.toast.has-act { display: flex; align-items: center; gap: 14px; }
.toast button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: #8fd3b4; text-decoration: underline; cursor: pointer; }
/* Status and Lead Type columns get a light tint so they stand out */
.sheet td[data-c=status] { background: #f4f6fb; }
.sheet td[data-c=type] { background: #f8f5fb; }
.sheet th[data-colkey=status] { background: #eceff7; }
.sheet th[data-colkey=type] { background: #f1ecf7; }
.sheet tbody tr:hover td[data-c=status], .sheet tbody tr:hover td[data-c=type] { background: #eef2f9; }
.sheet tbody tr.row-sel td[data-c=status], .sheet tbody tr.row-sel td[data-c=type] { background: #e6edf9; }
/* Lead side panel, clean version: soft gray page, each part in its own white card */
.panel { width: min(600px, 100%); background: #f7f8fa; }
.panel header { background: #fff; padding: 18px 22px; }
.panel header h2 { font-size: 21px; letter-spacing: -0.01em; }
.panel .body { padding: 16px 18px 40px; gap: 12px; }
.panel .body > .quick, .panel .body > .formgrid { padding: 0 4px; }
.panel .body > section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 14px; }
.panel .body > section.fb { background: var(--card); }
.panel h3 { font-size: 14px; color: var(--ink); font-weight: 700; margin: 0 0 12px; }
.panel .kv { grid-template-columns: 140px 1fr; gap: 0; font-size: 14px; }
.panel .kv dt, .panel .kv dd { padding: 7px 0; border-bottom: 1px solid #f0f2f5; }
.panel .kv dt:last-of-type, .panel .kv dd:last-of-type { border-bottom: 0; }
.panel .same-person .table-wrap { border: 1px solid var(--line); border-radius: 10px; box-shadow: none; }
.panel .same-person .known { margin-bottom: 14px; }
.panel .timeline { margin: 0; }
.panel textarea { background: #fbfcfd; }
@media (max-width: 640px) { .panel .kv { grid-template-columns: 1fr; } .panel .kv dt { padding-bottom: 0; border-bottom: 0; } }
/* Check badges */
.chk-row { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chk { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.chk.ok { background: var(--go-soft); color: #0b7a54; } .chk.warn { background: var(--warn-soft); color: #8a5a12; } .chk.bad { background: var(--bad-soft); color: var(--bad); }
.sheet .chk { padding: 2px 7px; }

/* Lead Products and Invoices */
.tag.excl { background: #eaf3ee; color: #1f6b4a; }
.tag-row { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.type .was { color: var(--muted); text-decoration: line-through; font-size: 12px; }
.money-in { display: inline-flex; align-items: center; gap: 4px; }
.money-in input, .num-in { width: 110px; }
.pill.inv-unpaid, .pill.unpaid { background: var(--warn-soft); color: #8a5a12; }
.pill.inv-paid { background: var(--go-soft); color: #0b7a54; }
.pill.inv-void { background: #eef1f5; color: var(--muted); }
.inv-build { display: grid; gap: 14px; max-width: 900px; }
.inv-line { display: grid; grid-template-columns: minmax(0, 2fr) 90px minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 10px; align-items: end; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.inv-line:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.inv-sum { max-width: 360px; }
.sum-dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; margin: 0; }
.sum-dl dt { color: var(--muted); } .sum-dl dd { margin: 0; text-align: right; }
.sum-dl .tot { font-weight: 800; font-size: 18px; color: var(--ink); border-top: 1px solid var(--line); padding-top: 8px; }
.invoice { padding: 32px; max-width: 820px; display: grid; gap: 24px; }
.inv-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.inv-top > div, .inv-to, .inv-meta { display: grid; gap: 2px; }
.inv-brand { font-size: 22px; }
.inv-meta { text-align: right; }
.inv-table th { background: none; border-bottom: 2px solid var(--ink); }
.inv-totals { justify-self: end; min-width: 260px; }
.inv-notes { margin: 0; padding: 12px 14px; background: #f7f8fa; border-radius: 10px; white-space: pre-line; }
@media (max-width: 760px) { .inv-line { grid-template-columns: 1fr 1fr; } .inv-meta { text-align: left; } }
@media print {
  .side, .topbar, .no-print, .toast { display: none !important; }
  .shell, main { display: block !important; padding: 0 !important; margin: 0 !important; }
  body { background: #fff; }
  .invoice { border: 0; box-shadow: none; max-width: none; padding: 0; }
}

/* Profile tab blocks */
.pblock { margin-top: 20px; }
.pblock:first-child { margin-top: 0; }
.pblock > .sub-h { margin: 0 0 10px; font-size: 16px; }

/* Keyboard shortcuts */
.keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; align-items: center; }
.keys dd { margin: 0; color: var(--ink); }
kbd { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: #f7f8fa; font: 600 12px/1.4 'Public Sans', system-ui, sans-serif; white-space: nowrap; }
.icon-btn { padding-left: 12px; padding-right: 12px; font-size: 15px; }

/* Agent Overview */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
.home-grid > section { display: grid; gap: 10px; }
.home-grid .head { margin: 0; }
.home-order { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 12px; align-items: center; color: inherit; text-decoration: none; padding: 4px 0; }
.home-order:hover { color: var(--ink); }
.home-page { display: flex; align-items: center; gap: 10px; }
.home-page .btn { margin-left: auto; }
h1 .count { font-size: 13px; vertical-align: middle; padding: 3px 10px; border-radius: 99px; background: var(--warn-soft); color: #8a5a12; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } .home-order { grid-template-columns: 1fr; } }

.price-rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.price-rules .kchip { gap: 8px; }
.price-rules small { color: var(--muted); }

@media (max-width: 700px) {
  .lm-fly, .lead-menu.fly-left .lm-fly { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .lead-menu { max-height: calc(100vh - 16px); overflow-y: auto; }
}

/* ---------- Update lead answers ---------- */
.ans-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ans-head h3 { margin: 0; }
.ans-form { margin-bottom: 4px; }
.ans-acts { display: flex; gap: 8px; }
.upd-mark { margin-left: 6px; padding: 1px 7px; border: 0; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font: 700 11px/1.6 inherit; cursor: pointer; vertical-align: 1px; }
.upd-was { display: block; font-size: 13px; color: var(--muted); }
.upd-dot { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--blue); vertical-align: 2px; }
.orig-list { margin-top: 10px; padding: 10px 12px; background: var(--bg); border-radius: 8px; font-size: 14px; }
#origBtn { margin-top: 10px; }
.timeline li.update::before { background: var(--blue); }

/* ---------- Callbacks ---------- */
.cb-late { color: var(--bad); font-weight: 700; }
.cb-line { margin: 8px 0 0; font-size: 14px; }
.cb-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-due { margin-bottom: 20px; padding: 14px 16px 6px; }
.cb-due .sub-h { margin: 0 0 6px; }
.cb-due td { padding-left: 0; }
.cb-due .cb-call { text-align: right; padding-right: 0; }
.timeline li.callback::before { background: #3bb2c9; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #34d399; color: #0e1726; font-size: 12px; font-weight: 800; text-align: center; line-height: 20px; }

/* ---------- Agent stats ---------- */
.agent-stats { padding: 16px 18px; margin-bottom: 20px; }
.as-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.as-head .sub-h { margin: 0; }
.as-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 12px; }
.as-grid > div { display: grid; align-content: start; gap: 2px; }
.as-grid span { color: var(--muted); font-size: 13px; font-weight: 600; }
.as-grid b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.as-grid small { color: var(--muted); font-size: 12px; }
.as-grid .as-main b { font-size: 40px; line-height: 1.1; color: #0b7a54; }
@media (max-width: 760px) { .as-grid { grid-template-columns: 1fr 1fr; } .as-grid .as-main { grid-column: 1 / -1; } }

/* ---------- Unfinished forms (admin) ---------- */
.dot.unfinished { background: #b8c0cc; }
.row-unf td { color: var(--muted); }
.row-unf td b { color: var(--muted); }
.unf-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Phone width: the Leads page never scrolls sideways. Wide rows scroll inside themselves. ---------- */
.filters { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .strip-inline { flex: 1 1 100%; order: 3; }
  .head-acts { flex-wrap: wrap; }
}
.ask-text { margin: 0; font-size: 15px; }
.price-unset { display: block; margin-top: 4px; font-size: 12px; }
