@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 75% 100%;
    font-display: swap;
    src: url("../fonts/roboto-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 75% 100%;
    font-display: swap;
    src: url("../fonts/roboto-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Roboto Serif";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 75% 100%;
    font-display: swap;
    src: url("../fonts/roboto-serif-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Roboto Serif";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 75% 100%;
    font-display: swap;
    src: url("../fonts/roboto-serif-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --paper: #f2efe7;
    --paper-deep: #e8e2d6;
    --surface: #fffdf8;
    --surface-soft: #f8f5ee;
    --ink: #18201d;
    --ink-soft: #414d48;
    --muted: #737d77;
    --line: rgba(24, 32, 29, 0.11);
    --line-strong: rgba(24, 32, 29, 0.18);
    --brand: #eb6246;
    --brand-deep: #ab3c27;
    --owner: #b56f00;
    --owner-bg: #fff4da;
    --owner-line: rgba(181, 111, 0, 0.22);
    --company: #176f9f;
    --company-bg: #edf7fc;
    --company-line: rgba(23, 111, 159, 0.2);
    --high: #11855a;
    --high-bg: #e6f7ef;
    --medium: #a86b06;
    --medium-bg: #fff3d7;
    --low: #78685d;
    --low-bg: #f2ebe6;
    --shadow-sm: 0 8px 24px rgba(46, 38, 27, 0.055);
    --shadow-md: 0 24px 64px rgba(46, 38, 27, 0.09);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --page: 1580px;
    --font-sans: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Roboto Serif", Georgia, "Times New Roman", serif;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(rgba(24, 32, 29, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 32, 29, 0.018) 1px, transparent 1px),
        var(--paper);
    background-size: 38px 38px;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

.eyebrow {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 0 0 15px;
    color: var(--brand-deep);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.eyebrow > span {
    width: 23px;
    height: 1px;
    background: currentColor;
}

.eyebrow-light {
    color: rgba(255, 255, 255, 0.62);
}

.button {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: white;
    background: var(--ink);
    box-shadow: 0 12px 28px rgba(24, 32, 29, 0.15);
}

.button-primary:hover {
    box-shadow: 0 16px 32px rgba(24, 32, 29, 0.2);
}

.button-secondary {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.7);
}

.button-secondary:hover {
    border-color: var(--brand);
    background: white;
}

.icon-button {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button:hover {
    border-color: var(--brand);
    color: var(--brand-deep);
    background: white;
}

.icon-button.is-copied {
    border-color: var(--high);
    color: var(--high);
    background: var(--high-bg);
}

.text-button {
    padding: 4px 0;
    border: 0;
    color: var(--brand-deep);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.text-button:hover {
    text-decoration: underline;
}

.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    width: max-content;
}

.brand-mark {
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    border-radius: 10px 10px 10px 3px;
    color: white;
    background: var(--ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-copy {
    display: grid;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: 14px;
    font-weight: 750;
}

.brand-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-light {
    color: white;
}

.brand-light .brand-mark {
    color: var(--ink);
    background: white;
}

.brand-light .brand-copy small {
    color: rgba(255, 255, 255, 0.48);
}

/* Authentication */

.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 8% 8%, rgba(235, 98, 70, 0.1), transparent 28%),
        radial-gradient(circle at 92% 92%, rgba(23, 111, 159, 0.08), transparent 28%),
        var(--paper);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    width: min(1180px, 100%);
    min-height: 690px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 30px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 92% 7%, rgba(235, 98, 70, 0.4), transparent 30%),
        radial-gradient(circle at 3% 97%, rgba(23, 111, 159, 0.24), transparent 36%),
        var(--ink);
}

.auth-brand-panel::after {
    position: absolute;
    right: -100px;
    bottom: -100px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 540px;
}

.auth-brand-copy h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(48px, 5vw, 72px);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.auth-brand-copy h1 em {
    color: #ff9e85;
    font-weight: 400;
}

.auth-brand-copy > p:last-child {
    max-width: 480px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 17px;
    line-height: 1.65;
}

.auth-brand-foot {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.46);
    font-size: 11px;
    font-weight: 600;
}

.auth-brand-foot i {
    margin-right: 5px;
    color: #67d49d;
}

.auth-form-panel {
    display: grid;
    place-items: center;
    padding: 40px;
}

.auth-form-card {
    width: min(390px, 100%);
}

.auth-form-head {
    margin-bottom: 30px;
}

.auth-lock {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 23px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--brand-deep);
    background: #fff7f3;
    font-size: 16px;
}

.auth-form-head .eyebrow {
    margin-bottom: 11px;
}

.auth-form-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.auth-form-head > p:last-child {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.form-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid rgba(180, 48, 30, 0.18);
    border-radius: 11px;
    color: #8f2e1f;
    background: #fff0ec;
    font-size: 13px;
    line-height: 1.5;
}

.form-alert i {
    margin-top: 3px;
}

.auth-form {
    display: grid;
    gap: 17px;
}

.field {
    display: grid;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
}

.field-control {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: white;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-control:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(235, 98, 70, 0.1);
}

.field-control > i {
    color: #909893;
}

.field-control input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 15px;
}

.field-control input::placeholder {
    color: #a3aaa5;
}

.password-toggle {
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.auth-submit {
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    background: var(--brand);
}

.auth-help {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.auth-help i {
    margin-top: 2px;
}

/* Report shell */

.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: min(calc(100% - 48px), var(--page));
    margin: 14px auto 0;
    padding: 9px 11px 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 17px;
    background: rgba(249, 246, 239, 0.86);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px);
}

.header-context {
    display: grid;
    gap: 1px;
    justify-items: center;
    line-height: 1.3;
}

.header-context-label {
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.header-context-value {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 650;
}

.user-menu {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-self: end;
}

.user-avatar {
    display: grid;
    width: 33px;
    height: 33px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--ink);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
}

.user-copy {
    display: grid;
    min-width: 0;
    line-height: 1.25;
}

.user-copy strong {
    font-size: 11px;
}

.user-copy small {
    max-width: 175px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-shell,
.app-footer {
    width: min(calc(100% - 48px), var(--page));
    margin-inline: auto;
}

.report-heading {
    display: flex;
    gap: 32px;
    align-items: flex-end;
    justify-content: space-between;
    padding: 54px 10px 34px;
}

.report-heading h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(44px, 5vw, 68px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.report-description {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.65;
}

.report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 16px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 11px;
}

.report-meta span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.report-meta i {
    color: var(--brand-deep);
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
    padding-bottom: 4px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 0 10px 38px;
}

.metric-card {
    position: relative;
    display: grid;
    min-height: 166px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(255, 253, 248, 0.78);
}

.metric-card::after {
    position: absolute;
    right: -30px;
    bottom: -44px;
    width: 120px;
    height: 120px;
    border: 1px solid var(--line);
    border-radius: 50%;
    content: "";
}

.metric-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 13px;
}

.metric-card strong {
    align-self: end;
    margin-top: 20px;
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1;
}

.metric-card > span:not(.metric-icon) {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 650;
}

.metric-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.metric-high {
    color: #07553b;
    border-color: rgba(17, 133, 90, 0.18);
    background: var(--high-bg);
}

.metric-high .metric-icon {
    color: var(--high);
    background: rgba(255, 255, 255, 0.55);
}

.metric-owner {
    color: #744904;
    border-color: rgba(181, 111, 0, 0.18);
    background: var(--owner-bg);
}

.metric-owner .metric-icon {
    color: var(--owner);
    background: rgba(255, 255, 255, 0.55);
}

.metric-crm {
    color: #174d70;
    border-color: rgba(23, 111, 159, 0.18);
    background: var(--company-bg);
}

.metric-crm .metric-icon {
    color: var(--company);
    background: rgba(255, 255, 255, 0.55);
}

.metric-follow-up {
    color: #8b2f20;
    border-color: rgba(180, 48, 30, 0.16);
    background: #fff0ec;
}

.metric-follow-up .metric-icon {
    color: #a43a28;
    background: rgba(255, 255, 255, 0.55);
}

.flash-stack {
    display: grid;
    gap: 8px;
    padding: 0 10px 18px;
}

.flash-message {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.5;
}

.flash-message i {
    margin-top: 2px;
}

.flash-success {
    border-color: rgba(17, 133, 90, 0.18);
    color: #07553b;
    background: var(--high-bg);
}

.flash-error {
    border-color: rgba(180, 48, 30, 0.18);
    color: #8f2e1f;
    background: #fff0ec;
}

.report-workspace {
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    gap: 18px;
    padding: 0 10px;
}

.filter-panel {
    position: sticky;
    top: 88px;
    align-self: start;
    display: grid;
    max-height: calc(100vh - 106px);
    padding: 18px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 253, 248, 0.92);
    box-shadow: var(--shadow-sm);
}

