/* Административная панель - Стили */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0284c7;
    
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --white: #ffffff;
    --black: #000000;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --border-radius: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    --transition: all 0.2s ease-in-out;
    --transition-slow: all 0.3s ease-in-out;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Базовые стили */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-100);
    font-size: 14px;
    font-weight: 400;
    min-height: 100vh;
}

/* Форма входа */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.login-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    white-space: nowrap;
    line-height: 1;
}

.btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-200);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--gray-200);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
    border-color: var(--danger-color);
}

.btn-danger:hover:not(:disabled) {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

/* Уведомления */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-success {
    background: rgba(5, 150, 105, 0.1);
    color: #065f46;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.alert-warning {
    background: rgba(217, 119, 6, 0.1);
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Контейнер администратора */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
}

/* Заголовок админки */
.admin-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.admin-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.admin-title p {
    opacity: 0.9;
    margin: 0;
    font-size: 0.875rem;
}

.admin-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    padding: 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: var(--border-radius-lg);
    flex-shrink: 0;
}

.stat-icon svg {
    width: 100%;
    height: 100%;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    display: block;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Секции админки */
.admin-section {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--gray-900);
}

.section-header p {
    color: var(--gray-600);
    margin: 0;
    font-size: 0.875rem;
}

/* Загрузка файлов */
.upload-form {
    padding: 1.5rem;
}

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    width: 3rem;
    height: 3rem;
    color: var(--gray-400);
    margin: 0 auto 1rem;
}

.upload-text {
    margin-bottom: 1rem;
}

.upload-text strong {
    font-size: 1rem;
    color: var(--gray-900);
    display: block;
    margin-bottom: 0.5rem;
}

.upload-text p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

.upload-limits {
    font-size: 0.75rem !important;
    color: var(--gray-500) !important;
    margin-top: 0.5rem !important;
}

.upload-input {
    display: none;
}

.files-preview {
    margin: 1rem 0;
}

.selected-files {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.file-item svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: var(--gray-900);
    word-break: break-all;
    margin-bottom: 0.125rem;
}

.file-type {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 500;
}

.file-size {
    margin-left: auto;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Таблица файлов */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

.files-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.files-table th,
.files-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.files-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    position: sticky;
    top: 0;
    z-index: 10;
}

