/**
 * task_slider.css
 * Боковая выезжающая панель задач в стиле Bitrix24 (SidePanel Slider)
 * Поддержка 100% точной копии detail.html, edit.html, create.html
 * Полная поддержка Светлой и Тёмной темы через CSS-переменные
 */

:root {
    --b24-slider-z-index: 1060;
    --b24-slider-topbar-h: 56px;
    --b24-slider-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   1. ОВЕРЛЕЙ И БАЗОВАЯ ПАНЕЛЬ СЛАЙДЕРА
   ========================================================================== */

.b24-slider-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--b24-slider-z-index);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s var(--b24-slider-ease), visibility 0.28s;
    user-select: none;
}

[data-theme="dark"] .b24-slider-overlay {
    background: rgba(3, 7, 18, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.b24-slider-overlay.is-open {
    opacity: 1;
    visibility: visible;
    user-select: auto;
}

.b24-slider-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: 90vw;
    max-width: 1440px;
    min-width: 320px;
    background: var(--surface-bg, #f8fafc);
    color: var(--surface-text, #0f172a);
    box-shadow: -14px 0 40px rgba(15, 23, 42, 0.18), -2px 0 8px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.32s var(--b24-slider-ease), width 0.28s ease, max-width 0.28s ease, left 0.28s ease;
    border-left: 1px solid var(--surface-border, #e2e8f0);
}

[data-theme="dark"] .b24-slider-panel {
    background: var(--surface-bg, #0b0f17);
    color: var(--surface-text, #f1f5f9);
    border-left-color: var(--surface-border, #1e293b);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6), -4px 0 16px rgba(0, 0, 0, 0.4);
}

.b24-slider-overlay.is-open .b24-slider-panel {
    transform: translateX(0);
}

/* Полноэкранный режим модального окна задач */
.b24-slider-overlay.is-fullscreen .b24-slider-panel,
.b24-slider-panel.is-fullscreen {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    border-left: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.b24-slider-overlay.is-fullscreen .b24-slider-topbar {
    padding-left: 24px;
    padding-right: 24px;
}

.b24-slider-overlay.is-fullscreen .b24-slider-content-inner .task-detail-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 32px;
}

@media (max-width: 1399px) {
    .b24-slider-panel {
        width: 94vw;
    }
}

@media (max-width: 991px) {
    .b24-slider-panel {
        width: 97vw;
    }
}

@media (max-width: 767px) {
    .b24-slider-panel {
        width: 100vw;
        border-left: none;
    }
}

/* ==========================================================================
   2. ВЕРХНЯЯ ЛИПКАЯ ПАНЕЛЬ УПРАВЛЕНИЯ (B24 TOPBAR)
   ========================================================================== */

.b24-slider-topbar {
    height: var(--b24-slider-topbar-h);
    min-height: var(--b24-slider-topbar-h);
    background: var(--surface-card, #ffffff);
    border-bottom: 1px solid var(--surface-border, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    gap: 12px;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .b24-slider-topbar {
    background: var(--surface-card, #141b26);
    border-bottom-color: var(--surface-border, #1e293b);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.b24-slider-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.b24-slider-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Кнопка закрытия */
.b24-slider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--surface-text-muted, #64748b);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}

.b24-slider-btn:hover {
    background: var(--surface-hover, #f1f5f9);
    color: var(--surface-text, #0f172a);
}

[data-theme="dark"] .b24-slider-btn:hover {
    background: var(--surface-hover, #1e293b);
    color: var(--surface-text, #f1f5f9);
}

.b24-slider-close-btn {
    background: var(--surface-sunken, #f1f5f9);
    color: var(--surface-text, #1e293b);
    font-weight: 600;
    padding: 6px 12px;
}

[data-theme="dark"] .b24-slider-close-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

.b24-slider-close-btn:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.b24-slider-close-btn .b24-slider-kbd {
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-family: inherit;
    margin-left: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .b24-slider-close-btn .b24-slider-kbd {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.b24-slider-icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* Хлебные крошки и заголовок */
.b24-slider-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.b24-crumb-root {
    color: var(--surface-text-muted, #64748b);
    font-weight: 500;
}

.b24-crumb-sep {
    color: var(--surface-border, #cbd5e1);
    font-size: 0.8rem;
}

.b24-crumb-current {
    color: var(--surface-text, #0f172a);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Контекстные кнопки действий */
.b24-slider-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* Скрываем дублирующий внутренний блок кнопок внутри карточки слайдера */
.b24-slider-body .task-top-action-bar {
    display: none !important;
}

/* Современные капсульные (pill) кнопки в верхней панели слайдера */
.b24-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 16px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 9999px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.b24-btn-action:hover {
    transform: translateY(-1.5px);
}

.b24-btn-action:active {
    transform: translateY(0);
}

.b24-btn-action i {
    font-size: 0.85rem;
}

/* 1. Действие: Начать / Запустить / Принять (Изумрудный градиент) */
.b24-btn-action-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.b24-btn-action-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
    color: #ffffff !important;
}

/* 2. Действие: Пауза (Янтарный теплый градиент) */
.b24-btn-action-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.b24-btn-action-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
    color: #ffffff !important;
}

/* 3. Действие: Завершить / На проверку (Индиго-фиолетовый градиент) */
.b24-btn-action-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.b24-btn-action-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
    color: #ffffff !important;
}

/* 4. Действие: Делегировать / Сменить ответственного */
.b24-btn-action-delegate {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5 !important;
    border: 1px solid rgba(99, 102, 241, 0.28);
}

.b24-btn-action-delegate:hover {
    background: #4f46e5;
    color: #ffffff !important;
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* 5. Действие: Редактировать / Изменить */
.b24-btn-action-edit,
.b24-btn-action-secondary {
    background: var(--surface-card, #ffffff);
    color: var(--surface-text, #334155) !important;
    border: 1px solid var(--surface-border, #cbd5e1);
}

.b24-btn-action-edit:hover,
.b24-btn-action-secondary:hover {
    background: var(--surface-hover, #f1f5f9);
    color: var(--surface-text, #0f172a) !important;
    border-color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 6. Действие: Удалить */
.b24-btn-action-delete {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.b24-btn-action-delete:hover {
    background: #dc2626;
    color: #ffffff !important;
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

/* Тёмная тема для кнопок верхней панели */
[data-theme="dark"] .b24-btn-action-delegate {
    background: rgba(99, 102, 241, 0.16);
    color: #818cf8 !important;
    border-color: rgba(129, 140, 248, 0.35);
}

[data-theme="dark"] .b24-btn-action-delegate:hover {
    background: #6366f1;
    color: #ffffff !important;
    border-color: #6366f1;
}

[data-theme="dark"] .b24-btn-action-edit,
[data-theme="dark"] .b24-btn-action-secondary {
    background: var(--surface-card, #1e293b);
    color: var(--surface-text, #f1f5f9) !important;
    border-color: var(--surface-border, #334155);
}

[data-theme="dark"] .b24-btn-action-edit:hover,
[data-theme="dark"] .b24-btn-action-secondary:hover {
    background: var(--surface-hover, #334155);
    border-color: #475569;
}

[data-theme="dark"] .b24-btn-action-delete {
    background: rgba(239, 68, 68, 0.16);
    color: #f87171 !important;
    border-color: rgba(248, 113, 113, 0.35);
}

[data-theme="dark"] .b24-btn-action-delete:hover {
    background: #ef4444;
    color: #ffffff !important;
    border-color: #ef4444;
}

/* ==========================================================================
   3. ТЕЛО СЛАЙДЕРА (КОНТЕНТ)
   ========================================================================== */

.b24-slider-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Стилизация скроллбара слайдера */
.b24-slider-body::-webkit-scrollbar {
    width: 8px;
}

.b24-slider-body::-webkit-scrollbar-track {
    background: transparent;
}

.b24-slider-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb, rgba(0, 0, 0, 0.18));
    border-radius: 4px;
}

[data-theme="dark"] .b24-slider-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.b24-slider-body::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover, rgba(0, 0, 0, 0.3));
}

[data-theme="dark"] .b24-slider-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Обёртка контента страницы внутри слайдера */
.b24-slider-page {
    min-height: 100%;
    position: relative;
}

.b24-slider-content-inner {
    padding-bottom: 60px;
}

/* Специфические оптимизации для detail.html внутри слайдера */
.b24-slider-content-inner .task-detail-container {
    padding: 20px 24px;
    margin: 0;
    max-width: 100%;
}

@media (max-width: 767px) {
    .b24-slider-content-inner .task-detail-container {
        padding: 12px 14px;
    }
}

/* Специфические оптимизации для create.html и edit.html внутри слайдера */
.b24-slider-content-inner .task-form-wrapper {
    max-width: 100%;
    padding: 16px 24px 60px 24px;
}

@media (max-width: 767px) {
    .b24-slider-content-inner .task-form-wrapper {
        padding: 12px 14px 60px 14px;
    }
}

/* Внутри слайдера скрываем дублирующие кнопки действий и стрелку назад,
   так как верхняя панель слайдера уже содержит все необходимые элементы управления */
.b24-slider-content-inner .tf-actions-sticky,
.b24-slider-page .tf-actions-sticky,
#b24SliderPanel .tf-actions-sticky {
    display: none !important;
}

.b24-slider-content-inner .tf-back-btn,
.b24-slider-page .tf-back-btn,
#b24SliderPanel .tf-back-btn {
    display: none !important;
}

/* ==========================================================================
   4. СКЕЛЕТОН ЗАГРУЗКИ (BITRIX24 STYLE SKELETON)
   ========================================================================== */

.b24-skeleton-wrap {
    padding: 24px;
}

.b24-skeleton-pulse {
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.05) 0%, 
        rgba(0, 0, 0, 0.1) 50%, 
        rgba(0, 0, 0, 0.05) 100%);
    background-size: 200% 100%;
    animation: b24-skeleton-glow 1.5s ease-in-out infinite;
    border-radius: 8px;
}

[data-theme="dark"] .b24-skeleton-pulse {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.04) 0%, 
        rgba(255, 255, 255, 0.09) 50%, 
        rgba(255, 255, 255, 0.04) 100%);
    background-size: 200% 100%;
}

@keyframes b24-skeleton-glow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.b24-skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.b24-skeleton-line {
    height: 16px;
    margin-bottom: 12px;
}

.b24-skeleton-block {
    height: 140px;
    margin-bottom: 16px;
}

/* ==========================================================================
   5. ПОЛНОЭКРАННЫЙ ПРОСМОТР ИЗОБРАЖЕНИЙ (LIGHTBOX)
   ========================================================================== */

.b24-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s;
    user-select: none;
}

.b24-lightbox-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.b24-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 16, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: zoom-out;
}

.b24-lightbox-toolbar {
    position: absolute;
    top: 18px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 25;
}

.b24-lightbox-counter {
    position: absolute;
    top: 18px;
    left: 24px;
    z-index: 25;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.b24-lightbox-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}

.b24-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    transform: translateY(-1.5px);
}

.b24-lightbox-btn-close {
    background: rgba(239, 68, 68, 0.4);
}

.b24-lightbox-btn-close:hover {
    background: #ef4444 !important;
}

/* Круглые кнопки навигации карусели */
.b24-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.b24-lightbox-nav:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.b24-lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.b24-lightbox-nav-prev {
    left: 24px;
}

.b24-lightbox-nav-next {
    right: 24px;
}

.b24-lightbox-body {
    position: absolute;
    inset: 68px 24px 90px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
}

.b24-lightbox-img {
    max-width: 90vw;
    max-height: calc(85vh - 70px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    pointer-events: auto;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    cursor: zoom-in;
}

/* Нижняя лента миниатюр для карусели */
.b24-lightbox-thumbs-container {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
}

.b24-lightbox-thumbs {
    display: flex;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(10, 15, 25, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 90vw;
    overflow-x: auto;
    pointer-events: auto;
    scrollbar-width: none;
}

.b24-lightbox-thumbs::-webkit-scrollbar {
    display: none;
}

.b24-lightbox-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.55;
    flex-shrink: 0;
}

.b24-lightbox-thumb:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.b24-lightbox-thumb.is-active {
    opacity: 1;
    border-color: #3b82f6;
    transform: scale(1.12);
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.55);
}

.b24-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .b24-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    .b24-lightbox-nav-prev { left: 10px; }
    .b24-lightbox-nav-next { right: 10px; }
    .b24-lightbox-toolbar { right: 12px; top: 12px; gap: 6px; }
    .b24-lightbox-counter { left: 12px; top: 12px; font-size: 0.8rem; padding: 4px 10px; }
    .b24-lightbox-btn { width: 36px; height: 36px; font-size: 0.9rem; }
    .b24-lightbox-body { inset: 56px 10px 80px 10px; }
    .b24-lightbox-thumb { width: 40px; height: 40px; }
}

/* ==========================================================================
   6. ВЕРХНЯЯ ПАНЕЛЬ КНОПОК УПРАВЛЕНИЯ ЗАДАЧЕЙ (TASK TOP ACTION BAR)
   ========================================================================== */

.task-top-action-bar {
    background: var(--surface-card, #ffffff);
    border: 1px solid var(--surface-border, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .task-top-action-bar {
    background: var(--surface-card, #141b26);
    border-color: var(--surface-border, #1e293b);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.task-top-action-bar .task-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.task-top-action-bar .action-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.task-top-action-bar .action-divider {
    height: 24px;
    width: 1px;
    background: var(--surface-border, #e2e8f0);
    margin: 0 4px;
}

[data-theme="dark"] .task-top-action-bar .action-divider {
    background: var(--surface-border, #2d3748);
}

/* Современный дизайн кнопок (Pill / Capsule) */
.task-action-btn {
    border-radius: 9999px !important;
    padding: 7px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.task-action-btn:hover {
    transform: translateY(-1.5px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

.task-action-btn:active {
    transform: translateY(0) !important;
}

/* Цветовые акценты кнопок */
.action-start {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}
.action-start:hover {
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.action-pause {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
}
.action-pause:hover {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
}

.action-review {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #ffffff !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}
.action-review:hover {
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4) !important;
}

.action-accept {
    background: linear-gradient(135deg, #0d9488, #0f766e) !important;
    color: #ffffff !important;
    border-color: rgba(13, 148, 136, 0.4) !important;
}
.action-accept:hover {
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4) !important;
}

.action-return {
    background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
    color: #ffffff !important;
    border-color: rgba(244, 63, 94, 0.4) !important;
}
.action-return:hover {
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4) !important;
}

.action-delegate {
    background: rgba(139, 92, 246, 0.1) !important;
    color: #7c3aed !important;
    border-color: rgba(139, 92, 246, 0.28) !important;
}
.action-delegate:hover {
    background: rgba(139, 92, 246, 0.18) !important;
    color: #6d28d9 !important;
}
[data-theme="dark"] .action-delegate {
    background: rgba(139, 92, 246, 0.18) !important;
    color: #c4b5fd !important;
    border-color: rgba(139, 92, 246, 0.35) !important;
}

.action-collaborators {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
    border-color: rgba(16, 185, 129, 0.28) !important;
}
.action-collaborators:hover {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #047857 !important;
}
[data-theme="dark"] .action-collaborators {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

.action-observers {
    background: rgba(6, 182, 212, 0.1) !important;
    color: #0891b2 !important;
    border-color: rgba(6, 182, 212, 0.28) !important;
}
.action-observers:hover {
    background: rgba(6, 182, 212, 0.18) !important;
    color: #0e7490 !important;
}
[data-theme="dark"] .action-observers {
    background: rgba(6, 182, 212, 0.18) !important;
    color: #67e8f9 !important;
    border-color: rgba(6, 182, 212, 0.35) !important;
}

.action-edit {
    background: rgba(100, 116, 139, 0.1) !important;
    color: #334155 !important;
    border-color: rgba(100, 116, 139, 0.28) !important;
}
.action-edit:hover {
    background: rgba(100, 116, 139, 0.18) !important;
    color: #0f172a !important;
}
[data-theme="dark"] .action-edit {
    background: rgba(100, 116, 139, 0.2) !important;
    color: #e2e8f0 !important;
    border-color: rgba(100, 116, 139, 0.35) !important;
}

.action-delete {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.22) !important;
}
.action-delete:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35) !important;
}
[data-theme="dark"] .action-delete {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.action-back {
    background: var(--surface-sunken, #f1f5f9) !important;
    color: var(--surface-text-muted, #64748b) !important;
    border-color: var(--surface-border, #cbd5e1) !important;
}
.action-back:hover {
    background: var(--surface-hover, #e2e8f0) !important;
    color: var(--surface-text, #0f172a) !important;
}
[data-theme="dark"] .action-back {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #cbd5e1 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* ==========================================================================
   7. Z-INDEX И НАЛОЖЕНИЕ МОДАЛЬНЫХ ОКОН ПОВЕРХ СЛАЙДЕРА
   ========================================================================== */

.modal-backdrop {
    z-index: 2000 !important;
}

.modal-backdrop.show {
    z-index: 2000 !important;
}

.modal {
    z-index: 2010 !important;
}

.modal.show {
    z-index: 2010 !important;
}

.modal.show .modal-dialog {
    z-index: 2011 !important;
    position: relative !important;
    pointer-events: auto !important;
}

.modal.show .modal-content {
    pointer-events: auto !important;
}

.bitrix-emoji-panel {
    z-index: 2020 !important;
}

.uc-image-modal {
    z-index: 99999 !important;
}

