/* === Leadflow — основные стили ===
   Без внешних CSS-фреймворков (PD-6).
   Тёмная палитра с акцентом синий/зелёный — деловой, спокойный интерфейс.
*/

:root {
    /* Палитра */
    --color-bg: #f5f6f8;
    --color-surface: #ffffff;
    --color-surface-alt: #f0f2f5;
    --color-border: #d8dde3;
    --color-text: #1a2332;
    --color-text-muted: #5a6478;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #dbeafe;
    --color-success: #16a34a;
    --color-warning: #d97706;
    --color-danger: #dc2626;
    --color-info: #0891b2;

    /* Типографика */
    --font-sans: "Inter", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

    /* Размерности */
    --radius: 6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === Шапка === */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.app-header__brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.brand-link {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.brand-version {
    font-size: 11px;
    color: var(--color-text-muted);
}

.app-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 14px;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.nav-link:hover {
    background: var(--color-surface-alt);
    color: var(--color-text);
    text-decoration: none;
}

.app-header__user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.user-name {
    font-weight: 600;
}

.user-role {
    padding: 2px 8px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.user-profile-link {
    color: var(--color-text-muted);
}

.logout-form {
    display: inline;
}

.btn-logout {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text-muted);
    font-size: 13px;
    cursor: pointer;
}

.btn-logout:hover {
    background: var(--color-surface-alt);
    color: var(--color-danger);
    border-color: var(--color-danger);
}

/* === Основной контент === */
.app-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - 56px - 40px);
}

.app-footer {
    padding: 12px 24px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* === Карточки === */
.module-card,
.status-card,
.admin-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

/* === Логин === */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 40px 20px;
}

.login-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
}

.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--color-text-muted);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.form-field input {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: border-color 0.15s;
}

.form-field input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-hint {
    font-size: 12px;
    color: var(--color-text-muted);
}

.btn-primary {
    padding: 10px 16px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    text-align: center;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    text-decoration: none;
    color: white;
}

.btn-secondary {
    padding: 10px 16px;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--color-surface-alt);
    text-decoration: none;
}

.login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
}

.login-footer p {
    margin-bottom: 4px;
}

/* === Уведомления === */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-info {
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    color: #155e75;
}

/* === Дашборд === */
.dashboard-greeting {
    margin-bottom: 24px;
}

