/* Стили для таблицы плагина */
.crm-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Общие стили ячеек */
.crm-table th, .crm-table td {
    border: 2px solid #ddd;
    padding: 12px;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* Заголовки */
.crm-table th {
    background-color: #0073aa;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

/* Чередование цветов строк */
.crm-table tr:nth-child(even) {
    background-color: #f1f1f1;
}

.crm-table tr:hover {
    background-color: #e0e0e0;
}

/* Растягиваем ячейку "Последующий статус" */
.crm-table td:nth-child(7), .crm-table th:nth-child(7) {
    width: 100px; /* Автоматическая ширина */
    min-width: 100px;
    max-width: 600px; /* Можно увеличить, если текст все равно не влезает */
}

/* Колонка ID "Дата обновления статуса" */
.crm-table td:nth-child(9), .crm-table th:nth-child(9) {
    width: 50px;
    min-width: 50px;
    max-width: 600px;
    text-align: center;
}

/* Растягиваем ячейку "Последующий статус" */
.crm-table td:nth-child(8), .crm-table th:nth-child(8) {
    width: 250px; /* Автоматическая ширина */
    min-width: 250px;
    max-width: 600px; /* Можно увеличить, если текст все равно не влезает */
	word-wrap: break-word; /* Для старых браузеров */
    overflow-wrap: break-word; /* Современный вариант */
    white-space: normal; /* Позволяет переносить текст на новую строку */
}

/* Колонка ID (чтобы не занимала много места) */
.crm-table td:nth-child(1), .crm-table th:nth-child(1) {
    width: 40px;
    min-width: 40px;
    max-width: 100px;
    text-align: center;
}

/* Колонка ID (чтобы не занимала много места) */
.crm-table td:nth-child(2), .crm-table th:nth-child(2) {
    width: 50px;
    min-width: 50px;
    max-width: 100px;
    text-align: center;
}

/* Колонка ID (чтобы не занимала много места) */
.crm-table td:nth-child(6), .crm-table th:nth-child(6) {
    width: 100px;
    min-width: 150px;
    max-width: 200px;
    text-align: center;
}

/* Колонка "Действие" (где кнопки) */
.crm-table td:nth-child(11), .crm-table th:nth-child(11) {
    width: 140px;
    min-width: 140px;
    max-width: 300px;
    text-align: center;
}

/* Кнопки */
.crm-table input[type="submit"] {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
}

.crm-table input[type="submit"]:hover {
    background-color: #218838;
}