.filter-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.filter-panel-head > div {
    display: grid;
    line-height: 1.25;
}

.filter-panel-head span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.filter-panel-head strong {
    margin-top: 4px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.search-field {
    display: flex;
    gap: 9px;
    align-items: center;
    min-height: 43px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: white;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-field:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(235, 98, 70, 0.09);
}

.search-field > i {
    color: var(--muted);
    font-size: 12px;
}

.search-field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 12px;
}

.search-field input::placeholder {
    color: #9aa29d;
}

.search-field kbd {
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--muted);
    background: var(--surface-soft);
    font-family: inherit;
    font-size: 9px;
}

.filter-section {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.filter-title {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.niche-filter-list {
    display: grid;
    gap: 3px;
}

.niche-filter {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--ink-soft);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    text-align: left;
}

.niche-filter:hover {
    background: var(--surface-soft);
}

.niche-filter.is-active {
    border-color: rgba(235, 98, 70, 0.16);
    color: var(--brand-deep);
    background: #fff2ee;
}

.niche-filter span {
    display: flex;
    gap: 7px;
    align-items: center;
}

.niche-filter span i {
    width: 13px;
    color: var(--muted);
    text-align: center;
}

.niche-filter.is-active span i {
    color: var(--brand);
}

.niche-filter strong {
    color: var(--muted);
    font-size: 10px;
}

.choice-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

.filter-select {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 36px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.filter-select i {
    color: var(--company);
    font-size: 10px;
}

.filter-select select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink-soft);
    background: transparent;
    cursor: pointer;
    font-size: 10px;
    font-weight: 650;
}

