/* =============================================================================
   Findr - design system
   ============================================================================= */

@import url('https://rsms.me/inter/inter.css');

:root {
    /* Neutral scale (warm-grey) */
    --c-0:  #ffffff;
    --c-50: #fafaf9;
    --c-100:#f5f5f4;
    --c-150:#eeede9;
    --c-200:#e7e5e0;
    --c-300:#d6d3cd;
    --c-400:#a8a39a;
    --c-500:#78736a;
    --c-600:#57534e;
    --c-700:#44403c;
    --c-800:#292524;
    --c-900:#1c1917;
    --c-950:#0d0c0b;

    /* Accent - electric lime / spring green */
    --a-100:#ecfccb;
    --a-300:#bef264;
    --a-500:#84cc16;
    --a-600:#65a30d;
    --a-700:#4d7c0f;

    /* Status semantic colours */
    --hot:        #ef4444;
    --warm:       #f59e0b;
    --cool:       #3b82f6;
    --cold:       var(--c-500);
    --new:        var(--c-500);
    --contacted:  #f59e0b;
    --interested: #0ea5e9;
    --quoted:     #8b5cf6;
    --won:        #16a34a;
    --rejected:   #dc2626;

    /* Type, spacing, radius */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;

    --shadow-sm: 0 1px 2px rgba(28, 25, 23, .04), 0 0 0 1px rgba(28, 25, 23, .04);
    --shadow-md: 0 4px 12px rgba(28, 25, 23, .06), 0 0 0 1px rgba(28, 25, 23, .05);
    --shadow-lg: 0 10px 32px rgba(28, 25, 23, .08), 0 0 0 1px rgba(28, 25, 23, .06);

    /* Page chrome */
    --bg:        var(--c-50);
    --surface:   var(--c-0);
    --text:      var(--c-900);
    --text-soft: var(--c-600);
    --border:    var(--c-200);

    /* Sticky table header offset = below .app-topbar (adjust if topbar padding/content changes) */
    --app-sticky-offset: 73px;

    --dash-glow: rgba(132, 204, 22, 0.09);
    --dash-edge: rgba(28, 25, 23, 0.06);
    --dash-row: rgba(28, 25, 23, 0.045);
}

@supports (font-variation-settings: normal) {
    :root { --font: 'Inter var', -apple-system, BlinkMacSystemFont, sans-serif; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
a { color: inherit; text-decoration: none; }
input, button, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--a-300); color: var(--c-900); }

/* =============================================================================
   Buttons
   ============================================================================= */
.btn,
button.primary, a.primary,
button.ghost,   a.ghost,
button.outline, a.outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    font-weight: 500;
    line-height: 1;
    transition: all .15s ease;
    text-decoration: none;
    white-space: nowrap;
}
button.primary, a.primary {
    background: var(--c-900);
    color: var(--c-0);
    border-color: var(--c-900);
}
button.primary:hover, a.primary:hover {
    background: var(--c-800);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(28, 25, 23, .15);
}
button.outline, a.outline {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
button.outline:hover, a.outline:hover { border-color: var(--c-400); }
button.ghost, a.ghost {
    background: transparent;
    color: var(--text-soft);
}
button.ghost:hover, a.ghost:hover { color: var(--text); background: var(--c-100); }
button.big, a.big { padding: 14px 24px; font-size: 15px; }
button.small, a.small { padding: 7px 12px; font-size: 13px; }

/* =============================================================================
   Form controls
   ============================================================================= */
input[type=text], input[type=email], input[type=password],
input[type=search], select, textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px 12px;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--c-900);
    box-shadow: 0 0 0 3px var(--c-200);
}
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 13px; }

/* =============================================================================
   Auth / onboarding / loader
   ============================================================================= */
.auth-body {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: safe center;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
    overflow-x: clip;
}
.auth-body::before {
    content: "";
    position: absolute;
    inset: -200px;
    background:
        radial-gradient(420px at 25% 20%, rgba(132, 204, 22, .14), transparent 60%),
        radial-gradient(520px at 80% 80%, rgba(28, 25, 23, .06), transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.auth-card {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 44px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
}
.auth-card.wider { max-width: 760px; }

/* Page-header variants used by the coverage / settings screens. */
.auth-card.has-back { padding-top: 60px; }
.auth-card .back-link {
    position: absolute;
    top: 18px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.auth-card .back-link:hover {
    color: var(--text);
    border-color: var(--c-300);
    background: var(--c-50);
}
.auth-card .back-link svg { transition: transform .15s; }
.auth-card .back-link:hover svg { transform: translateX(-2px); }

.brand-link.centered {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}
.auth-card h1.centered,
.auth-card .lead.centered { text-align: center; }
.auth-card h1.centered { margin-top: 18px; }
.auth-card .lead.centered { max-width: 520px; margin-left: auto; margin-right: auto; }

/* Subtle success notice (replaces the inline-styled "Saved." pill). */
.auth-card .notice {
    padding: 10px 14px;
    border-radius: var(--r-md);
    margin-bottom: 18px;
    font-size: 13px;
    border: 1px solid var(--border);
    background: var(--c-50);
    color: var(--text);
}
.auth-card .notice.success {
    background: #ecfccb;
    border-color: #bef264;
    color: #365314;
}
[data-theme="dark"] .auth-card .notice.success {
    background: #1a2e0a;
    border-color: #4d7c0f;
    color: #d9f99d;
}

/* Card-style option toggle (e.g. "Re-scrape after saving" on coverage). */
.option-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.option-card:hover {
    border-color: var(--a-500);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.option-card > input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.option-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: var(--c-100);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    transition: background .15s, color .15s;
}
.option-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.option-card-body strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -.005em;
}
.option-card-body .hint { font-size: 12.5px; }

.option-card-toggle {
    position: relative;
    flex: 0 0 36px;
    width: 36px;
    height: 22px;
    border-radius: 999px;
    background: var(--c-200);
    transition: background .18s;
}
.option-card-toggle i {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    transition: transform .18s;
}
.option-card:has(input:checked) {
    border-color: #65a30d;
    background: #f7fee7;
    box-shadow: inset 0 0 0 1px rgba(101, 163, 13, .25);
}
.option-card:has(input:checked) .option-card-icon {
    background: #ecfccb;
    color: #4d7c0f;
}
.option-card:has(input:checked) .option-card-toggle { background: #84cc16; }
.option-card:has(input:checked) .option-card-toggle i { transform: translateX(14px); }
.option-card:focus-within {
    outline: 2px solid var(--a-600);
    outline-offset: 2px;
}
[data-theme="dark"] .option-card-icon { background: var(--c-800); color: var(--text-soft); }
[data-theme="dark"] .option-card-toggle { background: var(--c-700); }
[data-theme="dark"] .option-card:has(input:checked) {
    border-color: #84cc16;
    background: #1a2e0a;
    box-shadow: inset 0 0 0 1px rgba(163, 230, 53, .2);
}
[data-theme="dark"] .option-card:has(input:checked) .option-card-icon {
    background: #3f6212;
    color: #d9f99d;
}
[data-theme="dark"] .option-card:has(input:checked) .option-card-body strong {
    color: #f7fee7;
}
[data-theme="dark"] .option-card:has(input:checked) .option-card-body .hint {
    color: #d9f99d;
}
.auth-card h1 {
    margin: 16px 0 8px;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -.02em;
}
.auth-card .lead { margin: 0 0 28px; color: var(--text-soft); font-size: 15px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card .hint { font-weight: 400; color: var(--text-soft); font-size: 12px; }
.auth-card .error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: var(--r-md);
    margin-bottom: 18px;
    font-size: 13px;
}
.auth-card .alt {
    margin-top: 24px;
    color: var(--text-soft);
    font-size: 13px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
}
.auth-card .alt a { color: var(--text); font-weight: 500; }
.auth-card .alt a:hover { text-decoration: underline; }
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -.01em;
}
.brand-link .logo,
.app-topbar .logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--c-900);
    color: transparent;     /* hide the "W" fallback text */
    font-size: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='13' cy='13' r='6.5' stroke='%23ffffff' stroke-width='2.2' fill='none'/><line x1='18' y1='18' x2='24' y2='24' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round'/><circle cx='13' cy='13' r='1.6' fill='%2384cc16'/></svg>");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transition: transform .25s ease;
}
.brand-link:hover .logo { transform: rotate(-8deg) scale(1.05); }

