/* ==============================
   UNIVERSAL MODULE TABLE STYLE
   ============================== */

/* Контейнер таблицы */
.module-table-container {
    width: 100%;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.module-table-container::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Основная таблица */
.module-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-family: 'Inter', Arial, sans-serif;
    box-sizing: border-box;
}

/* Заголовки */
.module-table thead th {
    background-color: #384173;
    color: #f5f5f5;
    font-weight: 600;
    padding: 10px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 4px solid #210d45;
    white-space: nowrap;
}

/* Ряды */
.module-table tbody tr {
    background-color: #1f2937;
    color: #e4e4e7;
    transition: background 0.3s, transform 0.2s;
    cursor: pointer;
}

/* Hover эффект */
.module-table tbody tr:hover {
    background-color: #2d435f;
    transform: scale(1.02);
}

/* Выбранная строка */
.module-table tbody tr.selected {
    background-color: #275a8c;
    color: #fff;
}

/* Ячейки */
.module-table td {
    padding: 12px 10px;
    text-align: center;
    user-select: none;
}

/* Чекбоксы */
.module-table input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.module-table input[type="checkbox"]:checked {
    background-color: #275a8c;
    border-color: #275a8c;
}

.module-table input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    top: 0;
    left: 3px;
    font-size: 18px;
    color: white;
}

/* Кнопка "Выбрать всё" */
.btn-toggle-select {
    margin-left: 5px;
    font-size: 11px;
    padding: 10px 0px;
    cursor: pointer;
    border: none;
    border-bottom: 4px solid #2d135d;
    border-radius: 8px;
    background-color: #54609c;
    color: #f5f5f5;
    transition: all 0.25s ease;
    width: 110px;
}

.btn-toggle-select:hover {
    background-color: #5763a3;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgb(82 115 171);
}

.btn-toggle-select:active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.btn-toggle-select {
    position: relative;
    display: inline-block;
    font-size: 11px;
    padding: 10px 8px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.4s ease;
    color: #fff;
    background: linear-gradient(135deg, #54609c, #4d578e);
    border-bottom: 4px solid #2d135d;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 120px;
}

/* Псевдо-анимация свечения */
.btn-toggle-select::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.14);
    transform: rotate(45deg) scale(0);
    transition: all 0.5s ease;
    pointer-events: none;
}

.btn-toggle-select:hover::before {
    transform: rotate(45deg) scale(1);
}

/* Hover-анимация самой кнопки */
.btn-toggle-select:hover {
    background: linear-gradient(135deg, #5763a3, #4f5daa);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(82,115,171,0.6);
}

/* При клике */
.btn-toggle-select:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}



/* Панель действий */
.module-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.module-actions button,
.module-actions select {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
}

/* Скругления углов */
.first-column {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}
.end-column {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}


/*
==========================================================================================================================================
==========================================================================================================================================
==========================================================================================================================================
*/


/* === БЛОК КНОПОК К ТАБЛИЦАМ === */
/* === Базовый стиль кнопки === */
.tc-btn {
    position: relative;
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.5s ease;
    font-size: 14px;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* === Псевдо-анимация свечения === */
.tc-btn::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.14);
    transform: rotate(45deg) scale(0);
    transition: all 0.5s ease;
    pointer-events: none;
}

/* Эффект при наведении */
.tc-btn:hover::before {
    transform: rotate(45deg) scale(1);
}

/* Эффект при наведении для самой кнопки */
.tc-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}

/* Эффект при нажатии */
.tc-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* === Варианты кнопок === */
.tc-btn-primary {
    background: linear-gradient(135deg, #4b5ac5, #6c5ab5);
    border-bottom: 4px solid #2c1e66;
}
.tc-btn-primary:hover {
    background: linear-gradient(135deg, #6574e3, #7d6fd0);
}

.tc-btn-success {
    background: linear-gradient(135deg, #16a34a, #10b981);
    border-bottom: 4px solid #065f46;
}
.tc-btn-success:hover {
    background: linear-gradient(135deg, #22c55e, #34d399);
}

.tc-btn-danger {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    border-bottom: 4px solid #7f1d1d;
}
.tc-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #f87171);
}

.tc-btn-secondary {
    background: linear-gradient(135deg, #3b3b5e, #4f46e5);
    border-bottom: 4px solid #1e1b4b;
}
.tc-btn-secondary:hover {
    background: linear-gradient(135deg, #5b5bb8, #6366f1);
}

/* === Универсальный select для таблиц и действий === */


/* === Плавное появление панели === */
@keyframes fadeInTableControls {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.tc-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1c1c2c, #222241);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(74,63,143,0.4);
    animation: fadeInTableControls 0.8s ease;
    flex-wrap: wrap;
    gap: 10px;
}

/* Левый и правый блок */
.tc-panel-left,
.tc-panel-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}



/* ================== Select ================== */

/* Контейнер кастомного select */
.tc-select-wrapper {
    position: relative;
    display: inline-block;
    width: 220px;
    font-family: 'Segoe UI', sans-serif;
}

/* Скрываем стандартный select */
.tc-select-wrapper select {
    display: none;
}

/* Видимый блок */
.tc-select-display {
    background: #2a2a48;
    color: #cbd5e1;
    padding: 10px 16px;
    border: 2px solid #3f3f6b;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tc-select-display:hover {
    border-color: #6c5ab5;
    box-shadow: 0 0 10px rgba(108,90,181,0.5);
    transform: translateY(-1px);
}

/* Стрелка */
.tc-select-display::after {
    content: '▾';
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* Выпадающий список */
.tc-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #2c2c44;
    border: 2px solid #3f3f6b;
    border-radius: 8px;
    margin-top: 5px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    z-index: 10;
}

/* Опции */
.tc-select-options div {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.tc-select-options div:hover {
    background: #3a3a5e;
    transform: translateX(5px);
    color: #fff;
}

/* Активное открытие */
.tc-select-wrapper.open .tc-select-options {
    max-height: 300px;
    opacity: 1;
}

.tc-select-wrapper.open .tc-select-display::after {
    transform: rotate(-180deg);
}