.choice {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    min-height: 33px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: white;
    cursor: pointer;
    font-size: 10px;
    font-weight: 650;
}

.choice.is-active {
    border-color: var(--ink);
    color: white;
    background: var(--ink);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-high {
    background: var(--high);
}

.status-medium {
    background: var(--medium);
}

.status-low {
    background: var(--low);
}

.filter-toggles {
    gap: 12px;
}

.toggle-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    color: var(--ink-soft);
    cursor: pointer;
}

.toggle-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.toggle-switch {
    position: relative;
    width: 30px;
    height: 18px;
    margin-top: 2px;
    border: 1px solid var(--line-strong);
    border-radius: 99px;
    background: #e7e2d9;
    transition: background 160ms ease;
}

.toggle-switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(24, 32, 29, 0.18);
    content: "";
    transition: transform 160ms ease;
}

.toggle-row input:checked + .toggle-switch {
    border-color: var(--ink);
    background: var(--ink);
}

.toggle-row input:checked + .toggle-switch::after {
    transform: translateX(12px);
}

.toggle-row input:focus-visible + .toggle-switch {
    outline: 3px solid rgba(235, 98, 70, 0.18);
    outline-offset: 2px;
}

.toggle-row > span:last-child {
    display: grid;
    line-height: 1.35;
}

.toggle-row strong {
    font-size: 11px;
    font-weight: 700;
}

.toggle-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.filter-panel-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 10px;
    border-radius: 9px;
    color: #6f654f;
    background: #faf3e3;
    font-size: 9px;
    line-height: 1.5;
}

.filter-panel-note i {
    margin-top: 2px;
    color: var(--owner);
}