/* Onboarding */
.onboarding fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.onboarding legend {
    font-weight: 600;
    font-size: 12px;
    padding: 0;
    margin: 0 0 4px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.onboarding .big-input {
    font-size: 16px;
    padding: 12px 14px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    width: 100%;
    min-width: 0;
}
.onboarding .postcode-input {
    font-size: 14px;
    padding: 10px 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    min-width: 0;
}

/* Inline label above a row (e.g. "Add areas using another postcode"). */
.onboarding label.stacked {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}
.onboarding .field-label {
    font-weight: 500;
    font-size: 13px;
    color: var(--text);
}

/* One-line "input + button" row that flows nicely on narrow viewports. */
.onboarding .field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}
.onboarding .field-row > input {
    flex: 1 1 220px;
    min-width: 0;
}
.onboarding .field-row > .outline,
.onboarding .field-row > button {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

/* Hint that only takes space when JS has populated it. */
.onboarding .inline-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.4;
    min-height: 0;
}
.onboarding .inline-hint:empty { display: none; }

/* Button loading state (used by Coverage & onboarding async actions). */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: findr-btn-spin .7s linear infinite;
    vertical-align: -2px;
    margin-right: 6px;
    opacity: .85;
}
@keyframes findr-btn-spin { to { transform: rotate(360deg); } }
button.is-loading, a.is-loading {
    opacity: .75;
    cursor: progress;
    pointer-events: none;
}
.trade-grid, .area-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.trade-card, .area-card {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--surface);
    color: var(--text);
    transition: all .15s ease;
}
.trade-card:hover, .area-card:hover {
    border-color: var(--a-500);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.trade-card input, .area-card input { display: none; }
.trade-card span { font-weight: 500; font-size: 14px; color: inherit; }
.area-card strong { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: inherit; }
.area-card span { color: var(--text-soft); font-size: 12px; }
/* Selected: solid fills so contrast never depends on inverted --c-* or faint rgba on white */
.trade-card:has(input:checked),
.area-card:has(input:checked) {
    border-color: #65a30d;
    background-color: #ecfccb;
    color: #1c1917;
    box-shadow: inset 0 0 0 1px rgba(101, 163, 13, 0.35);
}
.trade-card:has(input:checked) span,
.area-card:has(input:checked) strong {
    color: #292524;
}
.area-card:has(input:checked) span {
    color: #57534e;
}
[data-theme="dark"] .trade-card:has(input:checked),
[data-theme="dark"] .area-card:has(input:checked) {
    border-color: #84cc16;
    background-color: #3f6212;
    color: #f7fee7;
    box-shadow: inset 0 0 0 1px rgba(163, 230, 53, 0.25);
}
[data-theme="dark"] .trade-card:has(input:checked) span,
[data-theme="dark"] .area-card:has(input:checked) strong {
    color: #f7fee7;
}
[data-theme="dark"] .area-card:has(input:checked) span {
    color: #d9f99d;
}
.trade-card:focus-within,
.area-card:focus-within {
    outline: 2px solid var(--a-600);
    outline-offset: 2px;
}
[data-theme="dark"] .trade-card:focus-within,
[data-theme="dark"] .area-card:focus-within {
    outline-color: var(--a-500);
}

.onboarding-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
}
.onboarding-actions .outline { margin: 0; }
#extraAreasWrap { margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--border); }

/* Two-step onboarding */
.ob-card { max-width: 640px; }
.ob-steps {
    display: flex;
    gap: 8px;
    margin: 20px 0 28px;
}
.ob-step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 500;
    transition: border-color .15s, background .15s, color .15s;
}
.ob-step i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c-150);
    color: var(--text-soft);
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    transition: background .15s, color .15s;
}
.ob-step.is-active {
    border-color: #65a30d;
    background: #f7fee7;
    color: var(--text);
}
.ob-step.is-active i {
    background: #84cc16;
    color: #fff;
}
.ob-step.is-done {
    border-color: var(--c-300);
    color: var(--text);
}
.ob-step.is-done i {
    background: var(--c-200);
    color: var(--text);
}
[data-theme="dark"] .ob-step.is-active {
    border-color: #84cc16;
    background: #1a2e0a;
    color: #f7fee7;
}
[data-theme="dark"] .ob-step.is-active i { background: #65a30d; }

.ob-panel { display: flex; flex-direction: column; gap: 16px; }
.ob-panel[hidden] { display: none !important; }
.ob-panel h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.02em;
}
.ob-search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.ob-search-row .big-input { flex: 1; min-width: 0; margin: 0; }
.ob-search-row .outline {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
    align-self: stretch;
}
.area-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
}
.area-chips[hidden] { display: none !important; }
.area-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #65a30d;
    background: #ecfccb;
    color: #365314;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .12s, border-color .12s, transform .12s;
}
.area-chip span {
    font-size: 16px;
    line-height: 1;
    opacity: .55;
    font-weight: 400;
}
.area-chip:hover {
    background: #d9f99d;
    transform: translateY(-1px);
}
[data-theme="dark"] .area-chip {
    border-color: #84cc16;
    background: #3f6212;
    color: #f7fee7;
}
[data-theme="dark"] .area-chip:hover { background: #4d7c0f; }

.area-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 2px;
}
.area-grid-compact .area-card { padding: 12px; }
.area-grid-compact .area-card strong { font-size: 15px; }
.area-grid-compact .area-card span {
    font-size: 11px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ob-nav-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}