.files-table tbody tr:hover {
    background: var(--gray-50);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.file-name {
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.file-code {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.files-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .admin-container {
        padding: 0.5rem;
    }
    
    .admin-header {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .admin-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-title h1 {
        font-size: 1.5rem;
    }
    
    .admin-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .admin-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .stat-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .section-header {
        padding: 1rem;
    }
    
    .upload-form {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .files-table {
        font-size: 0.75rem;
        min-width: 600px;
    }
    
    .files-table th,
    .files-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .files-actions {
        padding: 1rem;
        flex-direction: column;
    }
    
    .login-form {
        padding: 2rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .admin-container {
        padding: 0.25rem;
    }
    
    .admin-header {
        padding: 1rem;
        border-radius: var(--border-radius);
    }
    
    .admin-title h1 {
        font-size: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        flex-direction: row;
        text-align: left;
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .upload-text strong {
        font-size: 0.875rem;
    }
    
    .login-form {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .login-header h1 {
        font-size: 1.25rem;
    }
    
    .admin-tabs {
        margin-bottom: 1rem;
        padding: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .settings-grid {
        gap: 1rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .analytics-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .logs-controls {
        padding: 1rem;
        flex-direction: column;
    }
    
    .logs-table {
        font-size: 0.75rem;
        min-width: 600px;
    }
    
    .logs-table th,
    .logs-table td {
        padding: 0.5rem;
    }
    
    .analytics-table {
        font-size: 0.75rem;
        min-width: 500px;
    }
    
    .analytics-table th,
    .analytics-table td {
        padding: 0.5rem;
    }
}

/* Табы админки */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--gray-600);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.tab-btn svg {
    width: 1rem;
    height: 1rem;
}

.tab-btn:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Контент табов */
.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Настройки */
.settings-form {
    padding: 1.5rem;
}

.settings-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.setting-group .form-control {
    width: 100%;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
}

/* Изображение заголовка */
.header-image-form {
    padding: 1.5rem;
}

.current-header-image {
    margin-bottom: 1.5rem;
    text-align: center;
}

.current-header-image img {
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.current-header-image p {
    margin-top: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Аналитика */
.analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.analytics-section {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
}

.analytics-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.os-list,
.browser-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.os-item,
.browser-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--white);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.os-name,
.browser-name {
    color: var(--gray-900);
    font-weight: 500;
}

.os-count,
.browser-count {
    color: var(--gray-600);
    font-weight: 600;
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.analytics-table th,
.analytics-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.analytics-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.analytics-table tbody tr:hover {
    background: var(--gray-50);
}

/* Логи */
.logs-controls {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.logs-table th,
.logs-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.logs-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logs-table tbody tr:hover {
    background: var(--gray-50);
}

.action-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.action-badge.action-admin_login {
    background: rgba(5, 150, 105, 0.1);
    color: #065f46;
}

.action-badge.action-file_upload {
    background: rgba(37, 99, 235, 0.1);
    color: #1e40af;
}

.action-badge.action-file_update {
    background: rgba(217, 119, 6, 0.1);
    color: #92400e;
}

.action-badge.action-file_delete {
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
}

.action-badge.action-settings_update {
    background: rgba(139, 92, 246, 0.1);
    color: #6d28d9;
}

.action-badge.action-header_image_upload {
    background: rgba(6, 182, 212, 0.1);
    color: #0e7490;
}

.action-badge.action-logs_cleared {
    background: rgba(245, 101, 101, 0.1);
    color: #dc2626;
}

/* Кнопка очертания для админки */
.admin-section .btn-outline {
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.admin-section .btn-outline:hover:not(:disabled) {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

/* Дополнительные утилиты */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}

/* Современная стилизация скроллбаров для админ панели */
/* Webkit браузеры (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg,
        var(--primary-color) 0%,
        var(--primary-dark) 100%);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--gray-50);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg,
        var(--primary-dark) 0%,
        #1e40af 100%);
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg,
        #1e40af 0%,
        #1e3a8a 100%);
    transform: scale(0.95);
}

::-webkit-scrollbar-corner {
    background: var(--gray-50);
}

/* Специальная стилизация для таблиц админки */
.files-table::-webkit-scrollbar,
.logs-table::-webkit-scrollbar,
.analytics-table::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.files-table::-webkit-scrollbar-track,
.logs-table::-webkit-scrollbar-track,
.analytics-table::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.files-table::-webkit-scrollbar-thumb,
.logs-table::-webkit-scrollbar-thumb,
.analytics-table::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg,
        var(--gray-400) 0%,
        var(--gray-500) 100%);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-300);
}

.files-table::-webkit-scrollbar-thumb:hover,
.logs-table::-webkit-scrollbar-thumb:hover,
.analytics-table::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg,
        var(--gray-500) 0%,
        var(--gray-600) 100%);
}

/* Стилизация для форм загрузки */
.upload-area::-webkit-scrollbar {
    width: 8px;
}

.upload-area::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.upload-area::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--border-radius);
}

.upload-area::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Стилизация для областей с прокруткой в настройках */
.settings-form::-webkit-scrollbar,
.admin-section::-webkit-scrollbar {
    width: 8px;
}

.settings-form::-webkit-scrollbar-track,
.admin-section::-webkit-scrollbar-track {
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.settings-form::-webkit-scrollbar-thumb,
.admin-section::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg,
        var(--primary-color) 0%,
        var(--info-color) 100%);
    border-radius: var(--border-radius);
    border: 1px solid var(--white);
}

.settings-form::-webkit-scrollbar-thumb:hover,
.admin-section::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg,
        var(--primary-dark) 0%,
        var(--info-color) 100%);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--gray-50);
}

/* Для темных секций (header админки) */
.admin-header::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-header::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.7) 100%);
}

.admin-header::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    .files-table::-webkit-scrollbar,
    .logs-table::-webkit-scrollbar,
    .analytics-table::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 480px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    .files-table::-webkit-scrollbar,
    .logs-table::-webkit-scrollbar,
    .analytics-table::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
}

/* Статус загрузки */
.upload-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.upload-status.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.upload-status.error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.upload-status.loading {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Отступы для формы загрузки изображения заголовка */
.header-image-form .btn {
    margin-top: 1rem;
}

/* Рекомендации по изображению */
.image-recommendations {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.image-recommendations h4 {
    margin: 0 0 0.75rem 0;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 600;
}

.image-recommendations ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.image-recommendations li {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.image-recommendations li:last-child {
    margin-bottom: 0;
}

.image-recommendations strong {
    color: var(--gray-700);
    font-weight: 600;
}

/* Стили для предварительного просмотра изображений */
.image-preview-container {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.image-preview-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.image-preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#imagePreview {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--white);
    transition: var(--transition);
}

#imagePreview:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.image-preview-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    min-width: 250px;
}

#imageFileName {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.9rem;
    word-break: break-all;
    text-align: center;
}

#imageFileSize {
    font-size: 0.8rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-weight: 500;
}