.filter-panel-note p {
    margin: 0;
}

.results-panel {
    min-width: 0;
}

.results-toolbar {
    position: sticky;
    top: 88px;
    z-index: 20;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.92);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
}

.results-toolbar > div:first-child {
    display: grid;
    line-height: 1.25;
}

.results-eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.results-toolbar strong {
    margin-top: 3px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.results-tools {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mobile-filter-toggle {
    display: none;
}

.sort-control {
    display: flex;
    gap: 5px;
    align-items: center;
    min-height: 36px;
    padding-left: 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
}

.sort-control > span {
    color: var(--muted);
    font-size: 10px;
}

.sort-control select {
    min-height: 34px;
    padding: 0 28px 0 0;
    border: 0;
    outline: 0;
    color: var(--ink-soft);
    background: transparent;
    cursor: pointer;
    font-size: 10px;
    font-weight: 650;
}

.toolbar-print {
    width: 36px;
    min-height: 36px;
    padding: 0;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 11px;
}

.active-filter {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 26px;
    padding: 0 7px 0 9px;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.7);
    font-size: 9px;
    font-weight: 650;
}

.active-filter button {
    display: grid;
    width: 16px;
    height: 16px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: rgba(24, 32, 29, 0.07);
    cursor: pointer;
    font-size: 8px;
}

.lead-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-top: 12px;
}

.lead-card {
    --niche-color: #58635e;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface);
    box-shadow: 0 7px 22px rgba(46, 38, 27, 0.04);
    animation: card-in 260ms both;
}

.lead-card.is-beyond-limit {
    display: none;
}

.lead-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--niche-color);
    content: "";
}

.lead-card.priority-high {
    border-color: rgba(17, 133, 90, 0.2);
}

.niche-appliances {
    --niche-color: #df6b3e;
}

.niche-veterinary {
    --niche-color: #168c78;
}

.niche-plumbing {
    --niche-color: #1973a8;
}

.niche-aesthetics {
    --niche-color: #c64c83;
}

.niche-lawyers {
    --niche-color: #5f6ec7;
}

.niche-flooring {
    --niche-color: #997022;
}

.niche-pet {
    --niche-color: #4b8f45;
}

.lead-card-head {
    padding: 18px 18px 15px 22px;
}

.lead-card-labels {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.niche-label,
.priority-label {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    width: max-content;
    padding: 4px 7px;
    border-radius: 99px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.niche-label {
    color: color-mix(in srgb, var(--niche-color) 80%, var(--ink));
    background: color-mix(in srgb, var(--niche-color) 10%, white);
}

.niche-label i {
    font-size: 9px;
}

.priority-label {
    color: var(--medium);
    background: var(--medium-bg);
}

.priority-label i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.priority-high .priority-label {
    color: var(--high);
    background: var(--high-bg);
}

.priority-low .priority-label {
    color: var(--low);
    background: var(--low-bg);
}

.lead-card h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.14;
}

.lead-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.lead-meta > span {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink-soft);
    background: #faf8f3;
    font-size: 10px;
    font-weight: 600;
}

.lead-meta > span i {
    color: var(--muted);
    font-size: 9px;
}

.lead-meta .has-owner-contact {
    border-color: var(--owner-line);
    color: #724804;
    background: var(--owner-bg);
}

.lead-meta .has-owner-contact i {
    color: var(--owner);
}

.lead-address {
    display: flex;
    gap: 7px;
    align-items: flex-start;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.lead-address i {
    flex: 0 0 auto;
    margin-top: 3px;
    color: var(--niche-color);
}

.lead-links {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 10px;
}

.lead-links a {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    color: var(--brand-deep);
    font-size: 10px;
    font-weight: 700;
}

.lead-links a:hover {
    text-decoration: underline;
}

.lead-crm-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 18px 11px 22px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f9f7f2;
}