.dashboard-greeting h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.status-card__label {
    font-size: 12px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.status-card__value {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.status-card__detail {
    font-size: 12px;
    color: var(--color-text-muted);
}

.status-ok { color: var(--color-success); }
.status-warn { color: var(--color-warning); }
.status-error { color: var(--color-danger); }
.status-unknown { color: var(--color-text-muted); font-size: 16px; }

.dashboard-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.module-card h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

.module-placeholder {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.funnel-preview {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.funnel-preview .counter {
    float: right;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* === Администрирование === */
.admin-modules h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.admin-card {
    display: block;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    transition: all 0.15s;
}

.admin-card:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    text-decoration: none;
}

.admin-card h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.admin-card p {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* === Профиль === */
.profile-container,
.password-change-container {
    max-width: 640px;
    margin: 0 auto;
}

.profile-container h1,
.password-change-container h1 {
    font-size: 22px;
    margin-bottom: 24px;
}

.profile-info {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.info-value {
    color: var(--color-text);
    font-weight: 600;
}

.profile-actions {
    display: flex;
    gap: 12px;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.password-policy {
    background: var(--color-surface-alt);
    border-radius: var(--radius);
    padding: 16px;
}

.password-policy h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.password-policy ul {
    list-style: disc inside;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* === Ошибка === */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.error-card {
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.error-code {
    font-size: 64px;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.error-message {
    font-size: 16px;
    margin-bottom: 16px;
}

.error-hint {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
        gap: 8px;
    }

    .app-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .app-main {
        padding: 16px;
    }

    .status-bar {
        grid-template-columns: 1fr;
    }
}

/* === S-09 Конвейер === */
.pipeline-container,
.health-container {
    max-width: 1280px;
    margin: 0 auto;
}

.pipeline-container h1,
.health-container h1 {
    font-size: 22px;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.wave-stats {
    margin-bottom: 32px;
}

.wave-stats h2,
.regions-section h2,
.runs-section h2,
.last-run-section h2,
.alerts-section h2,
.today-runs-section h2,
.services-section h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

.wave-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.wave-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
}

.wave-card__title {
    font-size: 12px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.wave-card__value {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 2px;
}

.wave-card__hint {
    font-size: 12px;
    color: var(--color-text-muted);
}

.section-hint {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.section-hint code {
    background: var(--color-surface-alt);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.regions-section,
.runs-section,
.last-run-section,
.today-runs-section,
.services-section {
    margin-bottom: 32px;
}

.regions-table,
.runs-table {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    border-collapse: collapse;
    font-size: 13px;
}

.regions-table thead,
.runs-table thead {
    background: var(--color-surface-alt);
}

.regions-table th,
.regions-table td,
.runs-table th,
.runs-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.regions-table th,
.runs-table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.regions-table tbody tr:hover,
.runs-table tbody tr:hover {
    background: var(--color-surface-alt);
}

.regions-table code,
.runs-table code {
    background: var(--color-surface-alt);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* === Switch toggle === */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-border);
    border-radius: 20px;
    transition: 0.2s;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
}

.switch input:checked + .switch-slider {
    background-color: var(--color-success);
}

.switch input:checked + .switch-slider:before {
    transform: translateX(16px);
}

/* === Маленькие кнопки === */
.btn-small {
    padding: 4px 10px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}

.btn-small:hover {
    background: var(--color-primary-hover);
}

.btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === Empty state === */
.empty-state {
    padding: 24px;
    text-align: center;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
}

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

/* === S-11 Здоровье === */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.run-detail {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.run-detail__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}

.run-detail__row:last-child {
    border-bottom: none;
}

.run-detail__label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.run-detail__value {
    font-weight: 600;
}

.alerts-section {
    margin-bottom: 32px;
}

.alerts-section .alert {
    margin-top: 12px;
}

.alerts-section ul {
    margin-top: 8px;
    padding-left: 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.service-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
}

.service-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.service-card p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.service-card code {
    display: block;
    background: var(--color-surface-alt);
    padding: 8px;
    border-radius: var(--radius);
    font-size: 12px;
    word-break: break-all;
}

.service-card ul {
    padding-left: 18px;
    font-size: 13px;
}

.service-card li {
    margin-bottom: 4px;
}

/* === S-04 Реестр лидов === */
.funnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.funnel-card {
    display: block;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    color: var(--color-text);
    transition: all 0.15s;
}

.funnel-card:hover {
    border-color: var(--color-primary);
    text-decoration: none;
}

.funnel-card__status {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.funnel-card__count {
    font-size: 24px;
    font-weight: 700;
}

.funnel-new .funnel-card__count { color: #3b82f6; }
.funnel-checking .funnel-card__count { color: #f59e0b; }
.funnel-qualified .funnel-card__count { color: #10b981; }
.funnel-outreach .funnel-card__count { color: #8b5cf6; }
.funnel-dialogue .funnel-card__count { color: #06b6d4; }
.funnel-client .funnel-card__count { color: #16a34a; }
.funnel-rejected .funnel-card__count { color: var(--color-danger); }

.filters-form {
    display: flex;
    gap: 12px;
    align-items: end;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filters-form .form-field {
    flex: 1;
    min-width: 140px;
}

.leads-table {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    border-collapse: collapse;
    font-size: 13px;
}

.leads-table th, .leads-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.leads-table th {
    background: var(--color-surface-alt);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.status-badge, .role-badge, .channel-badge, .signal-badge,
.verification-badge, .result-badge, .task-status-badge, .task-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.status-new { background: #dbeafe; color: #1e40af; }
.status-checking { background: #fef3c7; color: #92400e; }
.status-qualified { background: #d1fae5; color: #065f46; }
.status-outreach { background: #ede9fe; color: #5b21b6; }
.status-dialogue { background: #cffafe; color: #155e75; }
.status-client { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-active { background: #dcfce7; color: #166534; }
.status-blocked { background: #fee2e2; color: #991b1b; }

.role-superuser { background: #fef3c7; color: #92400e; }
.role-operator { background: #dbeafe; color: #1e40af; }
.role-observer { background: #f1f5f9; color: #475569; }

.score-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 3px;
    font-weight: 700;
}

.score-badge-large {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
}

/* === S-05 Карточка лида === */
.lead-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 24px;
}

.lead-actions {
    display: flex;
    gap: 10px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px;
}

.summary-card__label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.summary-card__value {
    font-size: 16px;
    font-weight: 600;
}

.lead-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.tab-button.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.card h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

.breakdown-table, .signals-table, .contacts-table,
.interactions-table, .tasks-table, .users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.breakdown-table th, .breakdown-table td,
.signals-table th, .signals-table td,
.contacts-table th, .contacts-table td,
.interactions-table th, .interactions-table td,
.tasks-table th, .tasks-table td,
.users-table th, .users-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.breakdown-table th, .signals-table th, .contacts-table th,
.interactions-table th, .tasks-table th, .users-table th {
    background: var(--color-surface-alt);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.domain-buttons {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.signal-S1, .signal-S2, .signal-S3, .signal-S4,
.signal-S5, .signal-S6, .signal-S8 {
    background: #dbeafe;
    color: #1e40af;
}

.signal-S7 {
    background: #f1f5f9;
    color: #94a3b8;
}

.channel-email { background: #dbeafe; color: #1e40af; }
.channel-phone { background: #d1fae5; color: #065f46; }
.channel-max, .channel-whatsapp, .channel-telegram, .channel-tenchat {
    background: #ede9fe; color: #5b21b6;
}

.verification-fit { background: #d1fae5; color: #065f46; }
.verification-needs_check { background: #fef3c7; color: #92400e; }
.verification-rejected { background: #fee2e2; color: #991b1b; }

.result-reply { background: #d1fae5; color: #065f46; }
.result-delivered { background: #dbeafe; color: #1e40af; }
.result-no_answer { background: #fef3c7; color: #92400e; }
.result-refusal { background: #fee2e2; color: #991b1b; }
.result-wrong_contact { background: #f1f5f9; color: #64748b; }

/* === S-06 Канбан === */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    min-height: 500px;
}

.kanban-column {
    background: var(--color-surface-alt);
    border-radius: var(--radius);
    padding: 10px;
    min-height: 400px;
}

.kanban-column__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}

.kanban-column__header h2 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.kanban-column__count {
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.kanban-column__cards {
    min-height: 100px;
}

.kanban-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 8px;
    cursor: move;
    transition: all 0.15s;
}

.kanban-card:hover {
    border-color: var(--color-primary);
}

.kanban-card.dragging {
    opacity: 0.5;
}

.kanban-card__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.kanban-card__id {
    font-size: 12px;
    color: var(--color-text-muted);
}

.kanban-card__score {
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 12px;
}

.dnd-badge {
    color: var(--color-danger);
}

/* === Modal === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--color-surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    min-width: 400px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: end;
}

/* === S-08 Пользователи === */
.user-form {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.result-area {
    margin-bottom: 16px;
}

.one-time-password {
    font-family: var(--font-mono);
    font-size: 20px;
    padding: 12px;
    background: var(--color-surface-alt);
    border: 2px dashed var(--color-primary);
    border-radius: var(--radius);
    text-align: center;
    margin: 8px 0;
    letter-spacing: 2px;
}

.user-blocked {
    opacity: 0.6;
}

.user-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.warning {
    color: var(--color-warning);
    font-weight: 600;
}

.overdue {
    color: var(--color-danger);
    font-size: 11px;
    margin-left: 4px;
}

/* === Канбан: название компании в карточке === */
.kanban-card__company {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    color: #111827;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kanban-card__inn {
    font-size: 11px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 1px 4px;
    border-radius: 3px;
}

/* === Канбан: визуальный отклик при drag-and-drop === */
.kanban-column--drag-over {
    background: #eff6ff !important;
    border: 2px dashed #3b82f6 !important;
    border-radius: 8px;
    transform: scale(1.01);
    transition: all 0.1s ease;
}
.kanban-card.dragging {
    opacity: 0.4;
    transform: rotate(2deg) scale(0.98);
    cursor: grabbing;
}
.kanban-card {
    cursor: grab;
}
.kanban-card:active {
    cursor: grabbing;
}
/* Скролл внутри колонки, если карточек много */
.kanban-column__cards {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
}
.kanban-column__cards::-webkit-scrollbar {
    width: 6px;
}
.kanban-column__cards::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.kanban-column__cards::-webkit-scrollbar-track {
    background: #f1f5f9;
}

/* === Карточка лида: параметры сигнала === */
.signal-params {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 13px;
    line-height: 1.5;
}
.signal-params .param {
    display: inline-block;
    color: #374151;
}
.signal-params .param strong {
    color: #111827;
    font-weight: 600;
}
.signal-params .badge {
    display: inline-block;
    padding: 1px 8px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.signal-params-raw {
    font-size: 11px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    word-break: break-all;
}
