/* =========================================================
   Автоконтроль, источники обращений и комментарии
   ========================================================= */

/* Источник обращения теперь отдельной колонкой, а не перед именем клиента */
.client-source-text-cell {
    color: #475569 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

/* Старые круглые бейджи источника внутри имени скрываем, если где-то остались */
.client-name-cell .client-source-badge,
.client-name-cell .source-badge,
.client-name-cell [class*="source"] {
    display: none !important;
}

/* Комментарии в админских разделах 2 и 3 — только иконкой */
.admin-clients-section th:nth-child(7),
.admin-clients-section td:nth-child(7),
.admin-measurements-section th:nth-child(8),
.admin-measurements-section td:nth-child(8) {
    text-align: center !important;
}

.calculation-comments-icon-cell .assigned-comments-btn,
.assigned-comments-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    min-width: 46px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 5px 9px !important;
    border-radius: 999px !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

/* Автоматический контроль: правильные видимые цифры */
.auto-control-finance-card strong,
.auto-control-mobile-counter strong,
.control-card strong,
#alertNoContact,
#alertHanging,
#alertMeasurements,
#alertWaitingLaunch {
    color: #111827 !important;
    background: transparent !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.auto-control-finance-card span,
.auto-control-mobile-counter span,
.control-card span,
.auto-control-finance-card small,
.auto-control-mobile-counter small,
.control-card small,
.auto-control-finance-card em,
.auto-control-mobile-counter em {
    color: #334155 !important;
    opacity: 1 !important;
}

.auto-control-mobile-counter.active,
.auto-control-finance-card.active {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37,99,235,.12) !important;
}

/* Автоконтроль: раскрытые списки ближе по виду ко 2-му разделу */
.auto-control-desktop-table {
    border: 1px solid #bbf7d0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

.auto-control-desktop-table table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.auto-control-desktop-table th {
    background: #f0fdf4 !important;
    color: #166534 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    padding: 9px 8px !important;
}

.auto-control-desktop-table td {
    padding: 9px 8px !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    border-bottom: 1px solid #eef2f7 !important;
}

.auto-control-desktop-table tr:nth-child(even) td {
    background: #f8fffa !important;
}

.auto-control-desktop-table .control-client-btn {
    width: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #111827 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    text-decoration: underline;
    text-decoration-color: #f59e0b;
    text-underline-offset: 3px;
}

/* Мобильная карточка автоконтроля */
.auto-control-mobile-client-card {
    border: 1px solid #bbf7d0 !important;
    border-left: 5px solid #16a34a !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 3px 12px rgba(15,23,42,.05) !important;
}

@media (max-width: 950px) {
    .client-source-text-cell {
        font-size: 13px !important;
    }
}
