/* ============================================ */
/* STYLE.CSS - Основной файл стилей (светлая тема) */
/* Версия: 21 */
/* Автор: Система управления документами */
/* ============================================ */

/* ============================================ */
/* ЧАСТЬ 1: СБРОСЫ И БАЗОВЫЕ СТИЛИ */
/* ============================================ */

/* Сброс отступов и box-sizing */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Основные стили body */
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    background-color: #f4f7fa;
}

/* Основной контейнер */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* ============================================ */
/* ЧАСТЬ 2: ТИПОГРАФИЯ И ЗАГОЛОВКИ */
/* ============================================ */

/* Общие стили для заголовков h1 и h2 */
h1, h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 700;
    background: linear-gradient(90deg, #007bff, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

/* Эффект наведения на заголовки */
h1:hover, h2:hover {
    transform: scale(1.05);
    text-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* Размеры заголовков */
h1 {
    font-size: 32px;
    padding: 10px 0;
}

h2 {
    font-size: 24px;
    padding: 8px 0;
}

/* Действия в шапке */
.header-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ============================================ */
/* ЧАСТЬ 3: ФОРМЫ ПОИСКА И ИНСТРУКЦИИ */
/* ============================================ */

/* Блок инструкции поиска */
.search-guide {
    background: #ffffff;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 13px;
    color: #555;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Заголовок инструкции */
.search-guide h3 {
    font-size: 15px;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* Списки в инструкции */
.search-guide ul {
    margin: 0 0 10px 15px;
    list-style-type: disc;
}

/* Элементы списка */
.search-guide li {
    margin-bottom: 6px;
}

/* Абзацы в инструкции */
.search-guide p {
    margin: 0;
    line-height: 1.4;
}

/* Общие стили для всех форм */
.search-form, .login-form, .add-form, .register-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

/* Группы полей в форме поиска */
.search-form .input-group {
    flex: 1;
    min-width: 200px;
}

/* Кнопка в форме поиска */
.search-form button {
    align-self: center;
    width: 100%;
}

/* Действия поиска */
.search-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

/* ============================================ */
/* ЧАСТЬ 4: ПОЛЯ ВВОДА, ТЕКСТОВЫЕ ОБЛАСТИ И КНОПКИ */
/* ============================================ */

/* Базовые стили для полей ввода и кнопок */
input, textarea, button {
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
}

/* Специфичные поля ввода */
input[type="text"], input[type="password"], input[type="email"], textarea, input[type="file"] {
    flex: 1;
    min-width: 100%;
    background: #fff;
}

/* Эффект фокуса на полях ввода */
input[type="text"]:focus, 
input[type="password"]:focus, 
input[type="email"]:focus, 
textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0,123,255,0.3);
    outline: none;
}

/* Текстовая область */
textarea {
    resize: vertical;
    min-height: 80px;
}

/* Основные кнопки */
button {
    background: linear-gradient(90deg, #007bff, #00a8ff);
    color: white;
    border: none;
    cursor: pointer;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Эффект наведения на кнопки */
button:hover {
    background: linear-gradient(90deg, #0056b3, #007bff);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
}

/* Кнопка удаления */
.delete-btn {
    background: linear-gradient(90deg, #dc3545, #e4606d);
    padding: 5px 10px; /* Уменьшено */
    font-size: 14px; /* Выравнивание с темной темой для всех разделов админки */
}

.delete-btn:hover {
    background: linear-gradient(90deg, #c82333, #dc3545);
    transform: translateY(-2px);
}

/* Кнопка редактирования */
.edit-btn {
    background: linear-gradient(90deg, #28a745, #34c759);
    margin-left: 5px;
    padding: 5px 10px; /* Уменьшено */
    font-size: 14px; /* Выравнивание с темной темой */
}

.edit-btn:hover {
    background: linear-gradient(90deg, #218838, #28a745);
    transform: translateY(-2px);
}

/* Действия в таблицах (новый стиль) */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ============================================ */
/* ЧАСТЬ 5: ТАБЛИЦЫ И АДАПТИВНЫЙ ДИЗАЙН */
/* ============================================ */

/* Адаптивная таблица */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Основные стили таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    min-width: 600px;
}

/* Ячейки таблицы */
th, td {
    padding: 8px;
    border: 1px solid #dfe6e9;
    text-align: left;
}

/* Заголовки таблицы */
th {
    background: #f5f5f5;
    color: #2c3e50;
    font-weight: 600;
}

/* Адаптивность для мобильных устройств */
@media screen and (max-width: 600px) {
    table {
        min-width: 100%;
    }
    
    th, td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    th {
        background: #f2f2f2;
        font-weight: bold;
    }
    
    /* Псевдоэлемент для названий колонок */
    td:before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 50%;
        padding-right: 10px;
    }
    
    tr {
        margin-bottom: 10px;
        border-bottom: 2px solid #ddd;
    }
    
    /* Адаптивность миниатюр и видео */
    .thumbnail, video {
        max-width: 100%;
        height: auto;
    }

    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .delete-btn, .edit-btn {
        padding: 5px 10px;
        font-size: 14px;
    }
}

/* ============================================ */
/* ЧАСТЬ 6: МИНИАТЮРЫ, ССЫЛКИ И АДМИНИСТРАТИВНЫЕ ЭЛЕМЕНТЫ */
/* ============================================ */

/* Миниатюры изображений и видео */
.thumbnail {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

/* Центрирование миниатюр */
td img.thumbnail, td video.thumbnail {
    margin: 0 auto;
}

/* Базовые стили для ссылок */
.doc-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.doc-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Явные стили для ссылок в светлой теме */
.doc-link {
    color: #007bff !important;
    text-decoration: none !important;
    font-size: 14px !important;
}

.doc-link:hover {
    color: #0056b3 !important;
    text-decoration: underline !important;
}

/* Стили для фото и видео ссылок */
.photo-link, .video-link {
    color: #007bff !important;
    text-decoration: none !important;
    font-size: 14px !important;
}

.photo-link:hover, .video-link:hover {
    color: #0056b3 !important;
    text-decoration: underline !important;
}

/* Ссылки администратора и выхода */
.admin-link, .logout {
    display: block;
    text-align: center;
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
}

.admin-link:hover, .logout:hover {
    text-decoration: underline;
}

/* Иконка администратора */
.admin-icon {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    gap: 10px;
}

.admin-icon a {
    margin-right: auto;
}

.admin-icon-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Блок результатов */
.results {
    margin-top: 20px;
}

/* ============================================ */
/* ЧАСТЬ 7: СООБЩЕНИЯ ОБ ОШИБКАХ И УСПЕХЕ */
/* ============================================ */

/* Простые сообщения об ошибках */
.error {
    color: #dc3545;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
}

/* Стилизованные блоки ошибок */
.error-light {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

/* Сообщения об успехе */
.success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

/* ============================================ */
/* ЧАСТЬ 8: ГРУППЫ ПОЛЕЙ ВВОДА И АВТОЗАПОЛНЕНИЕ */
/* ============================================ */

/* Группы полей ввода */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.input-group input, .input-group textarea {
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus, .input-group textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0,123,255,0.3);
    outline: none;
}

/* Стили для автозаполнения браузера */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #fff inset !important;
    -webkit-text-fill-color: #2c3e50 !important;
}

/* ============================================ */
/* ЧАСТЬ 9: ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ И МОДАЛЬНЫЕ ОКНА */
/* ============================================ */

/* Переключатель темы */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #2c3e50;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Модальные окна */
.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;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Кнопка закрытия модального окна */
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #2c3e50;
    text-decoration: none;
}

/* ============================================ */
/* ЧАСТЬ 10: ПАГИНАЦИЯ */
/* ============================================ */

/* Ссылки страниц */
.page-link {
    display: inline-block;
    padding: 8px 15px;
    text-decoration: none;
    color: #007bff;
    border: 1px solid #007bff;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 80px;
    box-sizing: border-box;
}

.page-link:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Контейнер пагинации */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 16px;
    flex-wrap: nowrap;
}

/* Центральная часть пагинации */
.pagination-center {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Блок для перехода на страницу */
.pagination-jump {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-jump input[type="number"] {
    width: 60px;
    padding: 6px;
    font-size: 14px;
    text-align: center;
    border-radius: 8px;
}

.pagination-jump button {
    padding: 6px 12px;
    font-size: 14px;
}

/* ============================================ */
/* ЧАСТЬ 11: СПИННЕРЫ И АНИМАЦИИ */
/* ============================================ */

/* Круглый спиннер */
.spinner-circle {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

/* Полноэкранный спиннер */
.spinner {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 20px 30px;
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.spinner span {
    font-size: 26px;
    font-weight: 700;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Анимация вращения */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Анимация пульсации */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* ============================================ */
/* ЧАСТЬ 12: ФУТЕР И АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ */
/* ============================================ */

/* Футер */
.footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #dfe6e9;
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    /* Формы */
    .search-form, .login-form, .add-form, .register-form {
        flex-direction: column;
        padding: 15px;
    }
    
    .search-form .input-group, 
    .login-form .input-group, 
    .register-form .input-group {
        min-width: 100%;
    }
    
    /* Таблицы */
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
    
    /* Модальные окна */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 70vh;
    }

    /* Пагинация */
    .pagination {
        flex-direction: column;
        gap: 10px;
    }

    .pagination-center {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .pagination-jump {
        justify-content: center;
    }

    .page-link {
        padding: 8px 16px;
        font-size: 15px;
        min-width: 90px;
    }

    .pagination-text {
        font-size: 14px;
    }

    /* Действия поиска и header-actions */
    .search-actions {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }

    .header-actions {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }

    /* Инструкция поиска */
    .search-guide {
        padding: 10px;
        font-size: 12px;
    }

    .search-guide h3 {
        font-size: 14px;
    }

    /* Футер */
    .footer {
        font-size: 12px;
        padding: 8px 0;
    }

    /* Заголовки */
    h1 {
        font-size: 24px;
        padding: 8px 0;
    }

    h2 {
        font-size: 20px;
        padding: 6px 0;
    }

    /* Спиннер */
    .spinner {
        padding: 15px 25px;
        border-radius: 8px;
    }

    .spinner span {
        font-size: 22px;
    }
}

/* ============================================ */
/* ЧАСТЬ 13: ФОРМЫ ЛОГИНА И РЕГИСТРАЦИИ */
/* ============================================ */

/* Улучшенные стили для форм */
.container .login-form, .container .register-form {
    background: linear-gradient(135deg, #ffffff 0%, #e6f0fa 100%) !important;
    padding: 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    max-width: 400px !important;
    width: 100% !important;
    margin: 20px auto !important;
}

/* Поля ввода */
.container .login-form .input-group input, 
.container .register-form .input-group input {
    padding: 12px !important;
    border: 1px solid #b0c4de !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #f8f9fa !important;
    transition: all 0.3s ease !important;
}

/* Фокус на полях */
.container .login-form .input-group input:focus, 
.container .register-form .input-group input:focus {
    border-color: #007bff !important;
    background: #fff !important;
    box-shadow: 0 0 10px rgba(0,123,255,0.4) !important;
}

/* Метки полей */
.container .login-form .input-group label, 
.container .register-form .input-group label {
    font-size: 14px !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
}

/* Кнопки */
.container .login-form button, 
.container .register-form button {
    background: linear-gradient(90deg, #007bff, #00a8ff) !important;
    padding: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin: 15px auto 0 !important;
    display: block !important;
}

/* Эффекты кнопок */
.container .login-form button:hover, 
.container .register-form button:hover {
    background: linear-gradient(90deg, #0056b3, #007bff) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0,123,255,0.4) !important;
}

/* Действия поиска */
.container .login-form .search-actions, 
.container .register-form .search-actions {
    justify-content: center !important;
    margin-top: 15px !important;
}

/* Ссылки на страницы */
.container .login-form .page-link, 
.container .register-form .page-link {
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    color: #007bff !important;
    border: 1px solid #007bff !important;
}

.container .login-form .page-link:hover, 
.container .register-form .page-link:hover {
    background: #007bff !important;
    color: white !important;
}

/* Адаптивность форм */
@media (max-width: 768px) {
    .container .login-form, .container .register-form {
        padding: 15px !important;
        max-width: 100% !important;
    }

    .container .login-form .input-group input, 
    .container .register-form .input-group input {
        padding: 10px !important;
        font-size: 13px !important;
    }

    .container .login-form button, 
    .container .register-form button {
        padding: 10px !important;
        font-size: 14px !important;
    }

    .container .login-form .page-link, 
    .container .register-form .page-link {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }
}

/* ============================================ */
/* ЧАСТЬ 14: КНОПКИ ДЕЙСТВИЙ И ИНФОРМАЦИОННЫЕ СООБЩЕНИЯ */
/* ============================================ */

/* Общие стили для кнопок действий */
.action-button {
    padding: 8px 15px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

/* Кнопка одобрения */
.approve {
    background-color: #28a745;
    color: white;
}

.approve:hover {
    background-color: #218838;
}

/* Кнопка отклонения */
.reject {
    background-color: #dc3545;
    color: white;
}

.reject:hover {
    background-color: #c82333;
}

/* Базовые информационные сообщения */
.info-message {
    background-color: #e7f3ff;
    color: #31708f;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #bcdff1;
    border-radius: 4px;
    text-align: center;
}

.info-message a {
    color: #31708f;
    text-decoration: underline;
}

.info-message a:hover {
    text-decoration: none;
}

/* ============================================ */
/* ЧАСТЬ 15: CSS ПЕРЕМЕННЫЕ И ДОПОЛНИТЕЛЬНЫЕ СТИЛИ */
/* ============================================ */

/* Заголовки таблиц */
th {
    background: #d4edda !important;
    color: #2c3e50;
    font-weight: 600;
}

/* Переопределение для темной темы */
.dark-theme th {
    background: #8456fc !important;
    color: #e0e0e0;
}

/* CSS переменные для светлой темы */
:root {
    --primary: #007bff;
    --primary-hover: #0056b3;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --background: #ffffff;
    --background-light: #f8f9fa;
    --text: #2c3e50;
    --text-light: #6c757d;
    --border: #dfe6e9;
    --table-header-bg: #d4edda;
    --table-header-color: #2c3e50;
    --info-bg: #e7f3ff;
    --info-color: #31708f;
    --info-border: #bcdff1;
    --info-icon: #31708f;
    --info-link: #31708f;
    --info-link-hover: #245269;
    --success-color: #28a745;
}

/* Улучшенные информационные сообщения */
.info-message {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: var(--info-color);
}

.info-message i {
    color: var(--info-icon);
    font-size: 24px;
    margin-top: 2px;
}

.info-message div {
    flex: 1;
}

.info-message p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.info-message p:last-child {
    margin-bottom: 0;
}

.info-message strong {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.info-message a {
    color: var(--info-link);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.info-message a:hover {
    color: var(--info-link-hover);
    text-decoration: none;
}

/* Ссылки в таблицах результатов */
.results-table a {
    color: #007bff;
    text-decoration: none;
}

.results-table a:hover {
    text-decoration: underline;
}

/* ============================================ */
/* ЧАСТЬ 16: СТРАНИЦА STATS.PHP (СТАТИСТИКА) */
/* ============================================ */

/* Заголовок с иконкой */
h1[style*="color:#007bff"] {
    text-align: center;
    margin-bottom: 20px;
    color: #007bff;
    font-weight: 700;
    background: linear-gradient(90deg, #007bff, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1[style*="color:#007bff"] i {
    margin-right: 10px;
}

/* Действия в шапке */
.header-actions {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.header-actions .page-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    text-decoration: none;
    color: #007bff;
    border: 1px solid #007bff;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 80px;
    box-sizing: border-box;
}

.header-actions .page-link:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Карточки статистики */
.stats-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px auto;
    max-width: 900px;
    width: 100%;
}

.card-sm {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    padding: 12px;
    width: calc((100% - 72px) / 7);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    flex-shrink: 0;
}

.card-sm:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.card-sm i {
    font-size: 1.5em;
    color: #007bff;
    margin-bottom: 6px;
}

.card-sm .num {
    font-size: 1.5em;
    font-weight: bold;
    margin: 6px 0;
    color: #333;
    line-height: 1.2;
}

.card-sm .lbl {
    font-size: 0.75em;
    color: #666;
    opacity: 0.9;
    line-height: 1.2;
}

/* Контейнер для графиков */
.chart-wrap {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin: 30px auto;
    max-width: 900px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.chart-wrap h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

/* Элементы списка записей */
.item, .action {
    padding: 10px 0;
    border-bottom: 1px dashed #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    color: #333;
}

.item:last-child, .action:last-child {
    border-bottom: none;
}

.action .user {
    font-weight: bold;
    color: #007bff;
}

.action .time {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}

/* Спан с иконками категорий */
.item div span[style*="background:var(--input-bg)"] {
    background: #f8f9fa !important;
    padding: 2px 8px !important;
    border-radius: 3px !important;
    font-size: 0.8em !important;
    color: #333 !important;
    border: 1px solid #dee2e6 !important;
}

/* Сообщения "Нет записей" */
.chart-wrap div[style*="text-align:center"] {
    color: #999 !important;
    padding: 20px !important;
    font-style: italic;
}

/* Время обновления */
.update {
    text-align: center;
    margin: 30px 0;
    color: #666;
    font-size: 1em;
}

/* Стили для графиков Canvas */
canvas {
    height: 400px !important;
    width: 100% !important;
}

/* Адаптивность карточек статистики */
@media (max-width: 1200px) {
    .card-sm {
        width: calc((100% - 60px) / 7);
    }
}

@media (max-width: 1024px) {
    .card-sm {
        width: calc((100% - 48px) / 4);
    }
    
    .card-sm .num {
        font-size: 1.4em;
    }
}

@media (max-width: 768px) {
    .card-sm {
        width: calc((100% - 36px) / 3);
        padding: 10px;
        min-height: 100px;
    }
    
    .card-sm .num {
        font-size: 1.3em;
    }
    
    .card-sm .lbl {
        font-size: 0.7em;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-actions .page-link {
        padding: 6px 12px;
        font-size: 0.9em;
        min-width: 70px;
    }
    
    .chart-wrap {
        padding: 15px;
        margin: 20px auto;
        max-width: 100%;
    }
    
    .chart-wrap h3 {
        font-size: 1.2em;
    }
}

@media (max-width: 576px) {
    .card-sm {
        width: calc((100% - 24px) / 2);
    }
    
    .card-sm i {
        font-size: 1.3em;
    }
    
    .card-sm .num {
        font-size: 1.2em;
    }
    
    .card-sm .lbl {
        font-size: 0.65em;
    }
}

@media (max-width: 400px) {
    .stats-cards {
        gap: 8px;
    }
    
    .card-sm {
        width: calc((100% - 8px) / 2);
        padding: 8px;
        min-height: 90px;
    }
    
    .card-sm .num {
        font-size: 1.1em;
    }
    
    .card-sm .lbl {
        font-size: 0.6em;
    }
}

/* Анимация появления элементов */
.card-sm, 
.chart-wrap {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

/* Ключевые кадры анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
 }

/* Задержки анимации */
.card-sm:nth-child(1) { animation-delay: 0.1s; }
.card-sm:nth-child(2) { animation-delay: 0.2s; }
.card-sm:nth-child(3) { animation-delay: 0.3s; }
.card-sm:nth-child(4) { animation-delay: 0.4s; }
.card-sm:nth-child(5) { animation-delay: 0.5s; }
.card-sm:nth-child(6) { animation-delay: 0.6s; }
.card-sm:nth-child(7) { animation-delay: 0.7s; }

/* ============================================ */
/* ЧАСТЬ 17: СТИЛИ ДЛЯ REPORTS.PHP (ОТЧЁТЫ) */
/* ============================================ */

/* Заголовок страницы отчётов */
.reports-title {
    text-align: center;
    margin-bottom: 10px;
    color: #007bff;
    font-weight: 700;
    background: linear-gradient(90deg, #007bff, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 32px;
    padding: 10px 0;
}

.reports-title i {
    margin-right: 10px;
}

/* Карточки статистики в reports.php */
.reports-page .stats-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px auto;
    max-width: 900px;
    width: 100%;
}

.reports-page .card-sm {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    padding: 15px;
    width: calc((100% - 60px) / 6);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    flex-shrink: 0;
}

.reports-page .card-sm:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.reports-page .card-sm i {
    font-size: 1.5em;
    color: #007bff;
    margin-bottom: 8px;
}

.reports-page .card-sm .num {
    font-size: 1.5em;
    font-weight: bold;
    margin: 8px 0;
    color: #333;
    line-height: 1.2;
}

.reports-page .card-sm .lbl {
    font-size: 0.8em;
    color: #666;
    opacity: 0.9;
    line-height: 1.2;
}

/* Центрированный текст с процентами */
.reports-page .centered-text-box {
    text-align: center;
    margin: 30px auto;
    padding: 25px;
    max-width: 900px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 1.2em;
    color: #333;
}

.reports-page .centered-text-box strong {
    color: #007bff;
    font-size: 1.8em;
    display: block;
    margin-bottom: 10px;
}

/* Дата отчета */
.reports-page .reports-date {
    font-size: 1.1em;
    color: #666;
    margin-top: 40px;
    background: linear-gradient(135deg, #e7f3ff 0%, #d4edff 100%);
    border-color: #bcdff1;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Графики */
.reports-page .chart-wrap {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin: 30px auto;
    max-width: 900px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reports-page .chart-wrap:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.reports-page .chart-wrap h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
    font-size: 1.4em;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Адаптивность для reports.php */
@media (max-width: 1200px) {
    .reports-page .card-sm {
        width: calc((100% - 48px) / 4);
    }
}

@media (max-width: 1024px) {
    .reports-page .card-sm {
        width: calc((100% - 36px) / 3);
    }
    
    .reports-page .card-sm .num {
        font-size: 1.4em;
    }
}

@media (max-width: 768px) {
    .reports-page .card-sm {
        width: calc((100% - 24px) / 2);
        padding: 12px;
        min-height: 110px;
    }
    
    .reports-page .card-sm .num {
        font-size: 1.3em;
    }
    
    .reports-page .card-sm .lbl {
        font-size: 0.75em;
    }
    
    .reports-page .centered-text-box,
    .reports-page .reports-date,
    .reports-page .chart-wrap {
        padding: 20px;
        margin: 20px auto;
        max-width: 95%;
    }
}

@media (max-width: 576px) {
    .reports-page .card-sm {
        width: calc((100% - 12px) / 2);
    }
    
    .reports-page .card-sm i {
        font-size: 1.3em;
    }
    
    .reports-page .card-sm .num {
        font-size: 1.2em;
    }
    
    .reports-page .card-sm .lbl {
        font-size: 0.7em;
    }
    
    .reports-page .centered-text-box {
        font-size: 1.1em;
    }
    
    .reports-page .centered-text-box strong {
        font-size: 1.5em;
    }
}

@media (max-width: 400px) {
    .reports-page .stats-cards {
        gap: 8px;
    }
    
    .reports-page .card-sm {
        width: calc((100% - 8px) / 2);
        padding: 10px;
        min-height: 100px;
    }
    
    .reports-page .card-sm .num {
        font-size: 1.1em;
    }
    
    .reports-page .card-sm .lbl {
        font-size: 0.65em;
    }
}

/* ============================================ */
/* ЧАСТЬ 18: СТИЛИ ДЛЯ ТЕМНОЙ ТЕМЫ (ADMIN.PHP) */
/* ============================================ */

.dark-theme .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dark-theme table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    background: #2a2a2a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    border-radius: 8px;
}

.dark-theme th, .dark-theme td {
    padding: 8px;
    text-align: left;
    border: 1px solid #555;
}

.dark-theme .highlight {
    background-color: #ff4444;
    font-weight: bold;
    color: #ffffff;
}

/* Адаптивность для мобильных в темной теме */
@media screen and (max-width: 600px) {
    .dark-theme table {
        min-width: 100%;
        background: #2a2a2a;
    }
    
    .dark-theme th, .dark-theme td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #555;
    }
    
    .dark-theme th {
        background: #333;
        font-weight: bold;
        color: #e0e0e0;
    }
    
    .dark-theme td:before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 50%;
        padding-right: 10px;
        color: #bb86fc;
    }
    
    .dark-theme tr {
        margin-bottom: 10px;
        border-bottom: 2px solid #555;
        background: #2a2a2a;
    }
    
    .dark-theme .thumbnail, .dark-theme video {
        max-width: 100%;
        height: auto;
        border: 1px solid #555;
    }
    
    .dark-theme .action-buttons {
        display: flex;
        gap: 5px;
    }
    
    .dark-theme .delete-btn, .dark-theme .edit-btn {
        padding: 5px 10px;
        font-size: 14px;
    }
}

/* Спиннер загрузки в темной теме */
.dark-theme .spinner {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #e0e0e0;
    padding: 20px;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.dark-theme .spinner span {
    font-size: 24px;
    font-weight: 700;
    color: #e0e0e0;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Список файлов в темной теме */
.dark-theme .file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dark-theme .file-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dark-theme .file-deletion-note {
    display: block;
    margin-top: 10px;
    color: #a0a0a0;
    font-size: 12px;
    line-height: 1.5;
}

/* Кнопки действий в таблице */
.dark-theme .action-buttons {
    display: flex;
    gap: 5px;
}

.dark-theme .delete-btn, .dark-theme .edit-btn {
    padding: 5px 10px;
    font-size: 14px;
}

/* Миниатюры в таблице */
.dark-theme td img.thumbnail, .dark-theme td video.thumbnail {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
    border: 1px solid #555;
}

/* Специальные стили для ячеек таблицы */
.dark-theme td {
    background: #2a2a2a;
    color: #e0e0e0;
}

.dark-theme th {
    background: #333;
    color: #e0e0e0;
    font-weight: 600;
}

/* ============================================ */
/* ЧАСТЬ 19: СТИЛИ ДЛЯ ССЫЛОК В ТАБЛИЦАХ */
/* ============================================ */

/* Единые стили для ссылок в таблицах */
table td .doc-link,
table td .photo-link,
table td .video-link {
    color: #007bff !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: inline-block !important;
    margin: 2px 0 !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    transition: all 0.2s ease !important;
    line-height: 1.3 !important;
}

table td .doc-link:hover,
table td .photo-link:hover,
table td .video-link:hover {
    color: #0056b3 !important;
    text-decoration: underline !important;
    background-color: rgba(0, 123, 255, 0.08) !important;
}

/* ============================================ */
/* ЧАСТЬ 20: СТИЛИ ДЛЯ ФАЙЛОВ В РЕДАКТИРОВАНИИ */
/* ============================================ */

/* Контейнер для списка файлов */
.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
}

/* Карточка файла */
.file-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    width: 150px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.file-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.1);
    transform: translateY(-2px);
}

/* Превью файла */
.file-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    margin-bottom: 12px;
    overflow: hidden;
}

.file-preview .thumbnail {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Стили для Telegram файлов */
.file-preview .telegram-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.file-preview .file-info {
    font-size: 14px;
    color: #666;
}

.file-preview .file-info small {
    font-size: 12px;
    color: #999;
    display: block;
}

/* Действия с файлом */
.file-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* Кастомные чекбоксы */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #007bff;
    border-color: #007bff;
}

/* Галочка в чекбоксе */
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .checkbox-custom {
    border-color: #007bff;
}

.checkbox-text {
    font-size: 14px;
    transition: color 0.3s ease;
}

.checkbox-label:hover .checkbox-text {
    color: #007bff;
}

/* Ссылки для просмотра файла */
.view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border-radius: 50%;
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-link:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

/* Сообщение об удалении файлов */
.file-deletion-note {
    margin-top: 15px;
    padding: 10px 15px;
    background: #e7f3ff;
    border: 1px solid #b6d4fe;
    border-radius: 6px;
    font-size: 13px;
    color: #31708f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-deletion-note i {
    color: #31708f;
}

/* Сообщение при отсутствии файлов */
.no-files {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 10px 0;
}

/* Ссылка на файл */
.file-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.file-link:hover {
    opacity: 0.9;
}

/* Адаптивность для файлов */
@media (max-width: 768px) {
    .file-list {
        gap: 15px;
        justify-content: center;
    }
    
    .file-item {
        width: 140px;
        padding: 12px;
    }
    
    .file-preview {
        height: 100px;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .checkbox-label {
        justify-content: center;
    }
    
    .view-link {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .file-list {
        gap: 10px;
    }
    
    .file-item {
        width: calc(50% - 10px);
        min-width: 120px;
    }
    
    .file-preview {
        height: 90px;
    }
}

/* ============================================ */
/* ЧАСТЬ 21: АНИМАЦИИ ДЛЯ ВЫБРАННЫХ ФАЙЛОВ */
/* ============================================ */

/* Стили для файлов, выбранных для удаления */
.file-item.selected-for-delete {
    opacity: 0.7;
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff8f8 0%, #ffeaea 100%);
}

.dark-theme .file-item.selected-for-delete {
    background: linear-gradient(135deg, #3a2a2a 0%, #2a1a1a 100%);
    border-color: #e57373;
}

.file-item.selected-for-delete .thumbnail {
    filter: grayscale(100%);
}

/* Анимация пульсации */
@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.file-item input[type="checkbox"]:checked ~ * {
    animation: selectPulse 0.3s ease;
}

/* ============================================ */
/* ЧАСТЬ 22: СТИЛИ ДЛЯ СТРАНИЦЫ ПОМОЩИ (HELP.PHP) */
/* ============================================ */

/* Карточки помощи */
.help-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.help-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.help-card h2 {
    display: flex;
    align-items: center;
    font-size: 20px;
    margin-bottom: 15px;
    gap: 10px;
    color: #007bff;
}

.help-card h2 i {
    font-size: 22px;
    color: #007bff;
}

.help-card ul {
    margin-left: 20px;
    line-height: 1.6;
}

.help-card ul li {
    margin-bottom: 8px;
}

.help-card ul li i {
    margin-right: 8px;
    color: #007bff;
}

/* Ссылки в карточках */
.help-card a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.help-card a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Заголовок страницы помощи */
.help-page-title {
    text-align: center;
    margin-bottom: 20px;
    color: #007bff;
    font-weight: 700;
    background: linear-gradient(90deg, #007bff, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.help-page-title i {
    margin-right: 10px;
    color: #007bff;
}

/* Вступление на странице помощи */
.help-intro {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* ============================================ */
/* ЧАСТЬ 23: СТИЛИ ДЛЯ EDITOR_STATS.PHP (СТАТИСТИКА РЕДАКТОРА) */
/* ============================================ */

/* Карточки статистики редактора */
.editor-stats-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px auto;
    max-width: 900px;
    width: 100%;
}

.editor-stats-cards .card-sm {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    padding: 12px;
    width: calc((100% - 48px) / 5); /* 5 карточек с промежутками */
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    flex-shrink: 0;
}

.editor-stats-cards .card-sm:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.editor-stats-cards .card-sm i {
    font-size: 1.5em;
    color: #007bff;
    margin-bottom: 6px;
}

.editor-stats-cards .card-sm .num {
    font-size: 1.5em;
    font-weight: bold;
    margin: 6px 0;
    color: #333;
    line-height: 1.2;
}

.editor-stats-cards .card-sm .lbl {
    font-size: 0.75em;
    color: #666;
    opacity: 0.9;
    line-height: 1.2;
}

/* Адаптивность для карточек редактора */
@media (max-width: 1024px) {
    .editor-stats-cards .card-sm {
        width: calc((100% - 36px) / 4);
    }
}

@media (max-width: 768px) {
    .editor-stats-cards .card-sm {
        width: calc((100% - 24px) / 3);
        padding: 10px;
        min-height: 100px;
    }
    
    .editor-stats-cards .card-sm .num {
        font-size: 1.3em;
    }
    
    .editor-stats-cards .card-sm .lbl {
        font-size: 0.7em;
    }
}

@media (max-width: 576px) {
    .editor-stats-cards .card-sm {
        width: calc((100% - 12px) / 2);
    }
    
    .editor-stats-cards .card-sm i {
        font-size: 1.3em;
    }
    
    .editor-stats-cards .card-sm .num {
        font-size: 1.2em;
    }
    
    .editor-stats-cards .card-sm .lbl {
        font-size: 0.65em;
    }
}

@media (max-width: 400px) {
    .editor-stats-cards {
        gap: 8px;
    }
    
    .editor-stats-cards .card-sm {
        width: calc((100% - 8px) / 2);
        padding: 8px;
        min-height: 90px;
    }
    
    .editor-stats-cards .card-sm .num {
        font-size: 1.1em;
    }
    
    .editor-stats-cards .card-sm .lbl {
        font-size: 0.6em;
    }
}

/* Анимация для карточек редактора */
.editor-stats-cards .card-sm {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.editor-stats-cards .card-sm:nth-child(1) { animation-delay: 0.1s; }
.editor-stats-cards .card-sm:nth-child(2) { animation-delay: 0.2s; }
.editor-stats-cards .card-sm:nth-child(3) { animation-delay: 0.3s; }
.editor-stats-cards .card-sm:nth-child(4) { animation-delay: 0.4s; }
.editor-stats-cards .card-sm:nth-child(5) { animation-delay: 0.5s; }

/* Стили для информации о пользователе на странице статистики */
.user-info-card {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.user-info-card h3 {
    margin: 0;
    color: #2c3e50;
}

.user-info-card p {
    margin: 5px 0 0 0;
    color: #6c757d;
}
/* ============================================ */
/* ДОБАВЛЕННЫЕ СТИЛИ ИЗ INDEX.PHP */
/* ============================================ */

/* Стили для подсветки найденных результатов */
.highlight {
    background-color: red;
    font-weight: bold;
}

/* Стили для списка файлов (добавлены в существующий раздел) */
.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* Стили для миниатюр и видео (дополнение к существующим) */
.thumbnail, video {
    max-width: 100px;
    max-height: 100px;
}

/* Адаптивность для мобильных устройств */
@media screen and (max-width: 600px) {
    .thumbnail, video {
        max-width: 100%;
        height: auto;
    }
	
	/* Личный кабинет */
.user-info-card, .file-upload-form {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.user-info-card h3, .file-upload-form h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.file-upload-form table {
    width: 100%;
    border-collapse: collapse;
}

.file-upload-form th, .file-upload-form td {
    border: 1px solid #dee2e6;
    padding: 8px;
}
.avatar-container { text-align: center; margin: 20px 0; }
.avatar-img { 
    width: 150px; height: 150px; border-radius: 50%; object-fit: cover; 
    border: 4px solid var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.avatar-img:hover { transform: scale(1.05); }
.avatar-form { margin-top: 15px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* Адаптивность */
@media (max-width: 768px) {
    .avatar-img { width: 120px; height: 120px; }
    .avatar-form button { width: 100%; }
}
/* ============================================ */
/* ЧАСТЬ 24: ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ДЛЯ ТЕМНОЙ ТЕМЫ */
/* ============================================ */

.dark-theme .file-action-btn.download {
    background: #2a2a2a !important;
    color: #34c759 !important;
    border-color: #444 !important;
}

.dark-theme .file-action-btn.download:hover {
    background: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}

.dark-theme .file-action-btn.delete {
    background: #2a2a2a !important;
    color: #e4606d !important;
    border-color: #444 !important;
}

.dark-theme .file-action-btn.delete:hover {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

.dark-theme .checkbox-custom {
    border-color: #666;
}

.dark-theme .checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #8456fc;
    border-color: #8456fc;
}

.dark-theme .view-link {
    background: #333;
    color: #8456fc;
}

.dark-theme .view-link:hover {
    background: #8456fc;
    color: white;
}
}
/* ============================================ */
/* КОНЕЦ ФАЙЛА STYLE.CSS */
/* ============================================ */