.sort-header {
    cursor: pointer;
    user-select: none;
}
.sort-header:hover {
    background-color: rgba(0,0,0,0.02);
    color: #000;
}
.hover-lift {
    transition: transform 0.2s;
}
.hover-lift:hover {
    transform: translateY(-3px);
}

/* Zapobieganie zawijaniu tekstu w całej tabeli */
#productsTable td, #productsTable th {
    white-space: nowrap;
}

/* ==========================================
   SEARCH BOX (naprawa "rozjechania" układu)
   ========================================== */
.disc-table-search{
    width: 100%;
    max-width: 340px; /* możesz dać 300/360 wg uznania */
}

.disc-table-search .input-group-text,
.disc-table-search .form-control{
    height: 44px;
    line-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
}

.disc-table-search .input-group-text{
    border-right: 0;
}

.disc-table-search .form-control{
    border-left: 0;
}

/* Na bardzo małych ekranach daj pełną szerokość */
@media (max-width: 575.98px){
    .disc-table-search{
        max-width: 100%;
    }
}

/* --- OPTYMALIZACJA MOBILNA TABELI --- */
@media (max-width: 575.98px) {
    /* Pozwól na zawijanie tylko tam, gdzie nie ma klasy .text-nowrap */
    #productsTable td:not(.text-nowrap), 
    #productsTable th:not(.text-nowrap) {
        white-space: normal !important; 
        font-size: 0.85rem;
    }

 #productsTable .btn-primary {
        width: auto !important;
        min-width: auto !important;    /* Resetujemy sztywną szerokość */
        height: auto !important;       /* Resetujemy sztywną wysokość */
        padding: 6px 12px !important;  /* Dodajemy normalne odstępy w środku */
        border-radius: 6px !important; /* Standardowe, lekkie zaokrąglenie rogów */
        /* Opcjonalnie: jeśli chcesz idealny kwadrat, ustaw border-radius: 0 */
    }
}

/* Styl dla zablokowanej kolumny na urządzeniach mobilnych */
@media (max-width: 767.98px) {
    .sticky-col {
        position: sticky;
        left: 0;
        z-index: 5;
        background-color: #fff !important;
        border-right: 2px solid #dee2e6;
    }

    /* Nagłówek musi mieć wyższy z-index niż komórki body */
    th.sticky-col {
        z-index: 6;
        background-color: #f8f9fa !important;
    }

    /* Ukrywanie cienia pod zablokowaną kolumną, aby wyglądała estetycznie */
    .sticky-col::after {
        content: '';
        position: absolute;
        top: 0;
        right: -5px;
        bottom: 0;
        width: 5px;
        pointer-events: none;
        background: linear-gradient(to right, rgba(0,0,0,0.05), rgba(0,0,0,0));
    }
}

#productsTable .btn-primary {
    width: auto !important;       /* Pozwól mu rosnąć */
    min-width: 120px;             /* Ale nie mniej niż tyle */
    padding-left: 20px !important; /* Oddech po bokach */
    padding-right: 20px !important;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
    white-space: nowrap;
}

/* Opcjonalnie: na bardzo małych ekranach mogą być nieco węższe */
@media (max-width: 480px) {
    #productsTable .btn-primary {
        width: 160px;
        font-size: 0.85rem;
    }
}
.table-topic-card .text-primary {
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: rgba(13,110,253,0.12);

    display: flex;
    align-items: center;
    justify-content: center;
}

.table-topic-card i {
    font-size: 32px;
}
.errors-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(13,110,253,.15), rgba(13,110,253,.05));
    color: #0d6efd;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.errors-icon i {
    font-size: 22px;
}

