/* 1. ОБЫЧНЫЕ СТРОКИ: фиксируем только по горизонтали */
.table-responsive table tbody tr td:last-child {
    position: sticky !important;
    right: 0 !important;
    --tw-bg-opacity: 1;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity)) !important;  
    z-index: 10; /* Базовый слой над остальным текстом */
    box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.08); /* Тень слева */
}

/* Темная тема для строк */
.dark .table-responsive table tbody tr td:last-child {
    background-color: rgba(var(--dark-600),var(--tw-bg-opacity)) !important;
}


/* 2. ЗАГОЛОВОК: фиксируем и по горизонтали, и по вертикали */
.table-responsive table thead tr th:last-child {
    position: sticky !important;
    right: 0 !important;
    top: 0 !important; /* Не дает заголовку уезжать вверх при скролле вниз */
    
    /* Самый высокий z-index: перекрывает и обычную шапку, и скроллящиеся строки */
    z-index: 30 !important; 
    
    /* Заливка в цвет стандартной шапки MoonShine v2 (цвет контента/полей) */
    --tw-bg-opacity: 1;
    background-color: rgb(248 250 252 / var(--tw-bg-opacity)) !important; 
    /*border-bottom: 1px solid rgb(var(--border, 226 232 240)) !important;*/
}

/* Темная тема для заголовка */
.dark .table-responsive table thead tr th:last-child {
    --tw-bg-opacity: 1;
    background-color: rgba(var(--dark-700),var(--tw-bg-opacity)) !important;
    /*border-bottom: 1px solid rgb(var(--dark-border, 45 55 72)) !important;*/
}