.ob-nav-row .outline { flex: 0 0 auto; margin: 0; }
.ob-nav-row .primary { flex: 1; margin: 0; }

/* Loader page */
.progress {
    height: 6px;
    background: var(--c-150);
    border-radius: 999px;
    overflow: hidden;
    margin: 28px 0 10px;
}
.progress .bar {
    height: 100%;
    width: 5%;
    background: linear-gradient(90deg, var(--a-500), var(--a-600));
    border-radius: 999px;
    transition: width .5s ease;
}
.progress .bar.done   { background: var(--won); width: 100% !important; }
.progress .bar.failed { background: var(--rejected); }
.progress-label { font-weight: 500; margin: 6px 0 22px; color: var(--text-soft); }
.counters {
    display: flex; gap: 28px; padding: 0; list-style: none;
    color: var(--text-soft); font-size: 13px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}
.counters strong {
    color: var(--text);
    display: block;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.02em;
    margin-bottom: 2px;
}

.auth-card .search-counters {
    justify-content: center;
    gap: clamp(28px, 8vw, 56px);
    border-top: 0;
    padding-top: 8px;
    margin-top: 28px;
}

.auth-card .search-counters li {
    text-align: center;
    min-width: 72px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.auth-card .search-counters strong {
    font-size: clamp(36px, 10vw, 52px);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}
.muted { color: var(--text-soft); }
.small { font-size: 12px; }

/* =============================================================================
   Landing page
   ============================================================================= */
.landing {
    background: var(--bg);
    color: var(--text);
}
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    max-width: 1200px;
    margin: 0 auto;
}
.landing-nav nav { display: flex; gap: 24px; align-items: center; }
.landing-nav nav a:not(.primary) {
    color: var(--text-soft);
    font-weight: 500;
    font-size: 14px;
    transition: color .15s;
}
.landing-nav nav a:not(.primary):hover { color: var(--text); }

.hero {
    position: relative;
    text-align: center;
    padding: 80px 24px 100px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -100px;
    background:
        radial-gradient(720px circle at 30% 20%, rgba(132, 204, 22, .18), transparent 60%),
        radial-gradient(640px circle at 70% 70%, rgba(28, 25, 23, .08), transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.hero .eyebrow .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--a-500);
    box-shadow: 0 0 0 3px rgba(132, 204, 22, .25);
}
.hero h1 {
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -.04em;
    margin: 0 0 20px;
    max-width: 880px;
    margin-left: auto; margin-right: auto;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--a-600), var(--a-500) 60%, var(--c-900));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .lead {
    max-width: 600px;
    margin: 0 auto 32px;
    font-size: 18px;
    color: var(--text-soft);
    line-height: 1.5;
}
.hero .cta-row {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}
.hero .micro {
    display: block;
    margin-top: 16px;
    color: var(--text-soft);
    font-size: 13px;
}

/* Mock dashboard preview */
.preview {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}
.preview-frame {
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    transform: perspective(1500px) rotateX(2deg);
    transform-origin: top center;
}
.preview-frame .chrome {
    display: flex;
    gap: 6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--c-50);
}
.preview-frame .chrome span {
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--c-200);
}
.preview-frame img { display: block; width: 100%; }
.preview-mini {
    background: var(--surface);
    padding: 24px;
}
.preview-mini .row {
    display: grid;
    grid-template-columns: 60px 2fr 1fr 80px 1fr 80px;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.preview-mini .row:last-child { border: 0; }
.preview-mini .row.head { color: var(--text-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding-top: 0; }
.preview-mini .ring {
    width: 28px; height: 28px;
    background: conic-gradient(var(--a-500) calc(var(--p) * 1%), var(--c-150) 0);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 11px;
    position: relative;
}
.preview-mini .ring::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: var(--surface);
    border-radius: 50%;
}
.preview-mini .ring span { position: relative; z-index: 1; }
.preview-mini .pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    background: var(--c-100);
    color: var(--text-soft);
}
.preview-mini .pill.contacted { background: #fef3c7; color: #92400e; }
.preview-mini .pill.won       { background: #dcfce7; color: #166534; }

/* Features */
.features {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.features .feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    transition: all .2s ease;
}
.features .feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-300);
}
.features .feature .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: var(--c-900);
    color: var(--c-0);
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 18px;
    letter-spacing: -.02em;
}
.features .feature h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.01em;
}
.features .feature p { color: var(--text-soft); margin: 0; line-height: 1.5; }

.cta-band {
    max-width: 1100px;
    margin: 0 auto 80px;
    padding: 64px 32px;
    background: var(--c-900);
    color: var(--c-0);
    border-radius: var(--r-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(500px circle at 80% 20%, rgba(132, 204, 22, .25), transparent 50%),
        radial-gradient(400px circle at 20% 80%, rgba(132, 204, 22, .15), transparent 50%);
    pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -.03em;
    margin: 0 0 12px;
}
.cta-band p { color: var(--c-300); margin: 0 0 28px; font-size: 16px; }
.cta-band a.primary {
    background: var(--a-500);
    color: var(--c-900);
    border-color: var(--a-500);
}
.cta-band a.primary:hover {
    background: var(--a-300);
    border-color: var(--a-300);
    box-shadow: 0 4px 24px rgba(132, 204, 22, .35);
}

.landing-foot {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-soft);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

/* =============================================================================
   App layout (dashboard)
   ============================================================================= */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: saturate(160%) blur(20px);
    -webkit-backdrop-filter: saturate(160%) blur(20px);
    background: rgba(250, 250, 249, .82);
    border-bottom: 1px solid var(--dash-edge);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}
.app-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    max-width: 1480px;
    margin: 0 auto;
}
.app-topbar .left { display: flex; align-items: center; gap: 24px; }
.app-topbar .crumb {
    color: var(--text-soft);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.app-topbar .crumb::before { content: "/"; color: var(--c-300); }
.app-topbar .right {
    display: flex; align-items: center; gap: 14px;
    color: var(--text-soft);
    font-size: 13px;
}
.app-topbar .right .avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--c-900);
    color: var(--c-0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

/* Page header (below topbar) */
.page-head {
    max-width: 1400px;
    margin: 0 auto;
    padding: 36px 32px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}
.page-head h1 {
    font-size: clamp(28px, 3.2vw, 36px);
    font-weight: 600;
    letter-spacing: -0.035em;
    margin: 0 0 6px;
    line-height: 1.1;
}
.page-head .subtitle {
    color: var(--text-soft);
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    max-width: 42ch;
}
.page-head .actions { display: flex; gap: 10px; align-items: center; }
.page-head .actions a.outline.small {
    border-radius: var(--r-md);
    font-weight: 600;
    padding: 9px 16px;
    transition: border-color .15s, background .15s, transform .12s;
}
.page-head .actions a.outline.small:hover {
    background: var(--c-50);
    transform: translateY(-1px);
}

/* Stats strip */
.stats-row {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 32px 0;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
}
.stat-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--dash-edge);
    border-radius: var(--r-lg);
    padding: 18px 20px 16px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    background: var(--c-300);
    opacity: 0.85;
}
.stat-card.total::before {
    background: linear-gradient(90deg, var(--c-500), var(--c-400));
}
.stat-card.new::before        { background: var(--a-500); }
.stat-card.contacted::before  { background: var(--contacted); }
.stat-card.interested::before { background: var(--interested); }
.stat-card.won::before        { background: var(--won); }
.stat-card:hover {
    border-color: rgba(28, 25, 23, 0.12);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-card .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .11em;
    color: var(--text-soft);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stat-card .label .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c-400);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.stat-card.new .dot        { background: var(--a-500); }