/* Улучшенные стили для кнопки удаления изображения */
.current-header-image {
    position: relative;
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
}

.current-header-image img {
    max-width: 300px;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--white);
    transition: var(--transition);
}

.current-header-image img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.current-header-image p {
    margin: 1rem 0 0.5rem 0;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

#deleteHeaderImageBtn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

#deleteHeaderImageBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

#deleteHeaderImageBtn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#deleteHeaderImageBtn:hover::before {
    left: 100%;
}

#deleteHeaderImageBtn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

#deleteHeaderImageBtn svg {
    width: 1rem;
    height: 1rem;
    transition: var(--transition);
}

#deleteHeaderImageBtn:hover svg {
    transform: scale(1.1);
}

/* Улучшенная область загрузки */
.upload-area.has-file {
    border-color: var(--success-color);
    background: rgba(5, 150, 105, 0.05);
}

.upload-area.has-file .upload-icon {
    color: var(--success-color);
}

.upload-area.has-file .upload-text strong {
    color: var(--success-color);
}

/* Анимация для кнопки загрузки */
#uploadHeaderImageBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#uploadHeaderImageBtn:not(:disabled):hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .image-preview-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .image-preview-header h4 {
        text-align: center;
    }
    
    #imagePreview {
        max-height: 200px;
    }
    
    .current-header-image img {
        max-width: 250px;
    }
    
    .image-preview-info {
        min-width: auto;
        width: 100%;
    }
    
    #deleteHeaderImageBtn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .image-preview-container {
        padding: 1rem;
    }
    
    #imagePreview {
        max-height: 150px;
    }
    
    .current-header-image {
        padding: 1rem;
    }
    
    .current-header-image img {
        max-width: 200px;
    }
}

/* === СТИЛИ ДЛЯ НОВЫХ УЛУЧШЕНИЙ АДМИН-ПАНЕЛИ === */

/* Dashboard - Быстрые действия */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.action-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-radius: var(--border-radius-lg);
    flex-shrink: 0;
}

