:root {
  --bg: #0c0d0f;
  --panel: #131417;
  --panel-2: #1a1b1f;
  --hover: #1f2125;
  --line: #24262b;
  --line-2: #2f3137;
  --text: #ececee;
  --muted: #a1a1aa;
  --faint: #71717a;
  --accent: #4ade80;
  --accent-ink: #052e16;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --red: #f87171;
  --radius: 10px;
  --sidebar: 208px;
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { opacity: .5; cursor: default; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--muted); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: 8px; z-index: 99; padding: 8px 12px; background: var(--text); color: var(--bg); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.faint { color: var(--faint); }
.meta { display: block; color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.mono, .phone, .kpi strong, .count { font-variant-numeric: tabular-nums; }
.hint { color: var(--faint); font-size: 12.5px; margin-top: 10px; }
.label { display: block; color: var(--faint); font-size: 12px; margin-bottom: 3px; }

/* Shell */
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 18px 12px; border-right: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: .02em; text-decoration: none; padding: 4px 8px; }
.brand-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 700; }
.navigation { display: grid; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px; color: var(--muted); text-align: left; font-weight: 500; }
.nav-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-link:hover { background: var(--panel); color: var(--text); }
.nav-link.active { background: var(--panel-2); color: var(--text); }
.nav-count { margin-left: auto; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; height: 52px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(12, 13, 15, .85); backdrop-filter: blur(10px); }
.topbar-brand { display: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sync-state { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.sync-state.connected .sync-dot { background: var(--accent); }
.sync-state.error .sync-dot { background: var(--red); }
.member-button { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 4px; border-radius: 99px; border: 1px solid var(--line-2); font-weight: 500; }
.member-button:hover { background: var(--panel); }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 11px; font-weight: 600; flex: none; }
main { padding: 28px 28px 80px; max-width: 1320px; width: 100%; }
main:focus { outline: none; }
.connection-banner { margin-bottom: 16px; padding: 10px 14px; border: 1px solid #5b2424; border-radius: var(--radius); background: #1c1012; color: #fecaca; }

/* Buttons & inputs */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 500; white-space: nowrap; text-decoration: none; }
.button:hover { background: var(--hover); }
.button-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.button-primary:hover { background: #fff; }
.button-small { height: 28px; padding: 0 10px; font-size: 13px; }
.button-block { width: 100%; height: 40px; }
.button-call { height: 44px; padding: 0 18px; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; font-size: 15px; flex: 1; }
.button-call:hover { background: #86efac; }
.text-button { color: var(--muted); font-weight: 500; font-size: 13px; }
.text-button:hover { color: var(--text); }
input, select, textarea { background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; height: 34px; min-width: 0; }
textarea { height: auto; padding: 8px 10px; resize: vertical; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--muted); }
input[type="date"] { color-scheme: dark; }
input[type="checkbox"], input[type="radio"] { height: auto; accent-color: var(--accent); }
select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2371717a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field > span:first-child { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.field input, .field select { width: 100%; }
.field-hint { color: var(--faint); font-size: 12px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-error, .inline-error { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: #1c1012; border: 1px solid #5b2424; color: #fecaca; font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }

/* Page layout */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; }
.page-head p { color: var(--faint); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 14px; margin-bottom: 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card h2 { font-size: 15px; margin-bottom: 10px; }
.card h3 { font-size: 13px; color: var(--muted); margin: 18px 0 6px; font-weight: 600; }
.card p, .card li { color: var(--text); }
.card ol, .card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 48px 16px; color: var(--faint); text-align: center; }
.empty-state strong { color: var(--text); }
.empty-state .button { margin-top: 6px; }

/* Calls */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.kpi { background: var(--panel); padding: 14px 16px; }
.kpi strong { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.kpi span { color: var(--faint); font-size: 12.5px; }
.kpi-hot strong { color: var(--amber); }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tab { height: 30px; padding: 0 12px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.toolbar .count { margin-left: auto; color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters .search { width: 280px; }
.filters select { max-width: 170px; color: var(--muted); }
.table-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.table-wrap { overflow-x: auto; }
.crm-table { width: 100%; border-collapse: collapse; }
.crm-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.crm-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.crm-table tr:last-child td { border-bottom: 0; }
.crm-table tbody tr:hover { background: var(--panel-2); }
.crm-table tr.selected { background: var(--hover); }
.crm-table tr.is-blocked .company-name { color: var(--faint); text-decoration: line-through; }
.check-cell { width: 36px; }
.company-name { font-weight: 600; text-align: left; }
.company-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-cell { color: var(--muted); max-width: 220px; }
.phone { font-weight: 500; text-decoration: none; white-space: nowrap; }
.phone:hover { color: var(--accent); }
.plain-select { height: 28px; background-color: transparent; border-color: transparent; color: var(--muted); font-size: 13px; }
.plain-select:hover { border-color: var(--line-2); }
.plain-select.is-due { color: var(--amber); }
.status-select { height: 26px; border-radius: 99px; font-size: 12.5px; font-weight: 500; padding-left: 10px; border-color: var(--line-2); }
.load-more { width: 100%; padding: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.load-more:hover { color: var(--text); background: var(--panel-2); }
.bulk-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.bulk-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.bulk-toolbar select { height: 28px; }
.map-section { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.map-section summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; font-weight: 500; list-style: none; }
.map-section summary::-webkit-details-marker { display: none; }
.map-section summary::before { content: "+"; color: var(--faint); width: 10px; }
.map-section[open] summary::before { content: "−"; }
.map-section .count { margin-left: auto; color: var(--faint); font-size: 12.5px; }
.map-section .hint { padding: 0 16px 12px; }
.map-container { height: 460px; background: var(--bg); border-top: 1px solid var(--line); }

/* Status colors */
.status-new { --s: var(--muted); }
.status-attempted { --s: var(--amber); }
.status-interested { --s: var(--blue); }
.status-won { --s: var(--accent); }
.status-passed { --s: var(--faint); }
.status-blocked { --s: var(--red); }
.status-select, .pill { color: var(--s); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.pill::before, .dot { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--s); flex: none; }
.dot { display: inline-block; }
.blocked-text { color: var(--red); }
.is-due { color: var(--amber); }

/* Company drawer */
dialog { color: var(--text); background: var(--panel); border: 1px solid var(--line-2); padding: 0; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(520px, 100vw); height: 100dvh; max-height: 100dvh; border-width: 0 0 0 1px; padding: 24px; overflow-y: auto; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 7px; color: var(--faint); font-size: 20px; line-height: 1; }
.dialog-close:hover { background: var(--panel-2); color: var(--text); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-right: 36px; margin-bottom: 16px; }
.detail-head h2 { font-size: 20px; }
.detail-head .meta { font-size: 13px; }
.blocked-notice { padding: 10px 12px; border-radius: 8px; border: 1px solid #5b2424; background: #1c1012; color: #fecaca; margin-bottom: 12px; }
.call-row { display: flex; gap: 8px; margin-bottom: 12px; }
.call-row .button:not(.button-call) { height: 44px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px; font-size: 13px; }
.links a { color: var(--muted); }
.links a:hover { color: var(--text); }
.ask-for, .fit { padding: 12px 14px; border-radius: 10px; background: var(--panel-2); margin-bottom: 10px; display: grid; gap: 2px; }
.ask-for strong { font-size: 15px; }
.ask-for a { font-size: 13px; color: var(--muted); }
.fit p { color: var(--muted); }
.block { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.block h3 { font-size: 13px; margin-bottom: 10px; display: flex; justify-content: space-between; gap: 10px; }
.block h3 .faint { font-weight: 400; font-size: 12px; }
.status-options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.status-option { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; font-weight: 500; }
.status-option::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--s); }
.status-option:hover { color: var(--text); }
.status-option.chosen { color: var(--text); background: var(--hover); border-color: var(--s); }
.notes-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.notes-feedback { color: var(--faint); font-size: 12.5px; margin-right: auto; }
.save-pending { color: var(--amber); }
.conflict-notice { padding: 10px 12px; border-radius: 8px; border: 1px solid #5c4813; background: #1d1809; margin-bottom: 10px; font-size: 13px; }
.conflict-notice details { margin: 6px 0; color: var(--muted); }
.conflict-actions { display: flex; gap: 14px; }
.more { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.more summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.more[open] summary { margin-bottom: 12px; }
.more > p { color: var(--muted); margin-bottom: 10px; }
.more h4 { font-size: 12.5px; color: var(--faint); margin: 14px 0 6px; font-weight: 500; }
.more ol { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.facts dt { color: var(--faint); font-size: 12px; }
.facts dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tags span { padding: 2px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); font-size: 12px; }
.extra-contact { padding: 8px 0; border-top: 1px solid var(--line); }
.extra-contact div { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.source { display: inline-block; margin: 8px 12px 0 0; font-size: 13px; color: var(--muted); }
.activity-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-head { display: flex; justify-content: space-between; gap: 10px; }
.activity-head span { color: var(--faint); font-size: 12.5px; }
.activity-item p { color: var(--muted); margin-top: 3px; }

/* Modals */
.modal { width: min(420px, calc(100vw - 32px)); border-radius: 14px; padding: 24px; }
.modal-wide { width: min(640px, calc(100vw - 32px)); max-height: 88dvh; }
.modal h2 { font-size: 18px; margin-bottom: 6px; padding-right: 30px; }
.modal > .faint, .modal form > .faint { margin-bottom: 18px; }
.modal #share-link { width: 100%; margin-bottom: 10px; color: var(--muted); }
.modal .text-button { display: block; margin: 12px auto 0; }
.member-choice { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.member-choice legend { color: var(--muted); font-size: 12.5px; font-weight: 500; margin-bottom: 6px; }
.member-choice input { position: absolute; opacity: 0; }
.member-choice span { display: grid; place-items: center; height: 42px; border-radius: 9px; border: 1px solid var(--line-2); font-weight: 500; cursor: pointer; }
.member-choice input:checked + span { border-color: var(--text); background: var(--hover); }
.member-choice input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.editor-section-title { font-size: 13px; color: var(--muted); margin: 18px 0 10px; }
.contact-editor { padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.contact-editor-heading { display: flex; justify-content: space-between; align-items: center; }
.profile-section { margin-bottom: 12px; color: var(--muted); }
.latest-profile p { margin: 4px 0; }
.profile-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Pipeline */
.pipeline-grid { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.pipeline-lane { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 200px; max-height: calc(100dvh - 240px); overflow-y: auto; }
.lane-heading { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 2px 4px 10px; position: sticky; top: -10px; background: var(--panel); }
.lane-heading .count { margin-left: auto; color: var(--faint); font-weight: 400; }
.lane-more { padding: 8px 4px; font-size: 12.5px; }
.pipeline-card { padding: 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 6px; }
.pipeline-card-title { font-weight: 600; text-align: left; }
.pipeline-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.owner-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.owner-chip span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--hover); font-size: 10px; font-weight: 600; }

/* Maps */
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.prototype-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prototype-cover { display: block; aspect-ratio: 16 / 9; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.prototype-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prototype-body { padding: 14px; }
.prototype-body h2 { font-size: 14.5px; }
.prototype-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

/* Team & script */
.team-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; align-items: start; }
.copy-row { display: flex; gap: 8px; margin-top: 12px; }
.copy-row input { flex: 1; color: var(--muted); }
.team-member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.team-member > div { flex: 1; }
.team-member + .text-button { margin-top: 12px; }
.script-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; align-items: start; }
.script-side { display: grid; gap: 12px; }
.script { margin: 0 0 12px; padding: 14px 16px; border-left: 2px solid var(--accent); background: var(--panel-2); border-radius: 0 10px 10px 0; font-size: 15px; line-height: 1.6; }
.price { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 12px; }
.price .faint { font-size: 13px; font-weight: 400; letter-spacing: 0; }
.card ul + .faint { margin-top: 12px; font-size: 12.5px; }

/* Toast, leaflet */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 500; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); }
.noscript { padding: 20px; }
.leaflet-container { background: var(--bg); font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--faint); }
.leaflet-bar a { background: var(--panel-2); color: var(--text); border-color: var(--line-2); }
.leaflet-bar a:hover { background: var(--hover); }
.leaflet-control-attribution { background: rgba(12, 13, 15, .7) !important; color: var(--faint); }
.leaflet-control-attribution a { color: var(--muted); }
.state-tooltip { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.map-popup-buyers { display: grid; gap: 4px; margin-top: 8px; }
.map-select-link { text-align: left; color: var(--accent); font-weight: 500; }
.map-count-pin { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 700; border: 2px solid var(--bg); }
.map-count-pin.selected { background: var(--accent); }

/* Phone & tablet */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .team-grid, .script-grid { grid-template-columns: 1fr; }
  .filters .search { width: 100%; }
  .toolbar { align-items: flex-start; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: auto 0 0 0; height: auto; z-index: 30; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); flex-direction: row; background: rgba(12, 13, 15, .95); backdrop-filter: blur(10px); }
  .sidebar .brand { display: none; }
  .navigation { grid-template-columns: repeat(5, 1fr); width: 100%; }
  .nav-link { flex-direction: column; justify-content: center; gap: 3px; height: 50px; padding: 0; font-size: 11px; }
  .nav-link svg { width: 20px; height: 20px; }
  .nav-count { display: none; }
  .topbar { padding: 0 16px; }
  .topbar-brand { display: inline-flex; padding-left: 0; }
  .sync-state #sync-label { display: none; }
  #member-name { display: none; }
  .member-button { padding: 0 4px; }
  main { padding: 20px 16px 100px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-actions .button { flex: 1; }
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .count { margin-left: 0; }
  .filters select { flex: 1; max-width: none; }
  .table-card { background: transparent; border: 0; }
  .crm-table thead { display: none; }
  .crm-table, .crm-table tbody, .crm-table tr { display: block; }
  .crm-table tr { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
  .crm-table td { display: block; padding: 0; border: 0; }
  .crm-table .check-cell { display: none; }
  .company-cell { grid-column: 1 / -1; }
  .contact-cell { grid-column: 1 / -1; max-width: none; }
  .contact-cell .meta { display: inline; margin-left: 6px; }
  .phone-cell { grid-column: 1; align-self: center; }
  .phone { font-size: 15px; color: var(--accent); }
  .status-cell { grid-column: 2; grid-row: 3; }
  .owner-cell, .date-cell { display: none !important; }
  .load-more { border: 1px solid var(--line); border-radius: 12px; }
  .bulk-toolbar { flex-wrap: wrap; border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--line); }
  .map-container { height: 340px; }
  .drawer { width: 100vw; border: 0; padding: 20px 16px calc(32px + env(safe-area-inset-bottom)); }
  .two-fields, .facts { grid-template-columns: 1fr; gap: 0; }
  .facts { gap: 8px; }
  .notice { flex-direction: column; align-items: stretch; }
  .toast { bottom: 84px; }
}
.company-cell { min-width: 220px; }
.date-cell input[value=""] { color: var(--faint); opacity: .55; }
.date-cell input[value=""]:hover, .date-cell input[value=""]:focus { opacity: 1; }
@media (max-width: 760px) {
  .hide-mobile { display: none !important; }
  .contact-cell.is-empty { display: none !important; }
  .company-cell { min-width: 0; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .kpi { padding: 10px; }
  .kpi strong { font-size: 18px; }
  .kpi span { font-size: 11px; display: block; line-height: 1.25; }
  .filters select { flex: 1 1 40%; }
}
.drawer { max-width: 100vw; }
@media (max-width: 760px) { .status-cell { grid-row: auto; } }

/* ---------- Accents ---------- */
:root { --violet: #a78bfa; --cyan: #22d3ee; --pink: #f472b6; --orange: #fb923c; }
.cat-fleet-services { --c: var(--blue); }
.cat-brewery-suppliers { --c: var(--amber); }
.cat-marina-suppliers { --c: var(--cyan); }
.cat-commercial-cleaning { --c: var(--violet); }
.cat-msp { --c: var(--pink); }
.cat-industrial-suppliers { --c: var(--orange); }
.cat-other { --c: var(--muted); }
main { position: relative; }
.workspace { background: radial-gradient(900px 380px at 15% -120px, rgba(74, 222, 128, .07), transparent 70%), radial-gradient(700px 300px at 95% -100px, rgba(96, 165, 250, .06), transparent 70%); }
.brand-mark { background: linear-gradient(135deg, #86efac, #4ade80 55%, #22c55e); color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(74, 222, 128, .3), 0 4px 16px rgba(74, 222, 128, .2); }
.nav-link { position: relative; }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-link.active svg { color: var(--accent); }
.icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.text-button { display: inline-flex; align-items: center; gap: 5px; }
.button .icon { width: 14px; height: 14px; }

/* Logos */
.logo { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; flex: none; overflow: hidden; background: color-mix(in srgb, var(--c) 16%, var(--panel-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); color: var(--c); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.logo.has-img > span { visibility: hidden; }
.logo-sm { width: 22px; height: 22px; border-radius: 6px; font-size: 9px; }
.logo-sm img { padding: 3px; }
.logo-lg { width: 52px; height: 52px; border-radius: 13px; font-size: 17px; }
.logo-lg img { padding: 9px; }
.company-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pipeline-card .company-wrap { gap: 8px; }
.cat { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; color: var(--c); font-weight: 500; }
.cat::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--c); }
.top-fit { display: inline-block; margin-left: 8px; padding: 0 6px; border-radius: 5px; background: rgba(74, 222, 128, .1); color: var(--accent); font-size: 11px; font-weight: 600; line-height: 18px; }
.crm-table tbody tr { box-shadow: inset 2px 0 0 transparent; transition: background .12s, box-shadow .12s; }
.crm-table tbody tr:hover { box-shadow: inset 2px 0 0 var(--accent); }
.phone { display: inline-flex; padding: 3px 8px; margin-left: -8px; border-radius: 6px; }
.phone:hover { background: rgba(74, 222, 128, .1); }

/* Status pills tinted */
.pill { background: color-mix(in srgb, var(--s) 12%, transparent); border-color: color-mix(in srgb, var(--s) 35%, transparent); }
.status-select { background-color: color-mix(in srgb, var(--s) 10%, var(--panel)); border-color: color-mix(in srgb, var(--s) 30%, transparent); }
.status-option.chosen { background: color-mix(in srgb, var(--s) 14%, transparent); }

/* KPIs */
.kpis { grid-template-columns: repeat(3, 1fr) 1.6fr; gap: 10px; background: none; border: 0; overflow: visible; }
.kpi { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; align-content: start; }
.kpi::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--k, var(--line-2)); opacity: .8; }
.kpi-amber { --k: var(--amber); } .kpi-blue { --k: var(--blue); } .kpi-violet { --k: var(--violet); } .kpi-calls { --k: var(--accent); }
.kpi-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; margin-bottom: 8px; color: var(--k); background: color-mix(in srgb, var(--k) 13%, transparent); }
.kpi-hot strong { color: var(--amber); }
.kpi-calls-top { display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 10px; }
.kpi-calls-top .kpi-icon { margin: 0; grid-row: span 2; }
.kpi-calls-top span:last-child { align-self: end; padding-bottom: 4px; }
.bars { display: grid; gap: 5px; margin-top: 10px; }
.bar { display: grid; grid-template-columns: 14px 1fr 22px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--faint); }
.bar i { height: 6px; border-radius: 9px; background: var(--panel-2); overflow: hidden; }
.bar em { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #22c55e, var(--accent)); }
.bar b { text-align: right; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Drawer */
.detail-head { align-items: center; gap: 14px; }
.detail-title { flex: 1; min-width: 0; }
.button-call { box-shadow: 0 6px 24px rgba(74, 222, 128, .18); }
.fit { border-left: 2px solid var(--violet); border-radius: 0 10px 10px 0; }
.ask-for { border-left: 2px solid var(--blue); border-radius: 0 10px 10px 0; }
.opener { margin-top: 14px; padding: 14px; border-radius: 12px; background: linear-gradient(180deg, rgba(74, 222, 128, .07), rgba(74, 222, 128, .02)); border: 1px solid rgba(74, 222, 128, .2); }
.opener-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.opener-head h3 { font-size: 13px; color: var(--accent); }
.opener-line { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 7px 0; }
.opener-line + .opener-line { border-top: 1px dashed var(--line-2); }
.opener-line p { font-size: 14px; line-height: 1.55; }
.step { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(74, 222, 128, .14); color: var(--accent); font-size: 11.5px; font-weight: 700; }

/* Pipeline */
.pipeline-lane { padding-top: 0; }
.lane-heading { margin: 0 -10px 8px; padding: 12px 14px 10px; border-top: 2px solid var(--s); border-radius: 12px 12px 0 0; }
.lane-new { --s: var(--muted); } .lane-attempted { --s: var(--amber); } .lane-interested { --s: var(--blue); } .lane-won { --s: var(--accent); } .lane-passed { --s: var(--faint); }
.pipeline-card { transition: border-color .12s, transform .12s; }
.pipeline-card:hover { border-color: var(--line-2); transform: translateY(-1px); }

/* Maps */
.prototype-card { transition: border-color .15s, transform .15s; }
.prototype-card:hover { border-color: rgba(74, 222, 128, .35); transform: translateY(-2px); }

/* Script */
.call-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.call-steps li { display: flex; gap: 10px; padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); position: relative; }
.call-steps li strong { display: block; }
.call-steps .time { display: inline-block; margin: 2px 0 6px; color: var(--accent); font-size: 11.5px; font-weight: 600; }
.call-steps p { color: var(--faint); font-size: 12.5px; }
.script-main { display: grid; gap: 12px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head .faint { font-size: 12.5px; }
.card-accent { border-color: rgba(74, 222, 128, .25); background: linear-gradient(180deg, rgba(74, 222, 128, .06), var(--panel) 60%); }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cat-tab { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; font-weight: 500; }
.cat-tab::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.cat-tab.active { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.card .opener-line p { font-size: 15px; }
.card .opener-line + .button { margin-top: 10px; }
.questions { counter-reset: q; list-style: none; padding: 0 !important; }
.questions li { padding: 8px 12px; border-radius: 8px; background: var(--panel-2); }
.say { padding: 12px 0; border-top: 1px solid var(--line); }
.say:first-of-type { border-top: 0; padding-top: 0; }
.say-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.say p { line-height: 1.55; }
.ladder { display: grid; gap: 8px; }
.ladder > div { display: grid; grid-template-columns: 78px 1fr; column-gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.ladder p { grid-column: 2; color: var(--faint); font-size: 12.5px; }
.tier { grid-row: span 2; align-self: center; font-weight: 700; font-size: 15px; color: var(--muted); }
.tier-main { color: var(--accent); font-size: 18px; }
.objections details { border-top: 1px solid var(--line); padding: 10px 0; }
.objections details:first-child { border-top: 0; padding-top: 0; }
.objections summary { cursor: pointer; font-weight: 500; }
.objections summary:hover { color: var(--accent); }
.objections p { margin-top: 6px; color: var(--muted); }
.checks { list-style: none; padding: 0 !important; }
.checks li { display: flex; gap: 8px; }
.checks li::before { content: "✓"; color: var(--accent); font-weight: 700; }

@media (max-width: 1100px) { .call-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(3, 1fr); } .kpi-calls { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kpi-icon { width: 22px; height: 22px; margin-bottom: 6px; }
  .call-steps { grid-template-columns: 1fr; }
  .crm-table tbody tr:hover { box-shadow: none; }
  .company-wrap { gap: 10px; }
  .logo-lg { width: 44px; height: 44px; }
  .phone { margin-left: 0; padding-left: 0; }
}

/* ---------- Dialer ---------- */
.button-go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; box-shadow: 0 4px 20px rgba(74, 222, 128, .22); }
.button-go:hover { background: #86efac; }
.open-now { color: var(--accent); }
.local { display: block; margin-top: 3px; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.local.open { color: var(--accent); }
.local::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; opacity: .7; vertical-align: 1px; }
.detail-title + .local, .detail-head .local { margin-top: 4px; }
.dialer-bar { display: flex; align-items: center; gap: 10px; margin: -6px 40px 16px 0; padding: 8px 12px; border-radius: 10px; background: rgba(74, 222, 128, .08); border: 1px solid rgba(74, 222, 128, .25); }
.dialer-bar .faint { margin-right: auto; font-size: 12.5px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.outcomes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.outcome { --o: var(--muted); height: 38px; padding: 0 6px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--o) 35%, var(--line-2)); background: color-mix(in srgb, var(--o) 8%, var(--panel)); color: var(--text); font-size: 12.5px; font-weight: 500; transition: background .12s, transform .08s; }
.outcome:hover { background: color-mix(in srgb, var(--o) 18%, var(--panel)); }
.outcome:active { transform: scale(.97); }
.outcome-gatekeeper, .outcome-voicemail { --o: var(--amber); }
.outcome-conversation { --o: var(--blue); }
.outcome-demo_booked { --o: var(--accent); font-weight: 650; }
.outcome-not_interested, .outcome-wrong_number { --o: var(--faint); }
.outcome-do_not_call { --o: var(--red); }
.follow-field { margin-bottom: 0; }
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.proof div { padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(74, 222, 128, .06), var(--panel) 70%); }
.proof strong { display: block; font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.proof span { color: var(--faint); font-size: 12.5px; }
@media (max-width: 760px) {
  .page-actions .button-go { flex: 1; height: 44px; font-size: 15px; }
  .outcomes { grid-template-columns: repeat(2, 1fr); }
  .outcome { height: 44px; font-size: 13.5px; }
  .phone-cell .local { display: inline-block; margin-left: 8px; }
  .proof { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .proof div { padding: 10px; }
  .proof strong { font-size: 18px; }
  .dialer-bar { margin-right: 36px; }
}