.stat-card.contacted .dot  { background: var(--contacted); }
.stat-card.interested .dot { background: var(--interested); }
.stat-card.won .dot        { background: var(--won); }
.stat-card .value {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Filters – elevated strip */
.filters-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 22px 32px 0;
}
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--dash-edge);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}
.filters-more-badge { display: none; }
@media (min-width: 721px) {
    /* Desktop: <details> wrapper is transparent so selects flow inline as before */
    .filters-more {
        display: contents;
    }
    .filters-more > summary.filters-more-toggle { display: none; }
    .filters-more > .filters-more-fields {
        display: contents;
    }
}
.filters input[type=search] {
    flex: 1 1 200px;
    min-width: 200px;
    max-width: 320px;
    padding: 10px 14px;
    background: var(--c-50);
    border-radius: var(--r-md);
    border: 1px solid transparent;
    font-size: 13px;
    transition: border-color .15s, background .15s;
}
.filters input[type=search]:focus {
    background: var(--surface);
    border-color: var(--c-300);
}
.filters select {
    padding: 10px 12px;
    background: var(--c-50);
    border-radius: var(--r-md);
    border: 1px solid transparent;
    width: auto;
    min-width: 132px;
    font-size: 13px;
    transition: border-color .15s, background .15s;
}
.filters select:hover {
    border-color: var(--c-200);
    background: var(--surface);
}
.filters button[type=submit] {
    background: var(--c-900);
    color: var(--c-0);
    border: 0;
    padding: 10px 18px;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.12);
    transition: background .15s, transform .12s;
}
.filters button[type=submit]:hover {
    background: var(--c-800);
    transform: translateY(-1px);
}
.filters .reset {
    color: var(--text-soft);
    font-size: 13px;
    padding: 10px 14px;
    font-weight: 500;
    border-radius: var(--r-md);
    transition: color .15s, background .15s;
}
.filters .reset:hover {
    color: var(--text);
    background: var(--c-50);
}
.filters .top-picks {
    margin-left: auto;
    background: var(--c-900);
    color: var(--c-0);
    border-radius: var(--r-md);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, transform .12s;
}
.filters .top-picks::before { content: "★"; color: var(--a-500); font-size: 12px; }
.filters .top-picks:hover {
    background: var(--c-800);
    transform: translateY(-1px);
}
.filters .top-picks.active {
    background: var(--a-500);
    color: #0d0c0b;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Main content area */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 32px 80px;
}

/* Dashboard landing — subtle ambient */
body.page-dashboard {
    background:
        radial-gradient(1000px 520px at 92% -8%, var(--dash-glow), transparent 58%),
        var(--bg);
}

/* Empty state */
.empty {
    background: var(--surface);
    border: 1px solid var(--dash-edge);
    border-radius: var(--r-lg);
    padding: 56px 48px;
    text-align: center;
    margin: 36px auto;
    max-width: 520px;
    box-shadow: var(--shadow-md);
}
.empty h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.01em;
    margin: 0 0 8px;
}
.empty p { color: var(--text-soft); margin: 0 0 16px; }

/* =============================================================================
   Lead table
   ============================================================================= */