.crm-status {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    width: max-content;
    padding: 4px 7px;
    border-radius: 99px;
    color: var(--low);
    background: var(--low-bg);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.status-tone-contact {
    color: var(--company);
    background: var(--company-bg);
}

.status-tone-waiting,
.status-tone-meeting {
    color: var(--medium);
    background: var(--medium-bg);
}

.status-tone-proposal {
    color: #6a54a6;
    background: #f0edff;
}

.status-tone-won {
    color: var(--high);
    background: var(--high-bg);
}

.status-tone-lost {
    color: #9d3e2b;
    background: #fff0ec;
}

.status-tone-paused {
    color: var(--low);
    background: var(--low-bg);
}

.crm-follow-up {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    color: var(--muted);
    font-size: 8px;
    font-weight: 650;
}

.crm-follow-up.is-overdue {
    color: #a43a28;
}

.lead-crm-bar > a {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    margin-left: auto;
    color: var(--brand-deep);
    font-size: 9px;
    font-weight: 750;
}

.lead-crm-bar > a:hover {
    text-decoration: underline;
}

.owner-identity {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 18px 11px 22px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.owner-initial {
    display: grid;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    color: var(--owner);
    background: var(--owner-bg);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
}

.owner-identity-copy {
    display: grid;
    min-width: 0;
    line-height: 1.3;
}

.owner-identity-copy span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.owner-identity-copy strong {
    margin-top: 2px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
}

.confidence-badge {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    margin-left: auto;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.confidence-badge i {
    color: var(--high);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 18px 11px 22px;
}

.contact-card {
    position: relative;
    min-width: 0;
    min-height: 125px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 12px;
}

.contact-card header {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.contact-card header > span:first-child {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.confidence-inline {
    font-size: 8px;
    opacity: 0.72;
}

.contact-content {
    overflow-wrap: anywhere;
    padding-right: 22px;
    font-size: 11px;
    line-height: 1.65;
}

.contact-content strong {
    font-weight: 800;
}

.contact-content a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.owner-contact {
    border-color: var(--owner-line);
    color: #624004;
    background: var(--owner-bg);
}

.owner-contact header {
    color: var(--owner);
}

.owner-contact.contact-empty {
    border-style: dashed;
    color: #8a7658;
    background: #fbf6eb;
}

.company-contact {
    border-color: var(--company-line);
    color: #114b69;
    background: var(--company-bg);
}

.company-contact header {
    color: var(--company);
}

.copy-contact {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 25px;
    height: 25px;
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.65);
    font-size: 9px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 18px 11px 22px;
}

.social-links a {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    max-width: 100%;
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink-soft);
    background: white;
    font-size: 9px;
    font-weight: 650;
}

.social-links a:hover {
    border-color: var(--brand);
    color: var(--brand-deep);
}

.social-links i {
    font-size: 9px;
}

.lead-evidence {
    margin: auto 18px 14px 22px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.lead-evidence summary {
    display: flex;
    gap: 6px;
    align-items: center;
    width: max-content;
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    list-style: none;
}

.lead-evidence summary::-webkit-details-marker {
    display: none;
}

.lead-evidence summary i:last-child {
    margin-left: 2px;
    transition: transform 160ms ease;
}

.lead-evidence[open] summary i:last-child {
    transform: rotate(180deg);
}

.evidence-grid {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.evidence-grid > div {
    padding: 9px;
    border-radius: 8px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 10px;
    line-height: 1.6;
}

.evidence-grid > div > span:first-child {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.evidence-grid a {
    font-weight: 700;
    text-decoration: underline;
}

.evidence-confidence {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 10px;
}

.evidence-confidence > span {
    flex-basis: 100%;
}

.evidence-confidence strong {
    font-size: 9px;
}

.empty-results {
    padding: 78px 20px;
    text-align: center;
}

.empty-results > span {
    display: grid;
    width: 50px;
    height: 50px;
    margin: 0 auto 17px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    background: white;
}

.empty-results h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.empty-results p {
    margin: 8px 0 18px;
    color: var(--muted);
    font-size: 13px;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 18px 0 6px;
}

.load-more {
    min-width: 180px;
}

.blank-database {
    padding: 78px 20px;
    text-align: center;
}

.blank-database-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--company);
    background: var(--company-bg);
    font-size: 17px;
}

.blank-database h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 31px;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.blank-database p {
    max-width: 480px;
    margin: 9px auto 18px;
    color: var(--muted);
    font-size: 13px;
}

.report-notes {
    padding: 72px 10px 88px;
}

.report-notes > div:first-child {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 22px;
}

.report-notes h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(32px, 3.5vw, 48px);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1;
}

.note-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.note-grid article {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 253, 248, 0.74);
}

.note-code {
    display: grid;
    width: 30px;
    height: 30px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 9px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 11px;
    font-weight: 800;
}

.code-owner {
    color: var(--owner);
    background: var(--owner-bg);
}

.code-company {
    color: var(--company);
    background: var(--company-bg);
}

.code-data {
    color: var(--high);
    background: var(--high-bg);
}

.code-maps {
    color: #5d6bc1;
    background: #eef0ff;
}

.note-grid h3 {
    margin: 0;
    font-size: 13px;
}

.note-grid p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.legal-note {
    max-width: 900px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}

.app-footer {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 22px 10px 34px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
}

/* Administration and import */

.admin-shell,
.client-shell {
    padding-bottom: 80px;
}

.admin-breadcrumb {
    padding: 34px 10px 18px;
}

.admin-breadcrumb a {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.admin-breadcrumb a:hover {
    color: var(--brand-deep);
}

.admin-heading {
    padding: 0 10px 28px;
}

.admin-heading h1,
.client-heading h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 1;
}

.admin-heading > div > p:last-child {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.65;
}

code {
    padding: 2px 5px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--brand-deep);
    background: rgba(255, 255, 255, 0.65);
    font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.9em;
}

.import-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: 14px;
    padding: 0 10px;
}

