/* Стили для админ-панели */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    overflow-x: hidden;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Боковая панель */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #8B0000 0%, #A52A2A 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.logo {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.logo h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.logo p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.admin-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left-color: #fff;
}

.nav-item i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.admin-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 0;
    background: #f8f9fa;
}

.admin-header {
    background: #fff;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Кнопки */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Секции контента */
.content-section {
    display: none;
    padding: 0 2rem 2rem;
}

.content-section.active {
    display: block;
}

/* Фильтры */
.filters {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filters button {
    padding: 0.75rem 1rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.filters button:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.filters input,
.filters select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: #8B0000;
}

#search-products {
    flex: 1;
    min-width: 300px;
}

/* Исправление цвета шрифта для элементов управления */
select,
input[type="text"],
input[type="number"],
input[type="email"],
textarea {
    color: #333 !important;
    background-color: #fff !important;
}

select option {
    color: #333 !important;
    background-color: #fff !important;
}

label {
    color: #333 !important;
    font-weight: 500;
}

/* Формы */
.form-group input,
.form-group select,
.form-group textarea {
    color: #333 !important;
    background-color: #fff !important;
    border: 1px solid #ddd;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #8B0000;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}

.form-group label {
    color: #333 !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
    width: 100%;
    align-items: start;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 400px;
    width: 100%;
    max-width: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.product-card.selected {
    border: 2px solid #8B0000;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.3);
}

/* Принудительное исправление категорий */
.product-card .product-category,
.products-grid .product-category,
#products-grid .product-category {
    color: #8B0000 !important;
    background: rgba(139, 0, 0, 0.15) !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    border: 1px solid rgba(139, 0, 0, 0.2) !important;
    padding: 0.4rem 1rem !important;
    display: inline-block !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.product-image {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image .no-image {
    color: #6c757d;
    font-size: 3rem;
}

.product-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: #28a745;
    color: white;
}

.status-inactive {
    background: #6c757d;
    color: white;
}

.status-out_of_stock {
    background: #dc3545;
    color: white;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 1rem;
}

.product-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Детали товара */
.product-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.detail-item i {
    color: #8B0000;
    width: 12px;
    text-align: center;
}

/* Статистика */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    border-radius: 12px;
    color: white;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #FFD700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Заголовок товаров */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.select-all-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.select-all-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8B0000;
}

.products-tools {
    display: flex;
    gap: 0.5rem;
}

.btn-tool {
    padding: 0.5rem 1rem;
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-tool:hover {
    background: #A52A2A;
    transform: translateY(-2px);
}

/* Массовые операции */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #e3f2fd;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #8B0000;
}

.selected-count {
    font-weight: bold;
    color: #8B0000;
}

.btn-bulk {
    padding: 0.5rem 1rem;
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-bulk:hover {
    background: #A52A2A;
    transform: translateY(-2px);
}

.btn-bulk.btn-danger {
    background: #dc3545;
}

.btn-bulk.btn-danger:hover {
    background: #c82333;
}

/* Выбор товаров */
.product-card {
    position: relative;
}

.product-select {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}

.product-select input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #8B0000;
    background: white;
    border-radius: 4px;
}

.product-card.selected {
    border: 2px solid #8B0000;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.3);
}

/* Значок рекомендуемого */
.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #FFD700;
    color: #8B0000;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Кнопка дублирования */
.btn-duplicate {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-duplicate:hover {
    background: #138496;
    transform: translateY(-2px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .bulk-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-bulk {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.btn-edit,
.btn-delete,
.btn-duplicate {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-edit {
    background: #8B0000;
    color: white;
}

.btn-edit:hover {
    background: #A52A2A;
    transform: translateY(-2px);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-duplicate {
    background: #17a2b8;
    color: white;
}

.btn-duplicate:hover {
    background: #138496;
    transform: translateY(-2px);
}

/* Модальные окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: #333;
}

.modal-content.small {
    max-width: 400px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2,
.modal-header h3 {
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

/* Формы */
#product-form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B0000;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Загрузка изображений */
.image-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-upload-area:hover,
.image-upload-area.dragover {
    border-color: #8B0000;
    background: rgba(139, 0, 0, 0.05);
}

.upload-placeholder {
    color: #6c757d;
}

.upload-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.remove-image:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Действия модального окна */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* Уведомления */
.notifications {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 3000;
}

.notification {
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #dc3545;
}

.notification.warning {
    background: #ffc107;
    color: #333;
}

/* Списки */
.categories-list,
.orders-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.category-item,
.order-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Настройки */
.settings-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.settings-form h3 {
    margin-bottom: 2rem;
    color: #333;
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .admin-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .content-section {
        padding: 0 1rem 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    #search-products {
        min-width: auto;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease;
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #8B0000;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A52A2A;
}

/* Дополнительные улучшения верстки */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-card {
        min-height: auto;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-edit,
    .btn-delete,
    .btn-duplicate {
        width: 100%;
        justify-content: center;
    }
}

/* КРИТИЧЕСКИ ВАЖНЫЕ СТИЛИ ДЛЯ КАТЕГОРИЙ */
body .admin-container .main-content .products-grid .product-card .product-info .product-category,
html body .admin-container .main-content .products-grid .product-card .product-info .product-category,
#products-grid .product-card .product-info .product-category,
.product-category,
div.product-category,
span.product-category,
.product-card .product-category,
.products-grid .product-category,
#products-grid .product-category {
    color: #8B0000 !important;
    background-color: rgba(139, 0, 0, 0.2) !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    border: 2px solid #8B0000 !important;
    padding: 0.5rem 1.2rem !important;
    display: inline-block !important;
    font-size: 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    border-radius: 25px !important;
    margin-bottom: 0.8rem !important;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3) !important;
}

/* Стили для системы ролей */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.role-switcher {
    padding: 1rem;
    margin: 1rem 0;
}

.role-switcher label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.role-switcher select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.role-switcher select option {
    background: #2c3e50;
    color: white;
}

/* Анимации для CDN */
.animate__animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Стили для кэша */
.cache-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 998;
}

/* Стили для индикатора подключения */
#connection-status {
    position: fixed;
    top: 20px;
    right: 140px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 999;
    transition: all 0.3s ease;
}

.cache-stats {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
}

.cache-indicator:hover .cache-stats {
    display: block;
}

/* Стили для формы входа */
.login-form {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #8B0000;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.login-form .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.login-info {
    background: rgba(139, 0, 0, 0.1);
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #8B0000;
}

.login-info p {
    margin: 0.5rem 0;
    color: #333;
}

.login-info code {
    background: rgba(139, 0, 0, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #8B0000;
    font-weight: 600;
}

/* Дополнительный класс для исправленных категорий */
.category-fixed {
    color: #8B0000 !important;
    background-color: rgba(139, 0, 0, 0.2) !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    border: 2px solid #8B0000 !important;
    padding: 0.5rem 1.2rem !important;
    display: inline-block !important;
    font-size: 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    border-radius: 25px !important;
    margin-bottom: 0.8rem !important;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3) !important;
}

/* Стили для аналитики */
.analytics-dashboard {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.analytics-card {
    background: linear-gradient(135deg, #8B0000 0%, #A52A2A 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.analytics-card h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    opacity: 0.9;
}

.analytics-value {
    font-size: 2rem;
    font-weight: bold;
    color: #FFD700;
}

.analytics-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #8B0000;
    margin-top: 2rem;
}

/* Стили для управления пользователями */
.users-management {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.users-list {
    margin-top: 2rem;
}

.user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #8B0000;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.user-role {
    color: #8B0000;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.user-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-status.active {
    background: #d4edda;
    color: #155724;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.user-info-text {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #8B0000;
    margin-top: 2rem;
}