.leads {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border: 1px solid var(--dash-edge);
    border-radius: var(--r-lg);
    /* overflow:hidden clips sticky thead, row hovers, and contact dropdowns */
    overflow: visible;
    margin-top: 8px;
    box-shadow: var(--shadow-md);
}
.leads thead tr:first-child th:first-child {
    border-top-left-radius: var(--r-lg);
}
.leads thead tr:first-child th:last-child {
    border-top-right-radius: var(--r-lg);
}
.leads tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--r-lg);
}
.leads tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--r-lg);
}
.leads th, .leads td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--dash-row);
    vertical-align: top;
    text-align: left;
}
.leads thead th {
    background: rgba(250, 250, 249, 0.92);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-soft);
    font-weight: 700;
    position: sticky;
    top: var(--app-sticky-offset);
    z-index: 8;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 1px 0 var(--dash-edge);
    padding-top: 16px;
    padding-bottom: 14px;
}
.leads thead a {
    color: var(--text-soft);
    transition: color .15s;
}
.leads thead a:hover { color: var(--c-900); }
.leads tbody tr {
    transition: background .15s ease, box-shadow .15s ease;
}
.leads tbody tr:hover {
    background: linear-gradient(90deg, rgba(132, 204, 22, 0.04) 0%, var(--c-50) 8px);
}
.leads tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--a-500);
}
.leads tbody tr:last-child td { border-bottom: 0; }
.leads td .muted { font-size: 12px; margin-top: 2px; color: var(--text-soft); }
.leads .col-contact {
    min-width: 200px;
}
/* Do not use display:flex on <td> — it breaks table row height / border alignment in WebKit/Blink */
.leads td.contact {
    min-width: 200px;
    max-width: 320px;
    font-size: 13px;
    vertical-align: top;
}
.leads tbody tr:has(.contact-more-toggle[open]) {
    position: relative;
    z-index: 15;
}
.leads td.contact .contact-meta-links {
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
.leads td.contact .contact-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}
.leads td.contact a.search-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(132, 204, 22, 0.35);
    background: linear-gradient(180deg, rgba(236, 252, 203, 0.65) 0%, var(--c-50) 100%);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--c-800);
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
}
.leads td.contact a.search-pill:hover {
    background: linear-gradient(180deg, var(--a-100) 0%, var(--c-50) 100%);
    border-color: var(--a-600);
    color: var(--c-900);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(132, 204, 22, 0.2);
}
.leads td.contact .contact-more-wrap {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}
.leads td.contact .contact-more-toggle {
    position: relative;
    margin: 0;
}
.leads td.contact .contact-more-toggle > summary.more-summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    box-sizing: border-box;
    margin: 0;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--dash-edge);
    background: var(--surface);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-soft);
    transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s;
    box-shadow: var(--shadow-sm);
}
.leads td.contact .contact-more-toggle > summary.more-summary::-webkit-details-marker {
    display: none;
}
.leads td.contact .contact-more-toggle > summary.more-summary::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.55;
    flex-shrink: 0;
    transition: transform .15s ease;
}
.leads td.contact .contact-more-toggle[open] > summary.more-summary::after {
    transform: rotate(180deg);
}
.leads td.contact .contact-more-toggle > summary.more-summary:hover,
.leads td.contact .contact-more-toggle[open] > summary.more-summary {
    color: var(--text);
    border-color: var(--c-300);
    background: var(--c-50);
    transform: translateY(-1px);
}
.leads td.contact .contact-more-panel {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 148px;
    padding: 6px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.leads td.contact .contact-more-panel a {
    display: block;
    padding: 7px 10px;
    border-radius: calc(var(--r-sm) - 2px);
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-bottom: none;
    transition: background .1s;
}
.leads td.contact .contact-more-panel a:hover {
    background: var(--c-50);
}
.leads td.contact .tiny-link {
    color: var(--text-soft);
    border-bottom: 1px dashed var(--c-400);
}
.leads td.contact .tiny-link:hover { color: var(--text); border-bottom-color: var(--c-600); }
.leads td.contact a.search-pill:hover,
.leads td.contact .contact-more-panel a:hover {
    border-bottom: none;
}
.leads td strong {
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: 14px;
}
.footer-note {
    padding: 20px 6px 0;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* =============================================================================
   Score bar
   ============================================================================= */
.col-score { width: 88px; }
.score-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 68px;
    background: var(--c-100);
    border-radius: 999px;
    overflow: hidden;
    cursor: help;
    font-weight: 600;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--c-900);
    border: 1px solid rgba(28, 25, 23, 0.06);
}
.score-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    background: linear-gradient(90deg, currentColor, currentColor);
    opacity: .18;
}
.score-num { position: relative; z-index: 1; }
.score-hot   { color: var(--hot);  background: #fef2f2; }
.score-warm  { color: var(--warm); background: #fffbeb; }
.score-cool  { color: var(--cool); background: #eff6ff; }
.score-cold  { color: var(--cold); background: var(--c-100); }
.score-unscored {
    color: var(--text-soft);
    background: transparent;
    border: 0;
    width: auto;
    padding: 0 8px;
}

/* =============================================================================
   Status select (styled as a pill)
   ============================================================================= */
.status-select {
    background: var(--c-50);
    border: 1px solid var(--dash-edge);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
    min-width: 120px;
    width: 100%;
}
.status-select:hover {
    border-color: var(--c-300);
    box-shadow: 0 1px 3px rgba(28, 25, 23, 0.06);
}
.status-new        { background-color: var(--c-100); color: var(--c-700); }
.status-contacted  { background-color: #fef3c7;     color: #92400e; }
.status-interested { background-color: #e0f2fe;     color: #075985; }
.status-quoted     { background-color: #ede9fe;     color: #5b21b6; }
.status-won        { background-color: #dcfce7;     color: #166534; }
.status-rejected   { background-color: #fee2e2;     color: #991b1b; }

textarea.notes {
    min-width: 200px;
    width: 100%;
    background: var(--c-50);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    padding: 8px 10px;
    resize: vertical;
    font-size: 13px;
    line-height: 1.45;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
textarea.notes:hover {
    border-color: var(--dash-edge);
    background: var(--surface);
}
textarea.notes:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--c-300);
    box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.18);
}

.saved {
    box-shadow: 0 0 0 2px var(--won) inset;
    transition: box-shadow .8s ease;
}

/* =============================================================================
   Quick actions (per-row)
   ============================================================================= */
.qa-row {
    display: inline-flex;
    gap: 4px;
    opacity: 0;
    transition: opacity .15s ease;
}
.leads tbody tr:hover .qa-row { opacity: 1; }

.qa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-soft);
    transition: all .15s ease;
    cursor: pointer;
}
.qa-btn:hover {
    background: var(--c-900);
    border-color: var(--c-900);
    color: var(--c-0);
    transform: translateY(-1px);
}
.qa-btn svg { width: 14px; height: 14px; }
.qa-btn.copied { background: var(--won); border-color: var(--won); color: #fff; }

/* =============================================================================
   Sparklines (stat cards)
   ============================================================================= */
.spark {
    margin-top: 6px;
    width: 100%;
    height: 28px;
    display: block;
    overflow: visible;
}
.spark path.fill { opacity: .15; }
.spark path.line { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.stat-card.new        .spark path { stroke: var(--new);        fill: var(--new); }
.stat-card.contacted  .spark path { stroke: var(--contacted);  fill: var(--contacted); }
.stat-card.interested .spark path { stroke: var(--interested); fill: var(--interested); }
.stat-card.won        .spark path { stroke: var(--won);        fill: var(--won); }
.stat-card.total      .spark path,
.stat-card:not(.new):not(.contacted):not(.interested):not(.won) .spark path {
    stroke: var(--c-900); fill: var(--c-900);
}

/* =============================================================================
   Row update animation
   ============================================================================= */
@keyframes row-flash {
    0%   { background: rgba(132, 204, 22, 0); }
    20%  { background: rgba(132, 204, 22, .25); }
    100% { background: rgba(132, 204, 22, 0); }
}
tr.row-flash {
    animation: row-flash 1s ease-out;
}

/* =============================================================================
   Theme toggle button
   ============================================================================= */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-soft);
    cursor: pointer;
    transition: all .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--c-400); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun  { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

/* =============================================================================
   Dark mode
   ============================================================================= */
[data-theme="dark"] {
    --bg:        #0d0c0b;
    --surface:   #1a1816;
    --text:      #f5f5f4;
    --text-soft: #a8a39a;
    --border:    #2a2724;

    --dash-glow: rgba(132, 204, 22, 0.11);
    --dash-edge: rgba(255, 255, 255, 0.09);
    --dash-row: rgba(255, 255, 255, 0.055);

    --c-50:  #1a1816;
    --c-100: #221f1c;
    --c-150: #2a2724;
    --c-200: #2a2724;
    --c-300: #44403c;
    --c-400: #6a6560;
    --c-500: #a8a39a;
    --c-600: #d6d3cd;
    --c-700: #e7e5e0;
    --c-800: #f5f5f4;
    --c-900: #fafaf9;
    --c-950: #ffffff;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .35);
    --shadow-lg: 0 10px 32px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .app-topbar {
    background: rgba(13, 12, 11, .8);
    border-bottom-color: var(--border);
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] body.page-dashboard {
    background:
        radial-gradient(880px 480px at 88% -12%, var(--dash-glow), transparent 55%),
        var(--bg);
}
[data-theme="dark"] .page-head .actions a.outline.small:hover {
    background: var(--c-100);
}
[data-theme="dark"] button.primary,
[data-theme="dark"] a.primary {
    background: var(--a-500);
    color: #0d0c0b;
    border-color: var(--a-500);
}
[data-theme="dark"] button.primary:hover,
[data-theme="dark"] a.primary:hover {
    background: var(--a-300);
    border-color: var(--a-300);
}
[data-theme="dark"] .brand-link .logo,
[data-theme="dark"] .app-topbar .logo {
    background: var(--a-500);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='13' cy='13' r='6.5' stroke='%230d0c0b' stroke-width='2.2' fill='none'/><line x1='18' y1='18' x2='24' y2='24' stroke='%230d0c0b' stroke-width='2.4' stroke-linecap='round'/><circle cx='13' cy='13' r='1.6' fill='%23ffffff'/></svg>");
}
[data-theme="dark"] .auth-body::before,
[data-theme="dark"] .hero::before {
    background:
        radial-gradient(720px circle at 30% 20%, rgba(132, 204, 22, .15), transparent 60%),
        radial-gradient(640px circle at 70% 70%, rgba(255, 255, 255, .04), transparent 60%);
}
[data-theme="dark"] .hero h1 em {
    background: linear-gradient(135deg, var(--a-300), var(--a-500) 60%, #fff);
    -webkit-background-clip: text;
    background-clip: text;
}
[data-theme="dark"] .leads thead th {
    background: rgba(26, 24, 22, 0.94);
    box-shadow: 0 1px 0 var(--dash-edge);
}
[data-theme="dark"] .leads thead a:hover { color: var(--text); }
[data-theme="dark"] .leads tbody tr:hover {
    background: linear-gradient(90deg, rgba(132, 204, 22, 0.08) 0%, rgba(255, 255, 255, 0.03) 12px);
}
[data-theme="dark"] .stat-card .label .dot {
    box-shadow: 0 0 0 2px rgba(13, 12, 11, 0.85);
}
[data-theme="dark"] .stat-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .filters input[type="search"],
[data-theme="dark"] .filters select {
    background: var(--c-100);
}
[data-theme="dark"] .filters input[type="search"]:focus {
    background: var(--surface);
}
[data-theme="dark"] .leads td.contact a.search-pill {
    background: linear-gradient(180deg, rgba(132, 204, 22, 0.18) 0%, var(--c-100) 100%);
    border-color: rgba(132, 204, 22, 0.4);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .leads td.contact a.search-pill:hover {
    background: linear-gradient(180deg, rgba(132, 204, 22, 0.28) 0%, var(--c-100) 100%);
    box-shadow: 0 4px 16px rgba(132, 204, 22, 0.15);
}
[data-theme="dark"] textarea.notes {
    background: var(--c-100);
}
[data-theme="dark"] textarea.notes:hover {
    background: var(--surface);
}
[data-theme="dark"] textarea.notes:focus {
    box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.22);
}
[data-theme="dark"] .leads td.contact .contact-more-panel {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .score-cold  { background: var(--c-100); color: var(--c-500); }
[data-theme="dark"] .preview-frame { background: var(--surface); }
[data-theme="dark"] .preview-mini .pill          { background: var(--c-100); color: var(--c-500); }
[data-theme="dark"] .preview-mini .pill.contacted{ background: rgba(245, 158, 11, .15); color: #fbbf24; }
[data-theme="dark"] .preview-mini .pill.won      { background: rgba(34, 197, 94, .15);  color: #4ade80; }
[data-theme="dark"] .features .feature .num { background: var(--a-500); color: #0d0c0b; }
[data-theme="dark"] .cta-band { background: var(--surface); border: 1px solid var(--border); }
[data-theme="dark"] .status-new        { background-color: var(--c-100); color: var(--c-500); }
[data-theme="dark"] .status-contacted  { background-color: rgba(245, 158, 11, .15); color: #fbbf24; }
[data-theme="dark"] .status-interested { background-color: rgba(14, 165, 233, .15); color: #38bdf8; }
[data-theme="dark"] .status-quoted     { background-color: rgba(139, 92, 246, .15); color: #a78bfa; }
[data-theme="dark"] .status-won        { background-color: rgba(22, 163, 74, .15);  color: #4ade80; }
[data-theme="dark"] .status-rejected   { background-color: rgba(220, 38, 38, .15);  color: #f87171; }
[data-theme="dark"] .status-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23a8a39a' stroke-width='1.5'/%3E%3C/svg%3E");
}
/* Dashboard chrome – avoid white-on-white from inverted --c-900 in dark */
[data-theme="dark"] .app-topbar .right .avatar {
    background: var(--a-500);
    color: #0d0c0b;
}
[data-theme="dark"] .filters button[type=submit] {
    background: var(--a-500);
    color: #0d0c0b;
}
[data-theme="dark"] .filters button[type=submit]:hover {
    background: var(--a-300);
}
[data-theme="dark"] .filters .top-picks {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}
[data-theme="dark"] .filters .top-picks:hover {
    border-color: var(--a-500);
    color: var(--text);
    background: var(--surface);
}
[data-theme="dark"] .filters .top-picks.active {
    background: var(--a-500);
    color: #0d0c0b;
    border-color: var(--a-500);
}
[data-theme="dark"] .qa-btn:hover {
    background: var(--a-500);
    border-color: var(--a-500);
    color: #0d0c0b;
}
[data-theme="dark"] .score-hot  { background: rgba(239, 68, 68, .12); color: #f87171; }
[data-theme="dark"] .score-warm { background: rgba(245, 158, 11, .12); color: #fbbf24; }
[data-theme="dark"] .score-cool { background: rgba(59, 130, 246, .12); color: #60a5fa; }

/* =============================================================================
   Mobile — redesigned native-feel dashboard (≤720px)
   ============================================================================= */
@media (max-width: 720px) {
    html, body { overflow-x: hidden; }
    .hero { padding: 60px 16px 80px; }
    .preview-frame { transform: none; }
    body.page-dashboard { background: var(--c-50); }

    /* ── Sticky topbar — slim and frosted ─────────────────────────── */
    .app-topbar {
        background: rgba(250, 250, 249, 0.88);
        border-bottom-color: var(--dash-row);
    }
    .app-topbar-inner {
        padding: 10px 14px;
        gap: 4px;
    }
    .app-topbar .left { gap: 10px; min-width: 0; }
    .app-topbar .brand-link { font-size: 16px; gap: 8px; }
    .app-topbar .brand-link .logo { width: 28px; height: 28px; }
    .app-topbar .crumb { display: none; }
    .app-topbar .right { gap: 6px; }
    .app-topbar .right > span:not(.avatar),
    .app-topbar .right .avatar { display: none; }
    .app-topbar .right .ghost.small {
        padding: 8px 10px;
        font-size: 12px;
        min-height: 36px;
        color: var(--text-soft);
    }
    .theme-toggle { width: 36px; height: 36px; }
    :root { --app-sticky-offset: 56px; }

    /* ── Page header — minimal hero ───────────────────────────────── */
    .page-head {
        padding: 22px 16px 0;
        gap: 6px;
        flex-direction: column;
        align-items: stretch;
    }
    .page-head h1 {
        font-size: 26px;
        line-height: 1.1;
        letter-spacing: -0.03em;
        margin: 0;
    }
    .page-head .subtitle {
        font-size: 13px;
        max-width: none;
        margin: 0;
        line-height: 1.4;
    }
    .page-head .actions {
        width: 100%;
        margin-top: 4px;
    }
    .page-head .actions a.outline.small {
        width: auto;
        padding: 7px 14px;
        font-size: 12px;
        font-weight: 600;
        min-height: 34px;
        border-radius: 999px;
        background: var(--surface);
        color: var(--text-soft);
    }
    .page-head .actions a.outline.small:hover {
        background: var(--surface);
        color: var(--text);
    }

    /* ── Stats — hidden on mobile to keep focus on leads ─────────── */
    .stats-row { display: none; }

    /* ── Filters — sticky, compact, collapsible ──────────────────── */
    .filters-wrap {
        position: sticky;
        top: var(--app-sticky-offset);
        z-index: 20;
        padding: 12px 16px;
        margin: 0 -16px;
        background: rgba(250, 250, 249, 0.92);
        backdrop-filter: saturate(160%) blur(14px);
        -webkit-backdrop-filter: saturate(160%) blur(14px);
        border-bottom: 1px solid var(--dash-row);
    }
    .filters {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        border-radius: 0;
    }
    .filters input[type=search] {
        grid-column: 1 / -1;
        min-height: 44px;
        font-size: 14px;
        width: 100%;
        max-width: none;
        padding: 11px 16px 11px 40px;
        background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a39a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat 12px center;
        background-size: 16px;
        border: 1px solid var(--dash-edge);
        border-radius: 12px;
    }
    .filters input[type=search]:focus {
        border-color: var(--c-300);
        box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.18);
    }

    /* Pre-paint: hide the panel and show the chip in its closed state on mobile.
       (Legacy: was driven by app.js on the old dashboard; harmless if unused.) */
    html.is-mobile-init .filters-more[open] > .filters-more-fields {
        display: none !important;
    }
    html.is-mobile-init .filters-more[open] > summary.filters-more-toggle {
        background: var(--surface);
        color: var(--text-soft);
        border-color: var(--dash-edge);
    }
    html.is-mobile-init .filters-more[open] > summary.filters-more-toggle::after {
        transform: none;
    }

    /* Restore <details> default behaviour on mobile */
    .filters-more {
        display: block;
        grid-column: 1;
        position: relative;
    }
    .filters-more > summary.filters-more-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        user-select: none;
        list-style: none;
        padding: 9px 14px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-soft);
        background: var(--surface);
        border: 1px solid var(--dash-edge);
        border-radius: 999px;
        min-height: 40px;
        transition: background .15s, color .15s, border-color .15s;
    }
    .filters-more > summary.filters-more-toggle::-webkit-details-marker { display: none; }
    .filters-more > summary.filters-more-toggle::after {
        content: '';
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid currentColor;
        margin-left: 2px;
        opacity: 0.6;
        transition: transform .15s;
    }
    .filters-more[open] > summary.filters-more-toggle {
        background: var(--c-900);
        color: var(--c-0);
        border-color: var(--c-900);
    }
    .filters-more[open] > summary.filters-more-toggle::after {
        transform: rotate(180deg);
    }
    .filters-more-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--a-500);
        color: var(--c-950);
        font-size: 10px;
        font-weight: 700;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        line-height: 1;
    }
    .filters-more > .filters-more-fields {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        width: calc(100vw - 32px);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 14px;
        background: var(--surface);
        border: 1px solid var(--dash-edge);
        border-radius: 14px;
        box-shadow: 0 12px 32px rgba(28, 25, 23, 0.18), 0 2px 6px rgba(28, 25, 23, 0.08);
        z-index: 30;
    }
    .filters-more > .filters-more-fields select {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        font-size: 13px;
        padding: 10px 12px;
        background: var(--c-50);
        border-radius: 10px;
    }
    .filters-more > .filters-more-fields button[type=submit] {
        grid-column: 1 / 2;
        min-height: 44px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 10px;
        padding: 11px 14px;
    }
    .filters-more > .filters-more-fields .reset {
        grid-column: 2 / 3;
        text-align: center;
        justify-content: center;
        min-height: 44px;
        border-radius: 10px;
        padding: 11px 14px;
        background: var(--c-50);
    }

    .filters .top-picks {
        grid-column: 2;
        margin-left: 0;
        justify-content: center;
        min-height: 40px;
        padding: 9px 14px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 999px;
    }
    .filters .top-picks::before { font-size: 11px; }

    /* ── Main padding ─────────────────────────────────────────────── */
    main { padding: 16px 16px 80px; }
    .footer-note {
        text-align: center;
        padding: 18px 6px 0;
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    /* ── Leads → polished cards ───────────────────────────────────── */
    .leads,
    .leads tbody,
    .leads tr,
    .leads td { display: block; }
    .leads thead { display: none; }
    .leads {
        width: 100%;
        border: 0;
        background: transparent;
        box-shadow: none;
        margin: 4px 0 0;
    }

    .leads tbody tr {
        position: relative;
        display: grid;
        grid-template-columns: 52px 1fr auto;
        column-gap: 12px;
        row-gap: 4px;
        padding: 16px;
        margin: 0 0 10px;
        background: var(--surface);
        border: 1px solid var(--dash-row);
        border-radius: 16px;
        box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
        transition: box-shadow .15s ease, transform .12s ease;
    }
    .leads tbody tr:active {
        transform: scale(0.997);
    }
    .leads tbody tr:hover {
        background: var(--surface);
        box-shadow: 0 6px 18px rgba(28, 25, 23, 0.08);
    }
    .leads tbody tr:hover td:first-child { box-shadow: none; }

    .leads td {
        padding: 0;
        border: 0;
        min-width: 0;
        max-width: none;
    }

    /* Score: bold round badge with band color (no fill animation) */
    .leads td:nth-child(1) {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: start;
    }
    .leads td:nth-child(1) .score-bar {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        font-size: 17px;
        font-weight: 700;
        letter-spacing: -0.02em;
        border-width: 0;
        box-shadow: inset 0 0 0 1px rgba(28, 25, 23, 0.06);
    }
    .leads td:nth-child(1) .score-fill { display: none; }
    .leads td:nth-child(1) .score-unscored {
        width: 52px;
        height: 52px;
        font-size: 22px;
        box-shadow: none;
    }

    /* Business name — hero of the card */
    .leads td:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        min-width: 0;
        padding-right: 4px;
        padding-top: 2px;
    }
    .leads td:nth-child(2) strong {
        font-size: 16px;
        font-weight: 650;
        line-height: 1.2;
        display: block;
        letter-spacing: -0.015em;
        color: var(--text);
    }
    .leads td:nth-child(2) .muted {
        font-size: 12px;
        margin-top: 2px;
        line-height: 1.35;
        color: var(--text-soft);
    }

    /* Type — subtitle line under name */
    .leads td:nth-child(3) {
        grid-column: 2 / -1;
        grid-row: 2;
        color: var(--text-soft);
        font-size: 12px;
        line-height: 1.4;
        font-weight: 500;
        padding-right: 4px;
    }

    /* Town — hidden on mobile (location is in muted address) */
    .leads td:nth-child(4) { display: none; }

    /* Status — colored chip in top-right corner */
    .leads td:nth-child(6) {
        grid-column: 3;
        grid-row: 1;
        align-self: start;
        justify-self: end;
    }
    .leads td:nth-child(6) .status-select {
        min-width: 0;
        width: auto;
        padding: 5px 22px 5px 11px;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        background-position: right 6px center;
        background-size: 9px;
        border-radius: 999px;
        border-color: transparent;
    }

    /* Contact — equal-width action row */
    .leads td.contact {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-top: 10px;
        max-width: none;
        min-width: 0;
    }
    .leads td.contact .contact-meta-links {
        display: flex;
        gap: 8px;
        width: 100%;
    }
    .leads td.contact .contact-search-row {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
    }
    .leads td.contact a.search-pill {
        width: 100%;
        max-width: none;
        min-height: 40px;
        padding: 9px 14px;
        font-size: 11px;
        border-radius: 999px;
    }
    .leads td.contact .contact-more-wrap {
        flex: 1 1 0;
        min-width: 0;
        margin-left: 0;
    }
    .leads td.contact .contact-more-toggle {
        width: 100%;
    }
    .leads td.contact .contact-more-toggle > summary.more-summary {
        width: 100%;
        min-height: 40px;
        padding: 9px 14px;
        font-size: 11px;
        border-radius: 999px;
    }
    .leads td.contact .contact-more-panel {
        right: 0;
        min-width: 180px;
        max-width: calc(100vw - 64px);
        border-radius: 12px;
    }

    /* Notes — chip that expands on focus */
    .leads td:nth-child(7) {
        grid-column: 1 / -1;
        grid-row: 4;
        margin-top: 2px;
    }
    .leads td:nth-child(7) textarea.notes {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        height: 40px;
        font-size: 13px;
        line-height: 1.4;
        padding: 11px 14px;
        background: var(--c-50);
        border: 1px solid transparent;
        border-radius: 999px;
        resize: none;
        overflow: hidden;
        color: var(--text);
        transition: height .25s ease, border-radius .2s ease, background .15s, border-color .15s, box-shadow .15s;
    }
    .leads td:nth-child(7) textarea.notes::placeholder {
        color: var(--text-soft);
        opacity: 0.7;
    }
    .leads td:nth-child(7) textarea.notes:focus,
    .leads td:nth-child(7) textarea.notes:not(:placeholder-shown) {
        height: 92px;
        border-radius: 14px;
        background: var(--surface);
        border-color: var(--dash-edge);
        overflow: auto;
        box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.12);
    }

    /* ── Auth + onboarding take the full width on small screens ───── */
    .auth-body { padding: 20px 12px; }
    .auth-card,
    .auth-card.wider {
        max-width: 100%;
        padding: 24px 20px;
        border-radius: var(--r-lg);
    }
    .auth-card h1 { font-size: 24px; margin-top: 12px; }
    .auth-card .lead { font-size: 14px; margin-bottom: 22px; }
    .onboarding .big-input { font-size: 15px; padding: 11px 13px; letter-spacing: 1px; }
    .trade-grid, .area-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
    .trade-card, .area-card { padding: 12px; }
    .onboarding-actions { width: 100%; }
    .onboarding-actions > .outline,
    .onboarding-actions > button { width: 100%; }
    .onboarding .field-row > .outline,
    .onboarding .field-row > button { width: 100%; }
    .onboarding .field-row > input { flex: 1 1 100%; }
    .ob-search-row { flex-direction: column; }
    .ob-search-row .outline { width: 100%; }
    .ob-nav-row { flex-direction: column-reverse; }
    .ob-nav-row .outline,
    .ob-nav-row .primary { width: 100%; }
    .area-grid-compact { max-height: 240px; }
    .auth-card form > button.primary,
    .auth-card form > button.outline,
    .auth-card form > a.primary,
    .auth-card form > a.outline { width: 100%; }
}

/* Dark mode tweaks for mobile cards */
@media (max-width: 720px) {
    [data-theme="dark"] body.page-dashboard { background: var(--bg); }
    [data-theme="dark"] .app-topbar { background: rgba(13, 12, 11, 0.82); }
    [data-theme="dark"] .filters-wrap {
        background: rgba(13, 12, 11, 0.85);
    }
    [data-theme="dark"] .filters input[type=search] {
        background-color: var(--surface);
        border-color: var(--border);
    }
    [data-theme="dark"] .filters-more > summary.filters-more-toggle {
        background: var(--surface);
        border-color: var(--border);
        color: var(--text-soft);
    }
    [data-theme="dark"] .filters-more[open] > summary.filters-more-toggle {
        background: var(--a-500);
        color: #0d0c0b;
        border-color: var(--a-500);
    }
    [data-theme="dark"] .filters-more > .filters-more-fields {
        background: var(--surface);
        border-color: var(--border);
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    }
    [data-theme="dark"] .filters-more > .filters-more-fields select,
    [data-theme="dark"] .filters-more > .filters-more-fields .reset {
        background-color: var(--c-100);
        border-color: var(--border);
        color: var(--text);
    }
    [data-theme="dark"] .filters .top-picks {
        background: var(--surface);
        border-color: var(--border);
        color: var(--text);
    }
    [data-theme="dark"] .leads tbody tr {
        background: var(--surface);
        border-color: var(--dash-row);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    }
    [data-theme="dark"] .leads tbody tr:hover {
        background: var(--surface);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    }
    [data-theme="dark"] .leads td:nth-child(7) textarea.notes {
        background: var(--c-100);
        color: var(--text);
    }
    [data-theme="dark"] .leads td:nth-child(7) textarea.notes:focus,
    [data-theme="dark"] .leads td:nth-child(7) textarea.notes:not(:placeholder-shown) {
        background: var(--surface);
        box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.18);
    }
    [data-theme="dark"] .page-head .actions a.outline.small { background: var(--surface); }
}

/* Very small phones — tighten further */
@media (max-width: 380px) {
    .leads tbody tr {
        grid-template-columns: 48px 1fr auto;
        padding: 14px;
        column-gap: 10px;
    }
    .leads td:nth-child(1) .score-bar {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
    .page-head h1 { font-size: 22px; }
    .leads td:nth-child(2) strong { font-size: 15px; }
    .filters-more > .filters-more-fields { width: calc(100vw - 32px); }
}