.import-card,
.import-guide,
.import-history {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 253, 248, 0.9);
    box-shadow: var(--shadow-sm);
}

.import-card {
    padding: 28px;
}

.import-card-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 13px;
    color: var(--company);
    background: var(--company-bg);
    font-size: 17px;
}

.import-card h2,
.import-guide h2,
.import-history h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.import-card > p {
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.file-drop {
    display: grid;
    gap: 10px;
    min-height: 180px;
    place-items: center;
    padding: 24px;
    border: 1.5px dashed rgba(23, 111, 159, 0.3);
    border-radius: 15px;
    color: var(--company);
    background: var(--company-bg);
    cursor: pointer;
    text-align: center;
    transition: border-color 160ms ease, background 160ms ease;
}

.file-drop:hover,
.file-drop.is-dragging,
.file-drop.has-file {
    border-color: var(--company);
    background: #e5f4fb;
}

.file-drop > i {
    font-size: 30px;
}

.file-drop > span {
    max-width: 360px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 650;
}

.file-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.import-submit {
    width: 100%;
    margin-top: 16px;
}

.import-guide {
    padding: 28px;
}

.import-guide ul {
    display: grid;
    gap: 14px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.import-guide li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.6;
}

.import-guide li > i {
    width: 17px;
    margin-top: 3px;
    color: var(--brand-deep);
    text-align: center;
}

.import-schema-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 24px;
    padding: 12px;
    border-radius: 10px;
    color: #6f654f;
    background: #faf3e3;
    font-size: 10px;
    line-height: 1.55;
}

.import-schema-note i {
    margin-top: 2px;
    color: var(--owner);
}

.import-schema-note p {
    margin: 0;
}

.import-history {
    margin: 14px 10px 0;
    padding: 24px;
}

