/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ КЭША ===== */

/* Основные стили для страницы кэша */
.cache-monitor {
    padding: 20px;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
}

.cache-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.cache-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cache-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Статистика кэша */
.cache-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.8;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: capitalize;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    transition: opacity 0.3s ease;
    font-size: 1.8em;
    font-weight: 700;
    color: #28a745;
    margin: 0;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Фильтры статистики */
.filter-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.filter-stats h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.filter-stat {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.filter-stat:hover {
    transform: translateY(-2px);
}

.filter-stat h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: capitalize;
}

.filter-stat .count {
    font-size: 1.8em;
    font-weight: 700;
    color: #28a745;
    margin: 0;
}

.filter-stat .size {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Контрольная панель кэша */
.cache-controls {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.cache-controls h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
}

.control-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Специфичные кнопки для кэша */
.cache-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cache-btn-primary {
    background: #667eea;
    color: white;
}

.cache-btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.cache-btn-danger {
    background: #dc3545;
    color: white;
}

.cache-btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.cache-btn-warning {
    background: #ffc107;
    color: #212529;
}

.cache-btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.cache-btn-success {
    background: #28a745;
    color: white;
}

.cache-btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Список кэша */
.cache-list {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.cache-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.cache-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cache-item.expanded {
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cache-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.cache-key {
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.cache-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

.cache-details {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.cache-item.expanded .cache-details {
    display: block;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.detail-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.detail-value {
    color: #666;
    font-size: 0.9rem;
}

.excluded-ids {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.excluded-ids h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.ids-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.id-tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

/* Состояния загрузки */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Сообщения об ошибках и успехе */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    text-align: center;
    font-weight: 600;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    text-align: center;
    font-weight: 600;
}

/* Кнопка обновления */
.cache-refresh-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cache-refresh-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.cache-refresh-btn:active {
    transform: translateY(0);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.pagination-info {
    color: white;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Специфичные кнопки пагинации для кэша */
.cache-pagination-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cache-pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.cache-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cache-pagination-btn.active {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.page-input {
    width: 60px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4facfe, #00f2fe, #43e97b, #38f9d7);
    border-radius: 0 0 15px 15px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-content {
    padding: 25px;
    background: #f8f9fa;
}

.modal-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.3s ease;
}

.modal-section:nth-child(1) { animation-delay: 0.1s; }
.modal-section:nth-child(2) { animation-delay: 0.2s; }
.modal-section:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}

.modal-section h3::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 1px;
}

.modal-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 55px;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 1px;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.modal-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
}

.modal-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.modal-item:hover::before {
    opacity: 1;
}

.modal-item-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: block;
}

.modal-item-label::before {
    content: '●';
    color: #667eea;
    margin-right: 5px;
    font-weight: bold;
}

.modal-item-value {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    word-break: break-word;
}

.modal-item-value.success {
    color: #28a745;
}

.modal-item-value.warning {
    color: #ffc107;
}

.modal-item-value.danger {
    color: #dc3545;
}

.modal-item-value.info {
    color: #17a2b8;
}

/* Секция исключенных ID */
.excluded-ids-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.excluded-ids-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
    position: relative;
}

.excluded-ids-section h4::before {
    content: '⚠';
    color: #e74c3c;
    margin-right: 8px;
}

.ids-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.id-tag {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(231, 76, 60, 0.3);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
    transition: all 0.3s ease;
}

.id-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    background: linear-gradient(135deg, #c0392b, #a93226);
}

/* Секция JSON */
.json-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.json-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid #17a2b8;
    position: relative;
}

.json-section h4::before {
    content: '{ }';
    color: #17a2b8;
    margin-right: 8px;
    font-family: 'Courier New', monospace;
}

.modal-json {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #4a5568;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-json::-webkit-scrollbar {
    width: 8px;
}

.modal-json::-webkit-scrollbar-track {
    background: #4a5568;
    border-radius: 4px;
}

.modal-json::-webkit-scrollbar-thumb {
    background: #718096;
    border-radius: 4px;
}

.modal-json::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Цветовые классы для текста */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .cache-monitor {
        padding: 15px;
    }
    
    .cache-header {
        padding: 15px;
    }
    
    .cache-header h1 {
        font-size: 2rem;
    }
    
    .cache-stats {
        grid-template-columns: 1fr;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cache-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cache-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .cache-refresh-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal {
        width: 95%;
        margin: 10px;
    }
    
    .modal-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .ids-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* ===== НОВЫЕ СТИЛИ ДЛЯ СТАТИСТИКИ ===== */

.cache-header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.cache-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5rem;
    font-weight: 700;
}

.cache-header p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.header-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.refresh-btn, .toggle-auto-refresh, .clear-cache-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.toggle-auto-refresh {
    background: #e9ecef;
    color: #495057;
}

.toggle-auto-refresh.active {
    background: #28a745;
    color: white;
}

.toggle-auto-refresh:hover {
    transform: translateY(-2px);
}

.clear-cache-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.clear-cache-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

/* Redis Info */
.redis-info {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.redis-info h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 700;
}

.redis-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.redis-stat {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.redis-stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.redis-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

/* Summary Section */
.summary-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.summary-section h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 700;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    color: white;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.summary-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.summary-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cache Section */
.cache-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.cache-section h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 700;
}

.cache-description {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
}

.cache-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.cache-stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease;
}

.cache-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cache-stat-icon {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 10px;
}

.cache-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.cache-stat-value.expired {
    color: #dc3545;
}

.cache-stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cache Type Breakdown */
.cache-type-breakdown {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.cache-type-breakdown h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.type-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

.type-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.type-count {
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.type-count-actual {
    font-weight: 700;
    font-size: 1.3rem;
}

.type-count-actual.success {
    color: #28a745;
}

.type-count-actual.warning {
    color: #ffc107;
}

.type-count-separator {
    color: #999;
    font-weight: 400;
}

.type-count-expected {
    color: #666;
    font-weight: 500;
}

.type-count-label {
    color: #999;
    font-size: 0.9rem;
    font-weight: 400;
}

.type-unique-ids {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(23, 162, 184, 0.1);
    border-radius: 6px;
    font-size: 0.95rem;
}

.type-unique-ids i {
    color: #17a2b8;
}

.type-unique-ids-value {
    font-weight: 700;
    color: #17a2b8;
    font-size: 1.1rem;
}

.type-unique-ids-label {
    color: #666;
    font-size: 0.85rem;
}

.type-photos {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(108, 117, 125, 0.1);
    border-radius: 6px;
    font-size: 0.95rem;
}

.type-photos i {
    color: #6c757d;
}

.type-photos-with {
    font-weight: 700;
    color: #6c757d;
    font-size: 1.1rem;
}

.type-photos-separator {
    color: #999;
    font-weight: 400;
}

.type-photos-total {
    color: #666;
    font-weight: 500;
}

.type-photos-label {
    color: #666;
    font-size: 0.85rem;
}

.type-photos-percentage {
    color: #999;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 4px;
}

.type-desc {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

/* Photos Stats Section */
.cache-photos-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #6c757d;
}

.cache-photos-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
}

.photos-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.photos-stat-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.photos-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.photos-stat-icon {
    font-size: 1.5rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.photos-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.photos-stat-label {
    font-size: 0.85rem;
    color: #666;
}

/* Filter Type Grid */
.filter-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.filter-type-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #ffc107;
}

.filter-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.filter-type-name {
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

.filter-type-count {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-type-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-stat-label {
    color: #666;
    font-size: 0.9rem;
}

.filter-stat-value {
    font-weight: 700;
    color: #333;
}

.filter-stat-value.expired {
    color: #dc3545;
}

/* Cache Footer */
.cache-footer {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    color: #666;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #667eea;
}

.loading p {
    font-size: 1.2rem;
}

/* Error */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    margin: 20px;
    border: 1px solid #f5c6cb;
    text-align: center;
    font-weight: 600;
}

.error i {
    margin-right: 10px;
}

/* ===== СТИЛИ ДЛЯ ПОИСКА ===== */

.cache-search-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.cache-search-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 700;
}

.search-form {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 15px;
    align-items: end;
}

.search-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
}

.search-type-select {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.search-type-select:focus {
    outline: none;
    border-color: #667eea;
}

.search-input {
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-actions {
    display: flex;
    gap: 10px;
}

.search-btn, .clear-search-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.clear-search-btn {
    background: #e9ecef;
    color: #495057;
}

.clear-search-btn:hover {
    background: #dee2e6;
    transform: translateY(-2px);
}

.search-results {
    margin-top: 20px;
}

.search-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.search-loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #667eea;
}

.search-result-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border-left: 4px solid #28a745;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.search-result-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-search-results {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.close-search-results:hover {
    background: #dee2e6;
    color: #333;
}

.search-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.search-info-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.search-info-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.search-info-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    word-break: break-word;
}

.search-info-value code {
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e83e8c;
}

.search-info-value.success {
    color: #28a745;
}

.search-info-value.danger {
    color: #dc3545;
}

.search-info-value.info {
    color: #17a2b8;
}

.search-data-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.search-data-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.search-data-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

/* Сообщения об успехе */
.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.success-message h2 {
    color: #28a745;
    margin: 10px 0;
    font-size: 1.8em;
}

.success-message p {
    color: #333;
    font-size: 1.1em;
    margin: 10px 0;
}

.deleted-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.deleted-stats h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.deleted-stats ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.deleted-stats li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 1.1em;
}

.deleted-stats li:last-child {
    border-bottom: none;
    font-weight: bold;
    color: #dc3545;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid rgba(220, 53, 69, 0.3);
}

.search-data-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-word;
    border-left: 3px solid #667eea;
}

.search-data-more {
    padding: 10px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.search-data-json {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
}

.search-data-json pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.search-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #f5c6cb;
}

.search-error i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.search-error h3 {
    margin: 10px 0;
    font-size: 1.3rem;
}

.search-error p {
    margin: 10px 0;
}

.search-error ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.search-error li {
    margin: 5px 0;
}

.search-hint {
    margin-top: 15px;
    font-weight: 600;
}

/* Адаптивность для поиска */
@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .search-actions {
        flex-direction: column;
    }

    .search-btn, .clear-search-btn {
        width: 100%;
        justify-content: center;
    }

    .search-info-grid {
        grid-template-columns: 1fr;
    }
} 