/* css/sg5-styles.css */
:root {
    --sg5-primary: #4361ee;
    --sg5-secondary: #3f37c9;
    --sg5-success: #4cc9f0;
    --sg5-danger: #f72585;
    --sg5-warning: #f8961e;
    --sg5-light: #f8f9fa;
    --sg5-dark: #212529;
    --sg5-gray: #6c757d;
    --sg5-border: #dee2e6;
}

/* Основной контейнер */
.sg5-container {
    display: flex;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Сайдбары */
.sg5-sidebar {
    width: 0px;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    padding: 0px 0;
}

.sg5-sidebar-left {
    border-right: 1px solid var(--sg5-border);
}

.sg5-sidebar-right {
    border-left: 1px solid var(--sg5-border);
}

.sg5-logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--sg5-border);
}

.sg5-logo h2 {
    color: var(--sg5-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.sg5-nav {
    padding: 20px;
    flex-grow: 1;
}

.sg5-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sg5-btn-primary {
    background: var(--sg5-primary);
    color: white;
    width: 100%;
}

.sg5-btn-primary:hover {
    background: var(--sg5-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.sg5-btn-success {
    background: var(--sg5-success);
    color: white;
}

.sg5-btn-danger {
    background: var(--sg5-danger);
    color: white;
}

.sg5-user-info {
    padding: 20px;
    border-top: 1px solid var(--sg5-border);
    color: var(--sg5-gray);
    font-size: 12px;
}

/* Центральная область */
.sg5-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: white;
}

/* Календарь */
.sg5-calendar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.sg5-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
}

.sg5-calendar-nav {
    display: flex;
    gap: 10px;
}

.sg5-calendar-nav-btn {
    padding: 8px 16px;
    border: 1px solid var(--sg5-border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sg5-calendar-nav-btn:hover {
    background: var(--sg5-light);
    border-color: var(--sg5-primary);
}

.sg5-view-mode {
    display: flex;
    gap: 10px;
}

.sg5-view-mode-btn {
    padding: 8px 16px;
    border: none;
    background: var(--sg5-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sg5-view-mode-btn.sg5-active {
    background: var(--sg5-primary);
    color: white;
}

/* Сетка календаря */
.sg5-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--sg5-border);
    border: 1px solid var(--sg5-border);
    border-radius: 8px;
    overflow: hidden;
}

.sg5-calendar-cell {
    background: white;
    min-height: 100px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.sg5-calendar-cell:hover {
    background: var(--sg5-light);
    transform: scale(1.02);
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sg5-week-view .sg5-calendar-grid {
    grid-template-columns: 80px repeat(7, 1fr);
}

.sg5-time-label {
    background: var(--sg5-light);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.sg5-day-view .sg5-calendar-grid {
    grid-template-columns: 80px 1fr;
}

/* Задачи */
.sg5-task {
    position: relative;
    margin: 2px 0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg5-task:hover {
    transform: translateX(2px);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

.sg5-task-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.sg5-task-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    z-index: -1;
}

/* Модальное окно */
.sg5-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.sg5-modal.sg5-active {
    display: flex;
}

.sg5-modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Форма задачи */
.sg5-task-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sg5-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sg5-form-group label {
    font-weight: 500;
    color: var(--sg5-dark);
}

.sg5-form-group input,
.sg5-form-group select,
.sg5-form-group textarea {
    padding: 10px;
    border: 1px solid var(--sg5-border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sg5-form-group input:focus,
.sg5-form-group select:focus,
.sg5-form-group textarea:focus {
    outline: none;
    border-color: var(--sg5-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Цветовые пресеты */
.sg5-color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sg5-color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.sg5-color-option:hover {
    transform: scale(1.1);
}

.sg5-color-option.sg5-selected {
    border-color: var(--sg5-dark);
    transform: scale(1.1);
}

/* Кнопки формы */
.sg5-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Кастомное подтверждение */
.sg5-confirm-modal {
    text-align: center;
}

.sg5-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Анимации */
@keyframes sg5-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sg5-fade-in {
    animation: sg5-fadeIn 0.3s ease forwards;
}

/* Скроллбар */
.sg5-main::-webkit-scrollbar {
    width: 8px;
}

.sg5-main::-webkit-scrollbar-track {
    background: var(--sg5-light);
}

.sg5-main::-webkit-scrollbar-thumb {
    background: var(--sg5-primary);
    border-radius: 4px;
}

.sg5-main::-webkit-scrollbar-thumb:hover {
    background: var(--sg5-secondary);
}



/* css/sg5-styles.css - Дополнения */

/* Улучшенные стили для месяцев */
.sg5-calendar-month .sg5-calendar-cell {
    min-height: 100px;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.sg5-calendar-month .sg5-other-month {
    opacity: 0.4;
    background: linear-gradient(45deg, #f8f9fa 0%, #e9ecef 100%);
    pointer-events: none; /* Отключаем клики */
    cursor: default;
}

.sg5-calendar-month .sg5-other-month .sg5-cell-date {
    color: #adb5bd;
    font-style: italic;
}

.sg5-calendar-month .sg5-other-month .sg5-task {
    opacity: 0.6; /* Задачи в других месяцах тоже полупрозрачные */
    filter: grayscale(30%);
}

.sg5-calendar-month .sg5-other-month:hover {
    opacity: 0.4;
    transform: none;
    box-shadow: none;
}

/* Улучшенные стили для недельного вида */
.sg5-calendar-week .sg5-calendar-grid {
    grid-template-columns: 60px repeat(7, 1fr); /* Уменьшили колонку времени */
    font-size: 12px;
}

.sg5-calendar-week .sg5-calendar-cell {
    min-height: 30px; /* Уменьшили высоту ячеек */
    padding: 2px;
    font-size: 11px;
    border: 1px solid #f1f3f5;
    overflow: hidden;
}

.sg5-calendar-week .sg5-time-label {
    min-height: 30px;
    font-size: 10px;
    padding: 2px;
    background: #f8f9fa;
    color: #495057;
    font-weight: 500;
    border-right: 2px solid #dee2e6;
}

.sg5-calendar-week .sg5-calendar-header-cell {
    min-height: 40px;
    padding: 4px;
    background: #f1f3f5;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
}

.sg5-calendar-week .sg5-today {
    background: #e3f2fd;
    border: 2px solid #2196f3;
}

/* Улучшенные стили для дневного вида */
.sg5-calendar-day .sg5-calendar-grid {
    grid-template-columns: 60px 1fr; /* Уменьшили колонку времени */
    font-size: 12px;
}

.sg5-calendar-day .sg5-calendar-cell {
    min-height: 30px; /* Уменьшили высоту ячеек */
    padding: 2px 4px;
    font-size: 11px;
    border: 1px solid #f1f3f5;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.sg5-calendar-day .sg5-time-label {
    min-height: 30px;
    font-size: 10px;
    padding: 2px 4px;
    background: #f8f9fa;
    color: #495057;
    font-weight: 500;
    border-right: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.sg5-calendar-day .sg5-calendar-header-cell {
    min-height: 50px;
    padding: 8px;
    background: #f1f3f5;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
}

/* Стили для задач в компактном режиме */
.sg5-calendar-week .sg5-task,
.sg5-calendar-day .sg5-task {
    margin: 1px 0;
    padding: 2px 4px;
    font-size: 10px;
    line-height: 1.2;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sg5-calendar-week .sg5-task-title,
.sg5-calendar-day .sg5-task-title {
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 0;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Компактные временные слоты */
.sg5-time-slots-container {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    position: relative;
}

.sg5-time-slots-container::-webkit-scrollbar {
    width: 6px;
}

.sg5-time-slots-container::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.sg5-time-slots-container::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 3px;
}

/* Индикатор текущего времени */
.sg5-current-time-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #f72585;
    z-index: 10;
    pointer-events: none;
}

.sg5-current-time-indicator::before {
    content: '';
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    background: #f72585;
    border-radius: 50%;
}

/* Адаптивность для разных экранов */
@media (max-width: 1200px) {
    .sg5-calendar-week .sg5-calendar-grid {
        grid-template-columns: 50px repeat(7, 1fr);
    }
    
    .sg5-calendar-week .sg5-calendar-cell {
        min-height: 25px;
    }
}

@media (max-width: 768px) {
    .sg5-sidebar {
        width: 150px;
    }
    
    .sg5-calendar-week .sg5-calendar-grid {
        grid-template-columns: 40px repeat(7, 1fr);
        font-size: 10px;
    }
    
    .sg5-calendar-week .sg5-task {
        font-size: 8px;
        padding: 1px;
    }
}




/* Маленькие точки для задач в компактном режиме */
.sg5-task-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.sg5-calendar-week .sg5-task,
.sg5-calendar-day .sg5-task {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sg5-calendar-week .sg5-task-title,
.sg5-calendar-day .sg5-task-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Стили для текущего времени */
.sg5-current-time {
    background: #fff3f3 !important;
    color: #f72585 !important;
    font-weight: bold;
    border-right: 2px solid #f72585 !important;
}

.sg5-current-time-cell {
    background: rgba(247, 37, 133, 0.05);
    border-left: 2px solid #f72585 !important;
}

/* Анимации для ячеек */
.sg5-clickable {
    cursor: pointer;
}

.sg5-clickable:hover {
    background: #e7f5ff !important;
}

.sg5-not-clickable {
    cursor: default;
}

.sg5-not-clickable:hover {
    background: inherit;
}



/* Дополнительные стили для calendar-view.php */

.sg5-today-badge {
    font-size: 10px;
    background: #f72585;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 4px;
}

.sg5-task-more {
    font-size: 10px;
    color: #6c757d;
    text-align: center;
    margin-top: 2px;
    cursor: pointer;
}

.sg5-task-more:hover {
    color: #4361ee;
    text-decoration: underline;
}

.sg5-today-cell {
    background: rgba(67, 97, 238, 0.02);
}

.sg5-calendar-header-cell {
    position: relative;
    padding: 8px;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.sg5-calendar-month-grid {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.sg5-calendar-month-grid .sg5-calendar-cell {
    border: 1px solid #f1f3f5;
    min-height: 120px;
}

/* Анимации */
@keyframes sg5-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(247, 37, 133, 0.4);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(247, 37, 133, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(247, 37, 133, 0);
    }
}

.sg5-current-time-cell {
    animation: sg5-pulse 2s infinite;
    position: relative;
}

.sg5-current-time-cell::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #f72585;
}

/* Улучшенная адаптивность */
@media (max-width: 768px) {
    .sg5-calendar-month-grid .sg5-calendar-cell {
        min-height: 80px;
        font-size: 12px;
    }
    
    .sg5-calendar-month-grid .sg5-task-title {
        font-size: 10px;
    }
    
    .sg5-view-mode-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .sg5-calendar-nav-btn {
        padding: 4px 8px;
    }
}

/* Печать */
@media print {
    .sg5-sidebar,
    .sg5-calendar-header,
    .sg5-view-mode {
        display: none;
    }
    
    .sg5-main {
        padding: 0;
    }
    
    .sg5-calendar {
        box-shadow: none;
    }
}




/* Добавьте в конец файла */

/* Улучшенные стили для календаря */
.sg5-calendar {
    animation: sg5-fadeIn 0.3s ease;
}

.sg5-calendar-grid {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sg5-calendar-cell {
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
}

.sg5-calendar-header-cell {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    font-weight: 600;
    text-align: center;
}

.sg5-time-label {
    background: #f8f9fa;
    color: #495057;
    font-weight: 500;
    padding: 8px 4px;
    text-align: center;
    border-right: 2px solid #dee2e6;
}

/* Анимация для кнопок */
.sg5-btn {
    transform: translateY(0);
    transition: all 0.2s ease;
}

.sg5-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.sg5-btn:active {
    transform: translateY(0);
}


/* Добавьте в конец файла */

/* Стили для индикатора загрузки */
.sg5-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 16px;
}

.sg5-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4361ee;
    border-radius: 50%;
    animation: sg5-spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes sg5-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Улучшенные стили для модального окна */
.sg5-modal-content {
    position: relative;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.sg5-task-form {
    position: relative;
}

.sg5-form-group {
    margin-bottom: 15px;
}

.sg5-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.sg5-form-group input,
.sg5-form-group select,
.sg5-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.sg5-form-group input:focus,
.sg5-form-group select:focus,
.sg5-form-group textarea:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.sg5-color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sg5-color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.sg5-color-option:hover {
    transform: scale(1.1);
}

.sg5-color-option.sg5-selected {
    border-color: #333;
    transform: scale(1.1);
}

.sg5-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.sg5-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sg5-btn-success {
    background: #4cc9f0;
    color: white;
}

.sg5-btn-success:hover {
    background: #3aa8d0;
    transform: translateY(-2px);
}

.sg5-btn-danger {
    background: #f72585;
    color: white;
}

.sg5-btn-danger:hover {
    background: #d61c6e;
    transform: translateY(-2px);
}

.sg5-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sg5-btn:active {
    transform: translateY(0);
}

/* Стили для подтверждения */
.sg5-confirm-modal {
    text-align: center;
    padding: 20px;
}

.sg5-confirm-modal h3 {
    margin-bottom: 15px;
    color: #333;
}

.sg5-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}



/* Стили для файлового менеджера */
.sg5-file-manager {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.sg5-file-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sg5-border);
}

.sg5-file-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sg5-upload-area {
    border: 2px dashed var(--sg5-primary);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.sg5-upload-area:hover {
    border-color: var(--sg5-secondary);
    background: #e9ecef;
}

.sg5-upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.sg5-upload-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 10px;
}

.sg5-selected-files {
    margin-bottom: 20px;
}

.sg5-selected-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f1f3f5;
    border-radius: 4px;
    margin-bottom: 5px;
}

.sg5-upload-progress {
    flex: 1;
    height: 4px;
    background: #dee2e6;
    border-radius: 2px;
    overflow: hidden;
}

.sg5-files-list {
    margin-top: 20px;
}

.sg5-files-list h3 {
    margin-bottom: 15px;
    color: var(--sg5-dark);
}

.sg5-files-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--sg5-border);
    border-radius: 8px;
    padding: 10px;
}

.sg5-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--sg5-border);
    transition: background 0.2s ease;
}

.sg5-file-item:hover {
    background: #f8f9fa;
}

.sg5-file-icon {
    font-size: 24px;
    min-width: 40px;
    text-align: center;
}

.sg5-file-info {
    flex: 1;
}

.sg5-file-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.sg5-file-name a {
    color: var(--sg5-primary);
    text-decoration: none;
}

.sg5-file-name a:hover {
    text-decoration: underline;
}

.sg5-file-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
}

.sg5-file-actions {
    display: flex;
    gap: 5px;
}

.sg5-btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

.sg5-no-files {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

.sg5-task-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 12px;
}

.sg5-file-icon-small {
    font-size: 16px;
}

.sg5-more-files {
    font-size: 11px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.sg5-file-size {
    font-size: 11px;
    color: #6c757d;
    margin-left: auto;
}

/* Анимации */
@keyframes sg5-upload-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.sg5-uploading {
    animation: sg5-upload-pulse 1.5s infinite;
}



/* Улучшенные стили для модального окна подтверждения */
.sg5-confirm-modal {
    text-align: center;
    padding: 30px;
    max-width: 400px;
    margin: 0 auto;
}

.sg5-confirm-modal h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.sg5-confirm-modal p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
    word-break: break-word;
}

.sg5-confirm-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.sg5-confirm-actions .sg5-btn {
    min-width: 120px;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sg5-confirm-actions .sg5-btn-danger {
    background: #f72585;
    color: white;
    border: none;
}

.sg5-confirm-actions .sg5-btn-danger:hover {
    background: #d61c6e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(247, 37, 133, 0.3);
}

.sg5-confirm-actions .sg5-btn:not(.sg5-btn-danger) {
    background: #6c757d;
    color: white;
    border: none;
}

.sg5-confirm-actions .sg5-btn:not(.sg5-btn-danger):hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Анимация для модального окна */
@keyframes sg5-modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sg5-confirm-modal {
    animation: sg5-modalFadeIn 0.3s ease;
}

/* Стили для кнопки закрытия */
.sg5-btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.sg5-btn-close:hover {
    color: #333;
}


/* Стили для индикатора загрузки */
.sg5-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 16px;
    backdrop-filter: blur(5px);
}

.sg5-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4361ee;
    border-radius: 50%;
    animation: sg5-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes sg5-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sg5-loading-overlay p {
    color: #4361ee;
    font-weight: 500;
    margin: 0;
}


/* Стили для вложенных модальных окон */
.sg5-modal {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.sg5-modal .sg5-modal {
    /* Для вложенных модальных окон делаем фон более темным */
    background: rgba(0, 0, 0, 0.7);
}

.sg5-file-manager {
    position: relative;
    z-index: 1001; /* Выше чем у формы задачи */
}

/* Анимация перехода между модальными окнами */
.sg5-modal-content {
    transition: all 0.3s ease;
}

.sg5-file-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sg5-border);
}

.sg5-btn-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    line-height: 1;
    padding: 0 10px;
}

.sg5-btn-close:hover {
    color: #f72585;
    transform: scale(1.1);
}

/* Индикатор вложенности */
.sg5-file-manager::before {
    content: '↳ Файлы';
    position: absolute;
    top: -10px;
    left: 20px;
    background: #4361ee;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    opacity: 0.9;
}
