/* =========================================================
   2-й раздел: максимально узкие последние 5 столбцов
   Раздел: "Деньги в просчетах и работе"
   ========================================================= */

@media (min-width: 951px) {
    .calculation-money-section table {
        width: 100% !important;
        min-width: 1180px !important;
        table-layout: fixed !important;
    }

    /* Основные колонки */
    .calculation-money-section th:nth-child(1),
    .calculation-money-section td:nth-child(1) {
        width: 380px !important;
        max-width: 380px !important;
    }

    .calculation-money-section th:nth-child(2),
    .calculation-money-section td:nth-child(2) {
        width: 105px !important;
        max-width: 105px !important;
    }

    .calculation-money-section th:nth-child(3),
    .calculation-money-section td:nth-child(3) {
        width: 78px !important;
        max-width: 78px !important;
    }

    .calculation-money-section th:nth-child(4),
    .calculation-money-section td:nth-child(4) {
        width: 125px !important;
        max-width: 125px !important;
        white-space: nowrap !important;
    }

    .calculation-money-section th:nth-child(5),
    .calculation-money-section td:nth-child(5) {
        width: 140px !important;
        max-width: 140px !important;
    }

    .calculation-money-section th:nth-child(6),
    .calculation-money-section td:nth-child(6) {
        width: 125px !important;
        max-width: 125px !important;
    }

    .calculation-money-section th:nth-child(7),
    .calculation-money-section td:nth-child(7) {
        width: 120px !important;
        max-width: 120px !important;
    }

    /* Последние 5 столбцов — максимально узко */
    .calculation-money-section th:nth-child(8),
    .calculation-money-section td:nth-child(8) {
        width: 46px !important;
        max-width: 46px !important;
        text-align: center !important;
    }

    .calculation-money-section th:nth-child(9),
    .calculation-money-section td:nth-child(9) {
        width: 52px !important;
        max-width: 52px !important;
        text-align: center !important;
    }

    .calculation-money-section th:nth-child(10),
    .calculation-money-section td:nth-child(10) {
        width: 38px !important;
        max-width: 38px !important;
        text-align: center !important;
    }

    .calculation-money-section th:nth-child(11),
    .calculation-money-section td:nth-child(11) {
        width: 82px !important;
        max-width: 82px !important;
        text-align: center !important;
    }

    .calculation-money-section th:nth-child(12),
    .calculation-money-section td:nth-child(12) {
        width: 38px !important;
        max-width: 38px !important;
        text-align: center !important;
    }

    .calculation-money-section th:nth-child(n+8),
    .calculation-money-section td:nth-child(n+8) {
        padding-left: 3px !important;
        padding-right: 3px !important;
        overflow: visible !important;
        white-space: nowrap !important;
    }

    .calculation-money-section th:nth-child(n+8) {
        font-size: 10px !important;
        line-height: 1.05 !important;
        white-space: normal !important;
    }

    /* Источник — обычный текст без огромной плашки */
    .calculation-money-section .client-source-text-cell {
        padding: 4px 5px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        color: #475569 !important;
        font-size: 11px !important;
        line-height: 1.12 !important;
        font-weight: 800 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .calculation-money-section .client-name-cell > span {
        max-width: 310px !important;
        font-size: 15px !important;
        line-height: 1.15 !important;
    }

    /* Комментарий — компактная иконка */
    .calculation-money-section .calculation-comments-icon-cell .assigned-comments-btn,
    .calculation-money-section td:nth-child(9) .assigned-comments-btn {
        min-width: 36px !important;
        width: 36px !important;
        height: 30px !important;
        min-height: 30px !important;
        padding: 3px 5px !important;
        border-radius: 999px !important;
        font-size: 12px !important;
        margin: 0 auto !important;
    }

    /* Редактировать и удалить — иконки */
    .calculation-money-section td:nth-child(10) button,
    .calculation-money-section td:nth-child(12) button {
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        padding: 0 !important;
        border-radius: 9px !important;
        margin: 0 auto !important;
    }

    /* В продажу — узкая кнопка */
    .calculation-money-section td:nth-child(11) button,
    .calculation-money-section .btn-transfer-deal,
    .calculation-money-section .btn-sale-plan,
    .calculation-money-section .transfer-narrow-btn {
        min-width: 68px !important;
        max-width: 76px !important;
        min-height: 30px !important;
        height: auto !important;
        padding: 5px 5px !important;
        border-radius: 9px !important;
        font-size: 10px !important;
        line-height: 1.05 !important;
        white-space: normal !important;
        margin: 0 auto !important;
    }

    .calculation-money-section .idle-badge {
        min-width: 28px !important;
        padding: 4px 6px !important;
        font-size: 12px !important;
    }
}