.action-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.action-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.action-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* Dashboard - Последние файлы */
.recent-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recent-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.recent-file-item:hover {
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.recent-file-item .file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.recent-file-item .file-info svg {
    color: var(--primary-color);
}

.recent-file-item .file-name {
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.recent-file-item .file-details {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.file-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.file-size {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 500;
}

.file-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Dashboard - Сетка активности */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.activity-stats {
    display: flex;
    gap: 1rem;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.activity-item {
    text-align: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    flex: 1;
}

.activity-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.activity-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.recent-actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.action-description {
    flex: 1;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.action-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Фильтры и поиск */
.files-controls, .logs-search-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.search-box {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background: var(--white);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
    pointer-events: none;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background: var(--white);
    font-size: 0.875rem;
    color: var(--gray-700);
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.files-stats, .logs-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Улучшенная аналитика */
.trend-card .stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.trend-icon {
    font-weight: bold;
    font-size: 0.875rem;
}

.trend-up {
    color: var(--success-color);
}

.trend-down {
    color: var(--danger-color);
}

.trend-neutral {
    color: var(--gray-500);
}

.trend-text {
    color: var(--gray-500);
    font-weight: 500;
}

/* Графики аналитики */
.analytics-charts {
    margin-bottom: 2rem;
}

.chart-section {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.chart-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-controls .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.chart-controls .btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.chart-controls .btn.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.chart-container {
    padding: 1.5rem;
    background: var(--white);
}

#visitorsChart {
    width: 100%;
    height: 200px;
    border-radius: var(--border-radius);
    max-width: 100%;
    display: block;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.chart-loading,
.chart-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.chart-error {
    color: var(--danger-color);
}

/* Дополнительная аналитика */
.additional-analytics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.hourly-chart {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.5rem;
    height: 120px;
    padding: 1rem 0;
}

.hour-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 0.25rem;
    height: 100%;
}

.bar {
    width: 100%;
    max-width: 20px;
    background: linear-gradient(to top, var(--primary-color), var(--primary-dark));
    border-radius: 2px 2px 0 0;
    transition: var(--transition);
    min-height: 4px;
}

.bar:hover {
    background: linear-gradient(to top, var(--primary-dark), #1e40af);
    transform: scaleY(1.1);
}

.hour-label {
    font-size: 0.65rem;
    color: var(--gray-500);
    font-weight: 500;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: rotate(-45deg);
    margin-top: auto;
}

.hour-count {
    font-size: 0.7rem;
    color: var(--gray-700);
    font-weight: 600;
    margin-top: auto;
}

.geo-chart {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.geo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.geo-country {
    min-width: 80px;
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

.geo-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.geo-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.6s ease;
}

.geo-percent {
    min-width: 40px;
    text-align: right;
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 600;
}

.geo-count {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    color: var(--gray-500);
    font-weight: 500;
}

.geo-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Системная информация */
.system-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
}

.info-card h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--gray-600);
    font-weight: 500;
}

.info-value {
    color: var(--gray-900);
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.status-ok {
    color: var(--success-color) !important;
}

.status-error {
    color: var(--danger-color) !important;
}

.system-check {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
}

.system-check h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.check-item svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.check-ok {
    background: rgba(5, 150, 105, 0.1);
    color: #065f46;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.check-error {
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.check-warning {
    background: rgba(217, 119, 6, 0.1);
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Адаптивность для новых элементов */
@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .quick-action {
        padding: 1rem;
    }
    
    .action-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .action-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .files-controls, .logs-search-controls {
        padding: 1rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .files-stats, .logs-stats {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .activity-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .chart-controls {
        justify-content: center;
    }
    
    .additional-analytics {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .system-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hourly-chart {
        height: 100px;
        gap: 0.25rem;
    }
    
    .hour-label {
        font-size: 0.6rem;
    }
    
    .hour-count {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .quick-action {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .action-content h3 {
        font-size: 0.875rem;
    }
    
    .action-content p {
        font-size: 0.75rem;
    }
    
    .recent-file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .file-meta {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .search-input {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.8rem;
    }
    
    .search-icon {
        left: 0.5rem;
        width: 0.875rem;
        height: 0.875rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    #visitorsChart {
        height: 150px;
    }
    
    .hourly-chart {
        height: 80px;
    }
    
    .hour-label {
        display: none;
    }
    
    .info-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        text-align: left;
    }
    
    .info-value {
        font-size: 0.8rem;
    }
}

/* === ПАГИНАЦИЯ === */
.files-pagination,
.logs-pagination {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.pagination-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.pagination-btn svg {
    width: 1rem;
    height: 1rem;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.pagination-current {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
}

.pagination-total {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.pagination-jump {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.jump-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.jump-form label {
    color: var(--gray-600);
    font-weight: 500;
    margin: 0;
}

.jump-input {
    width: 80px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    text-align: center;
}

.jump-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Значки на вкладках */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.tab-btn.active .tab-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* Адаптивность для пагинации */
@media (max-width: 768px) {
    .files-pagination,
    .logs-pagination {
        padding: 1rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .pagination-jump {
        flex-direction: column;
        gap: 0.75rem;
        padding-top: 0.75rem;
    }
    
    .jump-form {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .pagination-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .pagination-btn svg {
        width: 0.875rem;
        height: 0.875rem;
    }
    
    .pagination-info {
        gap: 0.125rem;
    }
    
    .pagination-current {
        font-size: 0.8rem;
    }
    
    .pagination-total {
        font-size: 0.7rem;
    }
    
    .jump-input {
        width: 60px;
        padding: 0.25rem 0.375rem;
        font-size: 0.8rem;
    }
    
    .tab-badge {
        min-width: 1rem;
        height: 1rem;
        font-size: 0.7rem;
        margin-left: 0.25rem;
    }
}

/* === МОДАЛЬНОЕ ОКНО ЭКСПОРТА === */
.export-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.export-modal {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.export-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.export-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.export-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.export-section {
    margin-bottom: 1.5rem;
}

.export-section:last-child {
    margin-bottom: 0;
}

.export-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.export-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
}

.export-options label:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.export-options input[type="radio"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

.export-options label:has(input:checked) {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.export-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Уведомления */
.notification {
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--border-radius-lg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.notification-success {
    background: linear-gradient(135deg, #10B981, #059669) !important;
}

.notification-error {
    background: linear-gradient(135deg, #EF4444, #DC2626) !important;
}

.notification-info {
    background: linear-gradient(135deg, #3B82F6, #2563EB) !important;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .export-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .export-modal-header,
    .export-modal-body,
    .export-modal-footer {
        padding: 1rem;
    }
    
    .export-modal-footer {
        flex-direction: column;
    }
    
    .export-options {
        gap: 0.5rem;
    }
    
    .export-options label {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .export-modal-header h3 {
        font-size: 1.125rem;
    }
    
    .export-section h4 {
        font-size: 0.875rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}