.import-history-head,
.timeline-head {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.import-history-head > span,
.timeline-head > span {
    color: var(--muted);
    font-size: 10px;
}

.import-history-empty,
.timeline-empty {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-top: 18px;
    padding: 18px;
    border: 1px dashed var(--line-strong);
    border-radius: 11px;
    color: var(--muted);
    font-size: 11px;
}

.import-history-list {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.import-history-list article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: white;
}

.history-icon {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 9px;
    color: var(--company);
    background: var(--company-bg);
}

.import-history-list article > div {
    display: grid;
    line-height: 1.35;
}

.import-history-list strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-history-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.history-count {
    padding: 4px 7px;
    border-radius: 7px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 9px;
    white-space: nowrap;
}

/* CRM client page */

.client-heading {
    display: flex;
    gap: 28px;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 10px 28px;
}

.niche-label-large {
    margin-bottom: 14px;
    font-size: 9px;
}

.client-heading > div > p {
    display: flex;
    gap: 7px;
    align-items: flex-start;
    max-width: 850px;
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.client-heading > div > p i {
    margin-top: 3px;
    color: var(--brand-deep);
}

.client-heading-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
}

.client-heading-links a {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--brand-deep);
    font-size: 11px;
    font-weight: 700;
}

.crm-status-large {
    padding: 8px 11px;
    font-size: 10px;
}

.client-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    padding: 0 10px 16px;
}

.overview-card {
    display: grid;
    min-height: 116px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 253, 248, 0.8);
}

