:root {
  --bg: #f5f1e8;
  --paper: #fffdf7;
  --ink: #11110f;
  --muted: #6c6a63;
  --line: #191915;
  --soft-line: #d9d3c7;
  --accent: #ff5f3d;
  --accent-2: #b6f23a;
  --accent-3: #6ea8ff;
  --danger: #c62d2d;
  --success: #1f7a45;
  --warning: #9b5f00;
  --shadow: 5px 5px 0 var(--line);
  --radius: 14px;
  --sidebar-width: 250px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: var(--accent-2); color: var(--ink); }

.skip-link { position: fixed; left: 10px; top: -80px; z-index: 9999; padding: 10px 14px; background: var(--ink); color: white; }
.skip-link:focus { top: 10px; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); padding: 22px 16px;
  display: flex; flex-direction: column; background: var(--ink); color: white; border-right: 3px solid var(--ink);
}
.brand-block { display: flex; gap: 12px; align-items: center; padding: 2px 4px 24px; border-bottom: 1px solid #44443d; }
.brand-mark { display: grid; place-items: center; width: 47px; height: 47px; background: var(--accent-2); color: var(--ink); border: 2px solid white; font-weight: 1000; font-size: 17px; transform: rotate(-2deg); }
.brand-block strong { display: block; font-size: 17px; letter-spacing: .04em; }
.brand-block span { display: block; color: #aeaea5; font-size: 12px; margin-top: 2px; }
.nav-list { display: grid; gap: 7px; margin-top: 24px; }
.nav-item { width: 100%; border: 1px solid transparent; background: transparent; color: #cccac1; display: grid; grid-template-columns: 28px 1fr auto; gap: 7px; align-items: center; text-align: left; padding: 12px 11px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.nav-item:hover { color: white; border-color: #4b4a43; }
.nav-item.active { color: var(--ink); background: var(--accent-2); border-color: white; box-shadow: 3px 3px 0 white; }
.nav-item b { min-width: 23px; padding: 2px 6px; border-radius: 99px; text-align: center; font-size: 11px; background: #36362f; color: white; }
.nav-item.active b { background: var(--ink); }
.nav-icon { font-size: 20px; line-height: 1; }
.sidebar-foot { margin-top: auto; display: grid; gap: 14px; color: #a9a79f; font-size: 11px; }
.sync-card { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid #414139; border-radius: 10px; }
.sync-card strong, .sync-card small { display: block; }
.sync-card strong { color: white; font-size: 12px; }
.sync-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #d49b22; box-shadow: 0 0 0 4px rgba(212,155,34,.15); }
.sync-dot.ok { background: #65dd8a; box-shadow: 0 0 0 4px rgba(101,221,138,.14); }
.sync-dot.bad { background: #ff654f; box-shadow: 0 0 0 4px rgba(255,101,79,.14); }

.workspace { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { min-height: 88px; padding: 16px clamp(18px, 3vw, 42px); border-bottom: 3px solid var(--line); display: flex; align-items: center; gap: 16px; justify-content: space-between; background: rgba(245,241,232,.95); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(9px); }
.topbar h1 { margin: 0; font-size: clamp(24px, 2.6vw, 35px); line-height: 1; letter-spacing: -.05em; }
.eyebrow { margin: 0 0 5px; font-size: 10px; font-weight: 900; letter-spacing: .18em; color: var(--muted); }
.topbar-actions { display: flex; gap: 9px; }
main { padding: clamp(18px, 3vw, 40px); }
.page { display: none; max-width: 1480px; margin: 0 auto; }
.page.active { display: block; animation: reveal .18s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.button { border: 2px solid var(--line); background: var(--paper); padding: 10px 14px; min-height: 42px; border-radius: 8px; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s; }
.button:hover { transform: translate(-2px,-2px); box-shadow: 3px 3px 0 var(--line); }
.button:active { transform: none; box-shadow: none; }
.button.dark { background: var(--ink); color: white; }
.button.ghost { background: var(--paper); }
.button.danger { color: white; background: var(--danger); border-color: #611; }
.button.small { min-height: 35px; padding: 7px 11px; font-size: 11px; }
.button.large { min-height: 51px; padding: 12px 20px; font-size: 14px; }
.icon-button { width: 42px; height: 42px; border: 2px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 23px; font-weight: 800; display: grid; place-items: center; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }

.brutal-card, .content-section { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.search-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 34px; padding: clamp(22px, 4vw, 48px); overflow: hidden; position: relative; }
.search-hero::after { content: ''; position: absolute; right: -55px; top: -75px; width: 180px; height: 180px; background: var(--accent); border: 3px solid var(--line); transform: rotate(20deg); opacity: .94; }
.search-hero > * { position: relative; z-index: 1; }
.search-hero h2 { margin: 12px 0 13px; max-width: 800px; font-size: clamp(38px, 5.9vw, 82px); line-height: .92; letter-spacing: -.075em; }
.search-hero p { margin: 0; max-width: 700px; color: var(--muted); font-size: clamp(14px, 1.5vw, 18px); }
.highlight { background: var(--accent-2); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 .08em; }
.status-pill { display: inline-flex; padding: 6px 9px; border: 2px solid var(--line); border-radius: 99px; font-size: 10px; font-weight: 900; letter-spacing: .12em; background: white; }
.status-pill.accent { background: var(--accent-3); }
.hero-stat-grid { align-self: end; display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--line); background: var(--ink); color: white; transform: rotate(1deg); }
.hero-stat-grid div { padding: 18px 14px; border-right: 1px solid #5d5d53; }
.hero-stat-grid div:last-child { border-right: 0; }
.hero-stat-grid strong { display: block; font-size: clamp(25px, 3vw, 42px); line-height: 1; letter-spacing: -.06em; }
.hero-stat-grid span { color: #bcbab0; font-size: 11px; }

.search-panel { margin-top: 26px; padding: 20px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) 130px 160px; gap: 13px; align-items: end; }
.field { min-width: 0; }
.field label { display: flex; gap: 5px; align-items: center; margin-bottom: 6px; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.field label small { color: var(--muted); font-size: 9px; text-transform: none; letter-spacing: 0; }
input, select, textarea { width: 100%; border: 2px solid var(--line); border-radius: 7px; background: #fff; min-height: 43px; padding: 9px 11px; outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px var(--accent-2); }
.near-me-input { display: flex; border: 2px solid var(--line); border-radius: 7px; overflow: hidden; background: white; }
.near-me-input input { border: 0; border-radius: 0; }
.near-me-input input:focus { box-shadow: inset 0 0 0 3px var(--accent-2); }
.near-me-input span { flex: none; display: grid; place-items: center; padding: 0 13px; background: var(--accent-2); border-left: 2px solid var(--line); font-weight: 900; font-size: 13px; }
.input-action-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.search-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--soft-line); padding-top: 15px; }
.toggle-row, .checkbox-row { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 750; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle { width: 42px; height: 23px; border: 2px solid var(--line); border-radius: 99px; background: #d9d5cc; position: relative; transition: .15s; }
.toggle::after { content: ''; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; border-radius: 50%; background: var(--ink); transition: .15s; }
.toggle-row input:checked + .toggle { background: var(--accent-2); }
.toggle-row input:checked + .toggle::after { transform: translateX(19px); }
.checkbox-row input { width: 17px; min-height: 17px; }

.progress-card { margin-top: 20px; padding: 18px; border: 2px dashed var(--line); background: #fff; display: flex; gap: 14px; align-items: center; }
.progress-card strong, .progress-card span { display: block; }
.progress-card span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.loader { width: 29px; height: 29px; border: 4px solid #ddd; border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.content-section { margin-top: 28px; padding: clamp(16px, 2.5vw, 26px); }
.section-heading { margin-bottom: 17px; }
.section-heading h2, .section-heading h3 { margin: 0; line-height: 1.05; letter-spacing: -.04em; }
.section-heading h2 { font-size: clamp(24px, 3vw, 37px); }
.section-heading p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.split-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; }

.table-shell { width: 100%; overflow: auto; border: 2px solid var(--line); border-radius: 9px; background: white; }
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.data-table th { text-align: left; padding: 10px 12px; background: var(--ink); color: white; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--soft-line); vertical-align: top; font-size: 12px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f7f4ed; }
.data-table tbody tr.selected { background: #f0ffd0; }
.data-table input[type="checkbox"] { min-height: 16px; width: 16px; }
.check-cell { width: 42px; text-align: center !important; }
.lead-identity { min-width: 190px; }
.lead-identity strong { display: block; font-size: 13px; line-height: 1.25; }
.lead-identity small { display: block; margin-top: 4px; color: var(--muted); }
.contact-stack, .location-stack { display: grid; gap: 4px; max-width: 290px; }
.contact-stack a { text-decoration: none; border-bottom: 1px dotted var(--ink); width: fit-content; overflow-wrap: anywhere; }
.contact-stack .empty, .location-stack .empty { color: #99968e; }
.score-badge { display: inline-grid; place-items: center; min-width: 43px; height: 31px; padding: 0 8px; border: 2px solid var(--line); font-weight: 900; background: var(--accent-2); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-action { border: 1px solid var(--line); background: white; border-radius: 5px; padding: 5px 8px; font-size: 11px; font-weight: 800; }
.row-action:hover { background: var(--accent-2); }
.attribution { margin: 13px 0 0; color: var(--muted); font-size: 10px; }
.mobile-card-list { display: none; }

.history-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 11px; }
.history-card { border: 2px solid var(--line); padding: 14px; background: white; border-radius: 8px; }
.history-card strong, .history-card span { display: block; }
.history-card span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.empty-state { display: grid; place-items: center; text-align: center; min-height: 180px; border: 2px dashed var(--soft-line); color: var(--muted); padding: 30px; }
.empty-state strong { color: var(--ink); font-size: 16px; }
.empty-state span { font-size: 12px; }
.empty-state.compact { min-height: 100px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 26px; }
.metric-card { min-height: 125px; padding: 17px; background: var(--paper); border: 2px solid var(--line); border-radius: 11px; box-shadow: 4px 4px 0 var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.metric-card:nth-child(2n) { background: #f2ffd8; }
.metric-card:nth-child(3n) { background: #e9f1ff; }
.metric-card strong { font-size: clamp(30px, 4vw, 47px); line-height: 1; letter-spacing: -.07em; }
.metric-card span { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 850; letter-spacing: .08em; }
.metric-card small { color: var(--muted); font-size: 10px; }

.filter-bar { box-shadow: none; display: grid; grid-template-columns: minmax(230px, 1.4fr) repeat(3, minmax(130px,.65fr)) auto; gap: 10px; align-items: end; padding: 13px; margin-bottom: 13px; }
.search-field { min-width: 220px; }
.align-end { align-self: end; }
.bulk-bar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; background: var(--accent-2); border: 2px solid var(--line); padding: 9px 12px; margin-bottom: 10px; }
.bulk-bar select { width: auto; min-height: 35px; padding: 5px 8px; }
.status-badge, .priority-badge, .due-badge { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 99px; padding: 4px 8px; font-size: 10px; font-weight: 850; text-transform: uppercase; white-space: nowrap; }
.status-new { background: #eeeae1; }
.status-contacted { background: #deebff; }
.status-qualified { background: #f5e4ff; }
.status-proposal { background: #fff0c9; }
.status-won { background: #d7ffd7; }
.status-lost, .status-do_not_contact { background: #ffdcdc; }
.priority-urgent { background: #ff5f3d; color: white; }
.priority-high { background: #ffd86c; }
.priority-medium { background: #e8e4da; }
.priority-low { background: #e6f0ff; }
.due-overdue { color: white; background: var(--danger); }
.due-today { background: #ffd86c; }
.due-upcoming { background: #d7ffd7; }
.value-cell { font-weight: 850; white-space: nowrap; }

.followup-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: 24px; }
.followup-layout .content-section { margin-top: 0; }
.standalone-select { width: auto; min-width: 145px; }
.followup-list { display: grid; gap: 11px; }
.followup-card { border: 2px solid var(--line); border-radius: 10px; padding: 14px; background: white; display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; }
.followup-card.overdue { border-left: 9px solid var(--danger); }
.followup-card.today { border-left: 9px solid #e0a116; }
.followup-card.upcoming { border-left: 9px solid var(--success); }
.followup-date { min-width: 74px; text-align: center; border-right: 1px solid var(--soft-line); padding-right: 12px; }
.followup-date strong, .followup-date span { display: block; }
.followup-date strong { font-size: 22px; line-height: 1; }
.followup-date span { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.followup-info strong { display: block; }
.followup-info p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.followup-actions { display: flex; gap: 5px; }
.focus-panel { align-self: start; position: sticky; top: 112px; }
.focus-card { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--soft-line); }
.focus-card:last-child { border-bottom: 0; }
.focus-card > span { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--line); background: var(--accent-2); font-weight: 900; }
.focus-card p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }

.analytics-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.analytics-grid .content-section { margin-top: 0; min-width: 0; }
.chart-card { min-height: 370px; }
.wide-chart { grid-column: 1 / -1; }
.funnel-chart { display: grid; gap: 11px; }
.funnel-row { display: grid; grid-template-columns: 90px 1fr 42px; gap: 9px; align-items: center; font-size: 11px; }
.funnel-row strong { text-transform: uppercase; font-size: 10px; }
.funnel-track { height: 29px; border: 2px solid var(--line); background: #eee9df; }
.funnel-fill { height: 100%; min-width: 4px; background: var(--accent-3); border-right: 2px solid var(--line); }
.funnel-row:nth-child(2) .funnel-fill { background: #b39aff; }
.funnel-row:nth-child(3) .funnel-fill { background: #ffd56d; }
.funnel-row:nth-child(4) .funnel-fill { background: var(--accent-2); }
.donut-layout { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 20px; align-items: center; }
.donut-layout canvas { width: 100%; height: auto; }
.chart-legend { display: grid; gap: 8px; }
.legend-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; font-size: 11px; }
.legend-swatch { width: 12px; height: 12px; border: 1px solid var(--line); }
#activityChart { width: 100%; height: 270px; }
.breakdown-list { display: grid; gap: 10px; }
.breakdown-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--soft-line); }
.breakdown-row span { color: var(--muted); font-size: 11px; }
.breakdown-row strong { font-size: 16px; }
.activity-list { display: grid; gap: 9px; }
.activity-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: start; padding-bottom: 9px; border-bottom: 1px solid var(--soft-line); }
.activity-icon { width: 31px; height: 31px; display: grid; place-items: center; background: var(--accent-3); border: 1px solid var(--line); font-size: 13px; }
.activity-item strong, .activity-item span { display: block; }
.activity-item span { color: var(--muted); font-size: 10px; }
.activity-item time { font-size: 9px; color: var(--muted); }

.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.settings-grid .content-section { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.field-wide { grid-column: 1 / -1; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.notice { margin-top: 18px; padding: 14px; border: 2px solid var(--line); background: #e9f1ff; }
.notice p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.status-list { display: grid; gap: 9px; margin-bottom: 14px; }
.status-row { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--soft-line); font-size: 12px; }
.status-row b.ok { color: var(--success); }
.status-row b.bad { color: var(--danger); }
.danger-zone { border-color: var(--danger); box-shadow: 5px 5px 0 var(--danger); }
.danger-zone p { color: var(--muted); font-size: 12px; }

lead-dialog, dialog { color: var(--ink); }
dialog { width: min(920px, calc(100vw - 28px)); max-height: calc(100vh - 28px); border: 3px solid var(--line); border-radius: 14px; padding: 0; background: var(--paper); box-shadow: 10px 10px 0 rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(17,17,15,.67); backdrop-filter: blur(3px); }
.lead-dialog form, .mini-dialog form { display: flex; max-height: calc(100vh - 34px); flex-direction: column; }
.mini-dialog { width: min(620px, calc(100vw - 28px)); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 2px solid var(--line); background: var(--accent-2); }
.dialog-head h2 { margin: 0; letter-spacing: -.04em; }
.dialog-body { padding: 20px; overflow: auto; }
.dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-top: 2px solid var(--line); background: #eee9df; }
.dialog-foot-right { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.form-section { padding: 4px 0 22px; margin-bottom: 18px; border-bottom: 1px solid var(--soft-line); }
.form-section:last-child { border-bottom: 0; }
.form-section h3 { margin: 0 0 13px; font-size: 17px; }

.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 9px; width: min(390px, calc(100vw - 36px)); }
.toast { padding: 13px 15px; border: 2px solid var(--line); background: var(--paper); box-shadow: 4px 4px 0 var(--line); border-radius: 8px; animation: toastIn .18s ease-out; }
.toast strong, .toast span { display: block; }
.toast span { font-size: 11px; color: var(--muted); margin-top: 2px; }
.toast.success { border-left: 8px solid var(--success); }
.toast.error { border-left: 8px solid var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .search-panel { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .search-hero { grid-template-columns: 1fr; }
  .hero-stat-grid { max-width: 620px; }
  .filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-bar .align-end { width: fit-content; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 880px) {
  :root { --sidebar-width: 220px; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.25); }
  body.menu-open .sidebar { transform: none; }
  .workspace { margin-left: 0; padding-bottom: 70px; }
  .mobile-only { display: grid !important; }
  .topbar { min-height: 76px; padding: 12px 16px; }
  .topbar-actions .button:not(#installButton) { display: none; }
  main { padding: 16px; }
  .bottom-nav { position: fixed; z-index: 25; inset: auto 0 0; height: 66px; display: grid !important; grid-template-columns: repeat(5,1fr); background: var(--ink); border-top: 2px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav button { border: 0; background: transparent; color: #aead9f; font-size: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
  .bottom-nav button span { font-size: 19px; line-height: 1; }
  .bottom-nav button.active { color: var(--accent-2); }
  .followup-layout, .analytics-grid, .settings-grid { grid-template-columns: 1fr; }
  .wide-chart { grid-column: auto; }
  .focus-panel { position: static; }
}

@media (max-width: 680px) {
  .topbar h1 { font-size: 23px; }
  .topbar .eyebrow { display: none; }
  .search-hero { padding: 20px; box-shadow: 4px 4px 0 var(--line); }
  .search-hero h2 { font-size: clamp(39px, 14vw, 63px); }
  .search-hero::after { width: 115px; height: 115px; right: -45px; top: -52px; }
  .hero-stat-grid { grid-template-columns: repeat(3,1fr); transform: none; }
  .hero-stat-grid div { padding: 12px 8px; }
  .hero-stat-grid strong { font-size: 25px; }
  .hero-stat-grid span { font-size: 8px; }
  .search-panel { grid-template-columns: 1fr; padding: 14px; box-shadow: 4px 4px 0 var(--line); }
  .search-actions { display: grid; }
  .search-actions .button { width: 100%; }
  .split-heading { align-items: flex-start; flex-direction: column; }
  .button-row { width: 100%; }
  .button-row .button { flex: 1; }
  .table-shell { display: none; }
  .mobile-card-list { display: grid; gap: 10px; }
  .mobile-lead-card { border: 2px solid var(--line); border-radius: 9px; padding: 13px; background: white; }
  .mobile-card-head { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; }
  .mobile-card-head input { width: 17px; min-height: 17px; }
  .mobile-card-head strong { display: block; font-size: 14px; }
  .mobile-card-head small { display: block; color: var(--muted); margin-top: 2px; }
  .mobile-card-details { display: grid; gap: 4px; margin: 10px 0; color: var(--muted); font-size: 11px; }
  .mobile-card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .metric-card { min-height: 106px; padding: 13px; box-shadow: 3px 3px 0 var(--line); }
  .filter-bar { grid-template-columns: 1fr; box-shadow: none; }
  .followup-card { grid-template-columns: 1fr; }
  .followup-date { text-align: left; border-right: 0; border-bottom: 1px solid var(--soft-line); padding: 0 0 8px; }
  .followup-date strong, .followup-date span { display: inline; margin-right: 5px; }
  .followup-actions { flex-wrap: wrap; }
  .donut-layout { grid-template-columns: 1fr; }
  .donut-layout canvas { max-width: 240px; margin: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .dialog-body { padding: 14px; }
  .dialog-foot { align-items: stretch; flex-direction: column-reverse; }
  .dialog-foot-right { width: 100%; margin: 0; }
  .dialog-foot-right .button { flex: 1; }
}

.quick-contact-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick-contact-links a { border: 2px solid var(--line); border-radius: 7px; padding: 8px 11px; background: #fff; font-size: 11px; font-weight: 850; text-decoration: none; }
.quick-contact-links a:hover { background: var(--accent-2); box-shadow: 2px 2px 0 var(--line); transform: translate(-1px,-1px); }
