@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    color-scheme: dark;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    --sidebar-width: 260px;
    --bg-base: #080b10;
    --bg-elevated: #0f1419;
    --bg-card: #131a22;
    --bg-input: #0c1016;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);
    --text: #eef2f6;
    --text-muted: #8b97a8;
    --text-faint: #5c6775;
    --accent: #5b8def;
    --accent-soft: rgba(91, 141, 239, 0.14);
    --accent-hover: #7aa3f5;
    --accent-glow: rgba(91, 141, 239, 0.35);
    --success-bg: rgba(34, 197, 94, 0.12);
    --success-text: #6ee7a0;
    --success-border: rgba(34, 197, 94, 0.28);
    --danger: #f87171;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body {
    margin: 0;
    background: var(--bg-base);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-topbar,
.app-nav-backdrop,
.sidebar__close {
    display: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: linear-gradient(180deg, #0c1018 0%, #090d13 100%);
    border-right: 1px solid var(--border);
    padding: 1.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar__brand {
    position: relative;
    padding: 10px 25px 0;
}

.sidebar__logo {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.sidebar__logo:hover {
    color: var(--accent-hover);
}

.sidebar__tagline {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-faint);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-dropdown {
    position: relative;
}

.sidebar-dropdown > summary {
    list-style: none;
    cursor: pointer;
}

.sidebar-dropdown > summary::-webkit-details-marker {
    display: none;
}

.sidebar-dropdown > summary::-moz-list-bullet {
    display: none;
}

.sidebar-dropdown__list {
    display: none;
    padding: 0;
    margin-top: 0.1rem;
    gap: 0.25rem;
    flex-direction: column;
    width: 100%;
    position: relative;
}

.sidebar-dropdown[open] .sidebar-dropdown__list,
.sidebar-dropdown.is-open .sidebar-dropdown__list {
    display: flex;
}

.sidebar-dropdown__chevron {
    transition: transform 0.15s ease;
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.05rem;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid rgba(238, 242, 246, 0.95);
    transform: rotate(0deg);
}

.sidebar-dropdown[open] .sidebar-dropdown__chevron,
.sidebar-dropdown.is-open .sidebar-dropdown__chevron {
    transform: rotate(90deg);
}

.sidebar__link--sub {
    width: 100%;
    border-radius: 0;
    padding-left: 1.1rem;
    padding-right: 0.85rem;
}

.sidebar-dropdown > summary {
    width: 100%;
    border-radius: 0;
}

.sidebar-dropdown__list .sidebar__link--sub {
    box-sizing: border-box;
}

/* Жёсткие переопределения для "Интеграции" под-пунктов (без визуальных зазоров) */
.sidebar-dropdown__list {
    align-items: stretch;
    width: 100%;
}

.sidebar-dropdown__list .sidebar__link--sub {
    width: 100%;
    box-sizing: border-box;
    border-radius: 0 !important;
    margin: 0 !important;
    display: flex;
    position: relative;
}

/* Никаких линий/точек дерева — только отступ слева */
.sidebar-dropdown__list::before {
    content: none;
}

.sidebar-dropdown__list .sidebar__link--sub::before {
    content: none;
}

.sidebar__section {
    padding: 0 0.75rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar__link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.sidebar__link.is-active {
    background: var(--accent-soft);
    color: var(--text);
    border-color: rgba(91, 141, 239, 0.25);
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar__link--muted {
    margin-top: 0.75rem;
    color: var(--text-faint);
    font-size: 0.875rem;
}

.sidebar__icon {
    width: 1.125rem;
    text-align: center;
    opacity: 0.85;
    font-size: 0.875rem;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: 2rem 2.5rem;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(91, 141, 239, 0.08), transparent),
        var(--bg-base);
}

.page-header {
    margin-bottom: 1.75rem;
}

.page-header h1 {
    margin: 0 0 0.4rem;
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-header .lead {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card--flush {
    padding: 0;
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

.flash {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

.flash-danger {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.28);
}

label,
.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    margin-bottom: 1.1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="radio"],
input[type="checkbox"] {
    width: auto;
    height: auto;
    padding: 0;
    margin: 0 0.5rem 0 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

input::placeholder {
    color: var(--text-faint);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

select option {
    background: #161b22;
    color: var(--text);
}

.form-error,
.invalid-feedback,
ul.form-errors li {
    color: var(--danger);
    font-size: 0.8125rem;
    margin: -0.85rem 0 1rem;
    list-style: none;
    padding: 0;
}

button[type="submit"],
.btn-primary {
    background: linear-gradient(180deg, #6b96f2 0%, #4a7fe8 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.35rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    box-shadow: 0 4px 16px var(--accent-glow);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

button[type="submit"]:hover,
.btn-primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 20px var(--accent-glow);
}

button[type="submit"]:active,
.btn-primary:active {
    transform: translateY(1px);
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: var(--text-muted);
}

.empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.25rem;
}

.empty-state__title {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

.empty-state p:last-child {
    margin: 0;
    max-width: 28rem;
    margin-inline: auto;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    line-height: 1.3;
    table-layout: fixed;
}

.leads-table th,
.leads-table td {
    padding: 0.5rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leads-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.02);
}

.leads-table tbody tr:last-child td {
    border-bottom: none;
}

.leads-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.leads-table__title {
    width: 32%;
    font-weight: 500;
}

.leads-table__title .leads-table__link {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leads-table__meta {
    margin-left: 0.45rem;
    font-size: 0.8125rem;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
}

.leads-table__theme {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
}

.leads-table__fit {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    width: 3.5rem;
}

.leads-table__company {
    width: 24%;
    font-weight: 500;
}

.leads-table__truncate {
    display: inline;
}

.leads-table__inn {
    font-family: ui-monospace, monospace;
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: 0.45rem;
}

.leads-table__muted {
    color: var(--text-faint);
    font-weight: 400;
}

.leads-table__region {
    white-space: nowrap;
    color: var(--text-muted);
    width: 4rem;
}

.leads-table__context {
    min-width: 16rem;
    max-width: 22rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.leads-table__kp {
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #f0b429;
}

.leads-table__date {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.8125rem;
    width: 5.5rem;
}

.leads-table__kp {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #f0b429;
    background: rgba(240, 180, 41, 0.14);
    border: 1px solid rgba(240, 180, 41, 0.28);
    vertical-align: middle;
}

.lead-flow__kp-sent {
    margin: 0.55rem 0 0;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #f0b429;
    background: rgba(240, 180, 41, 0.12);
    border: 1px solid rgba(240, 180, 41, 0.28);
}

.score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
}

.score--high {
    background: rgba(34, 197, 94, 0.15);
    color: #6ee7a0;
}

.score--mid {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

.score--low {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 14rem;
}

.tag {
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.status {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status--new {
    background: var(--accent-soft);
    color: #9ec0ff;
}

.status--in_progress {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

.status--rejected {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.status--client {
    background: rgba(34, 197, 94, 0.15);
    color: #6ee7a0;
}

.leads-table .status {
    padding: 0.1rem 0.4rem;
    font-size: 0.6875rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--border);
}

.pagination__meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.pagination__controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pagination__page {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.pagination__link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.pagination__link:hover {
    color: var(--accent-hover);
    border-color: rgba(91, 141, 239, 0.35);
}

.pagination__link.is-disabled {
    color: var(--text-faint);
    pointer-events: none;
    opacity: 0.55;
}

.leads-table__sub {
    display: none;
}

.leads-table__link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.leads-table__link:hover {
    color: var(--accent-hover);
}

.leads-table__row {
    cursor: pointer;
}

.leads-table__row--unread td {
    background: rgba(91, 141, 239, 0.07);
}

.leads-table__row--unread td:first-child {
    box-shadow: inset 3px 0 0 var(--accent);
}

.leads-table__row--unread .leads-table__link {
    color: #fff;
    font-weight: 600;
}

.leads-table tbody tr.leads-table__row--unread:hover td {
    background: rgba(91, 141, 239, 0.11);
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.back-link:hover {
    color: var(--text);
}

.lead-card-nav {
    margin-bottom: 1rem;
}

.lead-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.lead-card-header__main {
    min-width: 0;
    flex: 1;
}

.operator-actions {
    margin: -0.5rem 0 1.25rem;
}

.lead-card-header__meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.lead-card-header__badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.lead-tabs {
    display: flex;
    gap: 0.35rem;
    margin: 0 0 1.5rem;
    padding: 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.lead-tabs__link {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.lead-tabs__link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.lead-tabs__link.is-active {
    color: var(--text);
    background: var(--accent-soft);
    border-color: rgba(91, 141, 239, 0.25);
}

.lead-flow {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.85fr);
    gap: 1rem;
    align-items: start;
    max-width: none;
}

.lead-flow__main,
.lead-flow__side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.lead-flow__step {
    padding: 1.35rem 1.35rem 1.25rem;
}

.lead-flow__callto {
    padding: 1.35rem 1.35rem 1.25rem;
}

.lead-flow__callto-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.lead-flow__callto-top .lead-flow__title {
    margin: 0;
}

.lead-flow__contact-add {
    flex-shrink: 0;
    padding: 0.35rem 0.7rem;
    font-size: 0.8125rem;
}

.lead-flow__callto-name {
    margin: 0.35rem 0 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.lead-flow__callto-meta {
    margin: 0.15rem 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.lead-flow__phones {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lead-flow__phone-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.lead-flow__phone-main {
    min-width: 0;
}

.lead-flow__phone {
    display: block;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    font: inherit;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--accent-hover);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.lead-flow__phone:hover {
    text-decoration: underline;
}

.lead-flow__role {
    display: inline-block;
    margin-top: 0.2rem;
    margin-right: 0.4rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #9ec0ff;
    background: var(--accent-soft);
    border: 1px solid rgba(91, 141, 239, 0.22);
}

.lead-flow__phone-dial {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.6875rem;
    color: var(--text-faint);
    text-decoration: none;
}

.lead-flow__phone-dial:hover {
    color: var(--text-muted);
    text-decoration: underline;
}

.lead-flow__phone-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.lead-flow__contact-delete {
    margin: 0;
    display: contents;
}

.lead-flow__contact-icon-btn {
    appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    line-height: 0;
    cursor: pointer;
}

.lead-flow__contact-icon-btn svg {
    display: block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.lead-flow__contact-icon-btn:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.06);
}

.lead-flow__contact-icon-btn--danger:hover {
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
}

.lead-flow__phone-hint {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--text-faint);
}

.lead-flow__pitch {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.lead-flow__pitch-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin-bottom: 0.4rem;
}

.lead-flow__pitch p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.lead-flow__history-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.lead-flow__add-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .lead-flow__history-top {
        flex-direction: column;
        align-items: stretch;
    }

    .lead-flow__add-btn {
        width: 100%;
    }
}

.lead-flow__step--accent {
    border-color: rgba(91, 141, 239, 0.35);
    box-shadow: 0 0 0 1px rgba(91, 141, 239, 0.12), var(--shadow);
}

.lead-flow__title {
    margin: 0 0 0.25rem;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.lead-flow__hint {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.lead-flow__boards-btn {
    width: 100%;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.35rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.lead-offer-box {
    margin: 0.85rem 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    border: 1px solid rgba(91, 141, 239, 0.28);
}

.lead-offer-box__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin-bottom: 0.35rem;
}

.lead-offer-box__url {
    display: block;
    word-break: break-all;
    color: var(--accent-hover);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.lead-modal {
    padding: 0;
    border: none;
    background: transparent;
    max-width: calc(100vw - 2rem);
    width: 26rem;
}

.lead-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.lead-modal__panel {
    margin: 0;
    padding: 1.35rem 1.35rem 1.25rem;
    box-shadow: var(--shadow);
}

.lead-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.lead-modal__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.lead-modal__close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.lead-modal__intro {
    margin-bottom: 1.15rem;
}

.lead-modal__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.lead-modal__actions .btn-secondary,
.lead-modal__actions .btn-primary,
.lead-modal__actions button[type="submit"] {
    width: auto;
    margin-bottom: 0;
}

.lead-modal__next-row[hidden] {
    display: none !important;
}

.activity-feed {
    margin: 0;
    padding: 0.25rem 0 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.activity-feed__item {
    position: relative;
    display: grid;
    grid-template-columns: 1.25rem 1fr;
    gap: 0.85rem;
    padding: 0 0 1.25rem;
    align-items: start;
}

.activity-feed__item:last-child {
    padding-bottom: 0;
}

/* Общая вертикальная линия таймлайна */
.activity-feed__item::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.35rem;
    bottom: -0.15rem;
    width: 2px;
    background: var(--border-strong);
    transform: translateX(-50%);
}

.activity-feed__item:last-child::before {
    bottom: auto;
    height: 0.85rem;
}

.activity-feed__dot {
    position: relative;
    z-index: 1;
    width: 0.75rem;
    height: 0.75rem;
    margin-top: 0.35rem;
    margin-left: 0.125rem;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 3px var(--bg-card);
    flex-shrink: 0;
}

.activity-feed__card {
    min-width: 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
}

.activity-feed__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border);
}

.activity-feed__type {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

.activity-feed__date {
    font-size: 0.75rem;
    color: var(--text-faint);
    white-space: nowrap;
}

.activity-feed__comment,
.activity-feed__next,
.activity-feed__link {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.45;
}

.activity-feed__comment--empty {
    color: var(--text-faint);
    font-style: italic;
}

.activity-feed__next {
    color: #facc15;
}

.activity-feed__link a {
    color: var(--accent-hover);
}

@media (max-width: 900px) {
    .lead-flow {
        grid-template-columns: 1fr;
    }

    .lead-flow__side {
        order: -1;
    }
}

.score--lg {
    min-width: 2.75rem;
    padding: 0.35rem 0.65rem;
    font-size: 1rem;
}

.lead-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.lead-card-section--wide {
    grid-column: 1 / -1;
}

.lead-card-section__title {
    margin: 0 0 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
}

.lead-card-text {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.lead-card-text--pitch {
    color: var(--text);
    font-size: 1rem;
}

.signal-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.signal-timeline__item {
    padding-left: 1rem;
    border-left: 2px solid var(--border-strong);
}

.signal-timeline__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.signal-timeline__source {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-hover);
}

.signal-timeline__date {
    font-size: 0.75rem;
    color: var(--text-faint);
}

.signal-timeline__title {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.signal-timeline__desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.45;
}

.meta-list {
    margin: 0;
}

.meta-list__row {
    display: grid;
    grid-template-columns: 6rem 1fr;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}

.meta-list__row:last-child {
    border-bottom: none;
}

.meta-list dt {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-faint);
}

.meta-list dd {
    margin: 0;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .lead-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .leads-table {
        table-layout: auto;
        min-width: 56rem;
    }
}

@media (max-width: 768px) {
    body:has(.app-nav-toggle:checked) {
        overflow: hidden;
    }

    .app-shell {
        flex-direction: column;
    }

    .app-topbar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 30;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        min-height: 3.5rem;
        padding: 0.65rem 1rem;
        padding-top: max(0.65rem, env(safe-area-inset-top));
        background: #0c1018;
        border-bottom: 1px solid var(--border);
    }

    .app-topbar__logo {
        font-size: 1.125rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        color: var(--text);
        text-decoration: none;
    }

    .app-topbar__menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        cursor: pointer;
        flex-shrink: 0;
    }

    .app-topbar__menu-icon,
    .app-topbar__menu-icon::before,
    .app-topbar__menu-icon::after {
        display: block;
        width: 1.125rem;
        height: 2px;
        background: var(--text);
        border-radius: 1px;
        position: relative;
        transition: transform 0.15s ease, opacity 0.15s ease;
    }

    .app-topbar__menu-icon::before,
    .app-topbar__menu-icon::after {
        content: '';
        position: absolute;
        left: 0;
    }

    .app-topbar__menu-icon::before {
        top: -6px;
    }

    .app-topbar__menu-icon::after {
        top: 6px;
    }

    .app-nav-toggle:checked ~ .app-topbar .app-topbar__menu-icon {
        background: transparent;
    }

    .app-nav-toggle:checked ~ .app-topbar .app-topbar__menu-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .app-nav-toggle:checked ~ .app-topbar .app-topbar__menu-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .app-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(0, 0, 0, 0.55);
    }

    .app-nav-toggle:checked ~ .app-nav-backdrop {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        width: min(18.5rem, 86vw);
        max-width: 100%;
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.25rem 0 1.5rem;
        padding-top: max(1.25rem, env(safe-area-inset-top));
        overflow-y: auto;
        transform: translateX(-110%);
        transition: transform 0.2s ease;
        box-shadow: var(--shadow);
    }

    .app-nav-toggle:checked ~ .sidebar {
        transform: translateX(0);
    }

    .sidebar__brand {
        padding: 0.25rem 1.1rem 0 1.25rem;
    }

    .sidebar__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        right: 0.75rem;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: var(--radius-sm);
        color: var(--text-muted);
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
    }

    .sidebar__close:hover {
        color: var(--text);
        background: rgba(255, 255, 255, 0.06);
    }

    .sidebar__nav {
        flex-direction: column;
        padding: 0 0.5rem;
    }

    .app-main {
        padding: 1.15rem 1rem 2rem;
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .page-header {
        margin-bottom: 1.25rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
        overflow-wrap: anywhere;
    }

    .card:not(.card--flush) {
        padding: 1.15rem 1rem;
    }

    .lead-flow__step,
    .lead-flow__callto,
    .lead-modal__panel {
        padding: 1.1rem 1rem 1rem;
    }

    .integration-panel,
    .integration-card {
        padding: 1.15rem 1rem;
    }

    .lead-tabs {
        width: 100%;
        margin-bottom: 1.15rem;
    }

    .lead-tabs__link {
        padding: 0.5rem 0.8rem;
        font-size: 0.875rem;
    }

    .lead-card-header__meta {
        overflow-wrap: anywhere;
    }

    .lead-card-header__badges {
        width: 100%;
    }

    .meta-list__row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 0.55rem 0;
    }

    .activity-feed__head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .activity-feed__date {
        white-space: normal;
    }

    .lead-flow__callto-top,
    .lead-direct__status-row,
    .integration-panel__head,
    .integration-card__head {
        flex-wrap: wrap;
    }

    .lead-flow__phone-item {
        flex-wrap: wrap;
    }

    .lead-modal {
        width: calc(100vw - 1.5rem);
        max-width: none;
    }

    .lead-modal__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .lead-modal__actions .btn-secondary,
    .lead-modal__actions .btn-primary,
    .lead-modal__actions button[type="submit"] {
        width: 100%;
    }

    .pagination {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pagination__controls {
        justify-content: space-between;
    }

    .leads-table {
        min-width: 0;
        table-layout: auto;
        font-size: 0.8125rem;
    }

    .leads-table thead {
        display: none;
    }

    .leads-table,
    .leads-table tbody {
        display: block;
        width: 100%;
    }

    .leads-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: start;
        column-gap: 0.45rem;
        row-gap: 0;
        width: 100%;
        padding: 0.5rem 0.85rem;
        border-bottom: 1px solid var(--border);
    }

    .leads-table tbody tr.leads-table__row--unread {
        background: rgba(91, 141, 239, 0.06);
    }

    .leads-table tbody tr:last-child {
        border-bottom: none;
    }

    .leads-table th,
    .leads-table td {
        display: none;
        padding: 0;
        border: none;
        width: auto;
        min-width: 0;
        max-width: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }

    .leads-table td::before {
        content: none;
    }

    .leads-table--list .leads-table__title,
    .leads-table--list .leads-table__score,
    .leads-table--list .leads-table__status,
    .leads-table--list .leads-table__offer {
        display: block;
    }

    .leads-table--list .leads-table__title {
        grid-column: 1;
        grid-row: 1;
        font-weight: 500;
    }

    .leads-table--list .leads-table__score {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        padding-top: 0.12rem;
    }

    .leads-table--list .leads-table__status {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        padding-top: 0.12rem;
    }

    .leads-table--list tr:not(:has(.leads-table__score)) .leads-table__status {
        grid-column: 2;
    }

    .leads-table--list .leads-table__offer {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        margin: 0;
        padding: 0.15rem 0 0;
        border: none;
        background: transparent;
        font-size: 0.6875rem;
        font-weight: 500;
        letter-spacing: 0;
    }

    .leads-table--list .leads-table__offer.leads-table__muted {
        display: none;
    }

    .leads-table--list .leads-table__sub {
        display: block;
        margin-top: 0.12rem;
        font-size: 0.75rem;
        font-weight: 400;
        color: var(--text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .leads-table--list .leads-table__meta {
        display: none;
    }

    .leads-table__title .leads-table__link {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .leads-table:not(.leads-table--list) td {
        display: inline;
        width: auto;
        padding: 0;
        white-space: nowrap;
    }

    .leads-table:not(.leads-table--list) tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0.2rem 0.55rem;
    }

    .leads-table:not(.leads-table--list) .leads-table__title {
        flex: 1 1 100%;
        order: -1;
        display: block;
        white-space: normal;
    }

    .leads-table__row--unread td:first-child {
        box-shadow: none;
    }

    .leads-table__row--unread {
        box-shadow: inset 3px 0 0 var(--accent);
    }

    .leads-table__row--unread td,
    .leads-table tbody tr.leads-table__row--unread:hover td {
        background: transparent;
    }

    .lead-card-header a,
    .lead-offer-box__url,
    code {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* —— Home landing —— */

.home {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 55% at 70% 20%, rgba(91, 141, 239, 0.16), transparent 55%),
        radial-gradient(ellipse 50% 40% at 15% 85%, rgba(45, 90, 140, 0.12), transparent 50%),
        linear-gradient(165deg, #0a0e16 0%, #080b10 45%, #06080c 100%);
    display: flex;
    flex-direction: column;
}

.home__atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.home__board {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(91, 141, 239, 0.06) 40%,
        rgba(0, 0, 0, 0.25) 100%
    );
    border-radius: 2px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    opacity: 0;
    will-change: transform, opacity;
    transform: rotate(var(--board-rot, 0deg));
    animation:
        home-board-fade 1s ease forwards,
        home-board-float 7s ease-in-out infinite;
}

.home__board--a {
    width: min(18vw, 9rem);
    height: min(42vh, 22rem);
    right: 12%;
    top: 18%;
    --board-rot: -4deg;
    animation-delay: 0.35s, 1.2s;
}

.home__board--b {
    width: min(14vw, 7rem);
    height: min(34vh, 17rem);
    right: 26%;
    top: 28%;
    --board-rot: 3deg;
    animation-delay: 0.5s, 1.5s;
}

.home__board--c {
    width: min(11vw, 5.5rem);
    height: min(26vh, 13rem);
    right: 6%;
    bottom: 14%;
    --board-rot: -7deg;
    animation-delay: 0.65s, 1.8s;
}

.home__top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
}

.home__brand {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    opacity: 0;
    animation: home-fade-up 0.7s ease 0.05s forwards;
}

.home__skip {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0;
    animation: home-fade-up 0.7s ease 0.15s forwards;
}

.home__skip:hover {
    color: var(--text);
}

.home__hero {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem clamp(1.5rem, 6vw, 5rem) 4rem;
    max-width: 42rem;
}

.home__brand-mark {
    margin: 0 0 1.25rem;
    font-size: clamp(2.75rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.95;
    color: var(--text);
    opacity: 0;
    animation: home-fade-up 0.85s ease 0.2s forwards;
}

.home__verse {
    margin: 0;
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: var(--text);
}

.home__line {
    display: block;
    opacity: 0;
    transform: translateY(0.6rem);
    animation: home-fade-up 0.75s ease forwards;
}

.home__line:nth-child(1) { animation-delay: 0.45s; }
.home__line:nth-child(2) { animation-delay: 0.6s; }
.home__line:nth-child(3) { animation-delay: 0.75s; }

.home__aside {
    margin: 1.5rem 0 0;
    max-width: 22rem;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
    opacity: 0;
    animation: home-fade-up 0.7s ease 0.95s forwards;
}

.home__cta {
    margin-top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
    opacity: 0;
    animation: home-fade-up 0.7s ease 1.1s forwards;
}

.home__btn {
    display: inline-block;
    text-decoration: none;
}

.home__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
}

.home__link:hover {
    color: var(--text);
}

@keyframes home-fade-up {
    from {
        opacity: 0;
        transform: translateY(0.65rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes home-board-fade {
    from {
        opacity: 0;
        filter: blur(4px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes home-board-float {
    0%,
    100% {
        transform: rotate(var(--board-rot, 0deg)) translateY(0);
    }
    50% {
        transform: rotate(var(--board-rot, 0deg)) translateY(-10px);
    }
}

@media (max-width: 720px) {
    .home__board--b,
    .home__board--c {
        display: none;
    }

    .home__board--a {
        right: 8%;
        top: 12%;
        width: 4.5rem;
        height: 12rem;
        opacity: 0.55;
    }

    .home__top {
        padding: 1.25rem;
    }

    .home__hero {
        padding-bottom: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home__brand,
    .home__skip,
    .home__brand-mark,
    .home__line,
    .home__aside,
    .home__cta,
    .home__board {
        animation: none;
        opacity: 1;
        transform: none;
        filter: none;
    }

    .sidebar,
    .app-topbar__menu-icon,
    .app-topbar__menu-icon::before,
    .app-topbar__menu-icon::after {
        transition: none;
    }
}

/* —— Auth (login / register) —— */

.auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(91, 141, 239, 0.1), transparent 55%),
        var(--bg-base);
}

.auth__brand {
    margin-bottom: 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

.auth__card {
    width: 100%;
    max-width: 24rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: var(--shadow);
}

.auth__title {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth__lead {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.auth__form .auth__submit,
.auth__form button[type="submit"] {
    width: 100%;
    margin-top: 0.25rem;
}

.auth__switch {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth__switch a {
    color: var(--accent-hover);
    text-decoration: none;
}

.auth__switch a:hover {
    text-decoration: underline;
}

.integration-grid {
    display: grid;
    gap: 1rem;
}

.integration-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow);
}

.integration-panel--placeholder {
    opacity: 0.85;
}

.integration-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.integration-panel__title {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
}

.integration-panel__desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.integration-panel__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.integration-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow);
}

.integration-card--placeholder {
    opacity: 0.72;
}

.integration-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.integration-card__title {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
}

.integration-card__desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.integration-card__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.integration-badge {
    flex-shrink: 0;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

.integration-badge--ok {
    color: var(--success-text);
    background: var(--success-bg);
    border-color: var(--success-border);
}

.integration-badge--error {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.28);
}

.integration-badge--muted {
    color: var(--text-faint);
}

.integration-meta {
    display: grid;
    gap: 0.65rem;
    margin: 0 0 1.1rem;
}

.integration-meta dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin-bottom: 0.15rem;
}

.integration-meta dd {
    margin: 0;
    font-size: 0.9375rem;
}

.integration-hint {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.integration-hint--warn {
    color: #fcd34d;
}

.integration-hint code {
    font-size: 0.8125rem;
    color: var(--text);
}

.integration-error {
    margin: 0.75rem 0 0;
    color: var(--danger);
    font-size: 0.875rem;
}

.lead-direct__status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.lead-direct__boards {
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.lead-direct__boards li {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-size: 0.875rem;
}