.overview-card > span:first-child {
    display: flex;
    gap: 6px;
    align-items: center;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.overview-card strong {
    align-self: end;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.35;
}

.overview-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.overview-overdue {
    border-color: rgba(180, 48, 30, 0.18);
    background: #fff0ec;
}

.client-layout {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 14px;
    padding: 0 10px;
}

.client-sidebar {
    display: grid;
    align-content: start;
    gap: 9px;
}

.client-contact-card,
.client-side-card,
.workflow-card,
.timeline-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.client-contact-card {
    position: relative;
    min-height: 150px;
    padding: 16px;
}

.client-contact-card header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.client-contact-card header span:first-child {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.client-contact-card .contact-content {
    padding-right: 28px;
    font-size: 11px;
    line-height: 1.7;
}

.client-side-card {
    padding: 16px;
}

.client-side-card h2,
.client-side-card summary {
    margin: 0;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.client-socials {
    margin: 12px 0 0;
}

.client-evidence summary {
    display: flex;
    gap: 7px;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.client-evidence summary::-webkit-details-marker {
    display: none;
}

.client-evidence > div {
    margin-top: 11px;
    padding: 10px;
    border-radius: 9px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 10px;
    line-height: 1.65;
}

.client-main {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.workflow-card,
.timeline-card {
    padding: 22px;
}

.workflow-head {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 19px;
}

.workflow-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.workflow-head > span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--company);
    font-size: 10px;
    font-weight: 700;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.field select,
.field textarea,
.field input {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    outline: 0;
    color: var(--ink);
    background: white;
    font-size: 12px;
    line-height: 1.5;
}

.field textarea {
    resize: vertical;
}

.field select:focus,
.field textarea:focus,
.field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(235, 98, 70, 0.08);
}

.field-wide {
    grid-column: 1 / -1;
}

.workflow-submit {
    margin-top: 16px;
}

.timeline-card {
    min-height: 260px;
}

.timeline-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.activity-timeline {
    display: grid;
    gap: 0;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.activity-timeline li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 20px;
}

.timeline-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--brand-deep);
    background: var(--surface-soft);
    font-size: 10px;
}

.timeline-content {
    min-width: 0;
    padding: 1px 0 18px;
    border-bottom: 1px solid var(--line);
}

.activity-timeline li:last-child .timeline-content {
    padding-bottom: 0;
    border-bottom: 0;
}

.timeline-title {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}

.timeline-title strong {
    font-size: 12px;
}

.timeline-title time,
.timeline-content small {
    color: var(--muted);
    font-size: 9px;
}

.timeline-content p {
    margin: 7px 0 0;
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.65;
}

.timeline-status-change {
    display: flex;
    gap: 8px;
    align-items: center;
}

.timeline-channel {
    display: inline-flex;
    margin-top: 7px;
    padding: 3px 6px;
    border-radius: 6px;
    color: var(--company);
    background: var(--company-bg);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.timeline-content small {
    display: block;
    margin-top: 8px;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(7px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1320px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lead-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1040px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 680px;
    }

    .auth-brand-panel {
        min-height: 350px;
    }

    .report-workspace {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
        display: none;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
        gap: 15px;
        max-height: none;
    }

    .filter-panel.is-open {
        display: grid;
    }

    .mobile-filter-toggle {
        display: inline-flex;
    }

    .filter-panel-head,
    .search-field,
    .filter-panel-note {
        grid-column: 1 / -1;
    }

    .filter-section {
        margin-top: 0;
    }

    .results-toolbar {
        position: static;
    }

    .note-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .import-layout {
        grid-template-columns: 1fr;
    }

    .client-layout {
        grid-template-columns: 1fr;
    }

    .client-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-evidence {
        grid-column: 1 / -1;
    }

    .client-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .app-header,
    .report-shell,
    .app-footer {
        width: min(calc(100% - 20px), var(--page));
    }

    .app-header {
        grid-template-columns: 1fr auto;
        margin-top: 8px;
    }

    .header-context,
    .user-copy {
        display: none;
    }

    .report-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 38px 4px 26px;
    }

    .report-heading h1 {
        font-size: clamp(40px, 12vw, 58px);
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 4px 26px;
    }

    .metric-card {
        min-height: 145px;
    }

    .report-workspace {
        padding: 0 4px;
    }

    .filter-panel {
        padding: 14px;
    }

    .filter-panel.is-open {
        display: block;
    }

    .filter-section {
        margin-top: 16px;
    }

    .lead-list {
        gap: 10px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .report-notes {
        padding: 54px 4px 64px;
    }

    .report-notes > div:first-child {
        align-items: flex-start;
        flex-direction: column;
    }

    .note-grid {
        grid-template-columns: 1fr;
    }

    .client-heading {
        align-items: flex-start;
        flex-direction: column;
        padding-inline: 4px;
    }

    .client-overview {
        padding-inline: 4px;
    }

    .client-layout {
        padding-inline: 4px;
    }

    .client-sidebar {
        grid-template-columns: 1fr;
    }

    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .field-wide {
        grid-column: auto;
    }

    .import-layout {
        padding-inline: 4px;
    }

    .import-history {
        margin-inline: 4px;
    }

    .app-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .auth-page {
        padding: 8px;
    }

    .auth-shell {
        border-radius: 22px;
    }

    .auth-brand-panel {
        min-height: 310px;
        padding: 28px 24px;
    }

    .auth-brand-copy h1 {
        font-size: 44px;
    }

    .auth-brand-copy > p:last-child {
        font-size: 15px;
    }

    .auth-brand-foot {
        gap: 8px;
        flex-direction: column;
    }

    .auth-form-panel {
        padding: 30px 22px;
    }

    .auth-form-head h2 {
        font-size: 32px;
    }

    .metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    .metric-card {
        min-height: 134px;
        padding: 14px;
    }

    .metric-card strong {
        font-size: 34px;
    }

    .metric-card:last-child {
        grid-column: 1 / -1;
    }

    .results-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .results-tools {
        width: 100%;
    }

    .sort-control {
        flex: 1;
    }

    .lead-card-labels {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-card {
        min-height: 116px;
    }
}

@media print {
    @page {
        margin: 12mm;
    }

    body {
        background: white;
        font-size: 10pt;
    }

    .app-header,
    .report-actions,
    .filter-panel,
    .results-tools,
    .active-filters,
    .load-more-wrap,
    .copy-contact,
    .app-footer {
        display: none !important;
    }

    .report-shell {
        width: 100%;
    }

    .report-heading {
        padding: 0 0 12mm;
    }

    .metric-grid {
        padding-bottom: 8mm;
    }

    .report-workspace {
        display: block;
        padding: 0;
    }

    .results-toolbar {
        position: static;
        margin-bottom: 5mm;
        box-shadow: none;
    }

    .lead-list {
        display: block;
    }

    .lead-card {
        display: flex !important;
        break-inside: avoid;
        margin-bottom: 5mm;
        box-shadow: none;
    }

    .lead-evidence {
        display: none;
    }

    .report-notes {
        break-before: page;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
