/
delphin
/
CatRW
Обзор
Документация
Войти
/
delphin
/
CatRW
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
css/main.css
1 426 строк
26 KB
delphin
перед глобальным изменением
04 мар 2026, 09:56
Верифицирован
04 мар 2026, 09:56
c6cfdf3
Код
Авторство
О чём код?
/* css/main.css - ВСЁ В ОДНОМ ФАЙЛЕ (ОЧИЩЕННАЯ ВЕРСИЯ) */ :root { /* Цвета */ --primary: #3498db; --primary-dark: #2980b9; --secondary: #2c3e50; --success: #27ae60; --danger: #e74c3c; --warning: #f39c12; --light: #f8f9fa; --gray: #bdc3c7; --dark: #2c3e50; /* Тени и скругления */ --shadow: 0 2px 10px rgba(0,0,0,0.1); --shadow-lg: 0 5px 20px rgba(0,0,0,0.15); --radius: 8px; --radius-lg: 12px; --radius-sm: 4px; --radius-full: 50%; } /* ===== БАЗОВЫЕ СТИЛИ ===== */ * { margin: 0; padding: 0; box-sizing: border-box; } html { scroll-behavior: smooth; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; line-height: 1.6; color: var(--dark); background: #f5f7fa; min-height: 100vh; } a { color: var(--primary); text-decoration: none; transition: color 0.3s; } a:hover { color: var(--primary-dark); } .container { max-width: 1600px; margin: 0 auto; padding: 0 20px; } /* ===== УТИЛИТЫ ===== */ .text-center { text-align: center; } .text-right { text-align: right; } .d-flex { display: flex; } .d-grid { display: grid; } .d-none { display: none; } .d-block { display: block; } .align-center { align-items: center; } .justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .flex-wrap { flex-wrap: wrap; } .gap-1 { gap: 10px; } .gap-2 { gap: 20px; } .gap-3 { gap: 30px; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; } .mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 30px; } .p-1 { padding: 10px; } .p-2 { padding: 20px; } .p-3 { padding: 30px; } /* ===== КНОПКИ ===== */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border: none; border-radius: var(--radius); font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s; text-decoration: none; } .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); } .btn:active { transform: translateY(0); } .btn-primary { background: var(--primary); color: white; } .btn-primary:hover { background: var(--primary-dark); } .btn-success { background: var(--success); color: white; } .btn-danger { background: var(--danger); color: white; } .btn-warning { background: var(--warning); color: white; } .btn-small { padding: 6px 12px; font-size: 14px; } .btn-large { padding: 15px 30px; font-size: 18px; } .btn-icon { padding: 8px; width: 36px; height: 36px; } /* ===== ФОРМЫ ===== */ .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--dark); } .form-control { width: 100%; padding: 12px 15px; border: 2px solid var(--gray); border-radius: var(--radius); font-size: 16px; font-family: inherit; transition: all 0.3s; background: white; } .form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); } .form-control::placeholder { color: var(--gray); } .form-row { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; } .form-row .form-group { flex: 1; min-width: 200px; margin-bottom: 0; } /* ===== ТАБЛИЦЫ ===== */ .table-container { background: white; border-radius: var(--radius-lg); padding: 25px; box-shadow: var(--shadow); overflow: hidden; } .table-responsive { overflow-x: auto; margin: 0 -25px; padding: 0 25px; } table { width: 100%; border-collapse: collapse; min-width: 800px; } thead { background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%); } th { padding: 15px 20px; text-align: left; color: white; font-weight: 600; white-space: nowrap; } td { padding: 12px 20px; border-bottom: 1px solid #eee; vertical-align: middle; } tbody tr { transition: background 0.3s; } tbody tr:hover { background: rgba(52, 152, 219, 0.05); } tbody tr:last-child td { border-bottom: none; } /* ===== АДМИН ПАНЕЛЬ ===== */ .admin-layout { display: flex; min-height: 100vh; } .admin-nav { width: 250px; background: var(--secondary); color: white; display: flex; flex-direction: column; transition: width 0.3s; position: relative; } .admin-nav.collapsed { width: 70px; } .nav-toggle { position: absolute; top: 20px; right: -15px; background: white; border: 2px solid var(--secondary); border-radius: var(--radius-full); width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; z-index: 100; transition: transform 0.3s; } .nav-toggle:hover { transform: scale(1.1); } .nav-header { padding: 25px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); } .nav-header h2 { font-size: 1.4rem; margin-bottom: 5px; } .nav-items { flex: 1; padding: 20px 0; overflow-y: auto; } .nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: rgba(255,255,255,0.9); text-decoration: none; transition: all 0.3s; border-left: 3px solid transparent; } .nav-item:hover { background: rgba(255,255,255,0.1); color: white; } .nav-item.active { background: rgba(52, 152, 219, 0.2); color: white; border-left-color: var(--primary); font-weight: 600; } .nav-icon { font-size: 1.2rem; width: 24px; text-align: center; } .nav-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 15px 20px; } .nav-footer { padding: 15px 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; } .admin-main { flex: 1; background: #f5f7fa; overflow-y: auto; } .content-header { background: white; padding: 25px 30px; border-bottom: 1px solid #eee; box-shadow: 0 2px 5px rgba(0,0,0,0.05); } .content-header h1 { font-size: 1.8rem; color: var(--dark); display: flex; align-items: center; gap: 10px; } .section-icon { font-size: 1.5rem; } .breadcrumb { margin-top: 8px; color: var(--gray); font-size: 0.9rem; } .breadcrumb a { color: var(--primary); } .breadcrumb span { margin: 0 5px; } .content-area { padding: 30px; min-height: calc(100vh - 120px); } /* ===== ЛОГОТИПЫ ===== */ .logo-container { width: 60px; height: 60px; position: relative; display: inline-block; } .logo-img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius); border: 2px solid var(--gray); cursor: pointer; transition: all 0.3s; background: white; } .logo-img:hover { transform: scale(1.05); border-color: var(--primary); box-shadow: var(--shadow); } .logo-placeholder { width: 100%; height: 100%; background: var(--light); border: 2px dashed var(--gray); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--gray); font-size: 1.5rem; cursor: pointer; transition: all 0.3s; } .logo-placeholder:hover { background: rgba(52, 152, 219, 0.1); border-color: var(--primary); color: var(--primary); } .logo-actions { position: absolute; top: 100%; left: 0; right: 0; margin-top: 5px; display: flex; justify-content: center; gap: 5px; opacity: 0; transform: translateY(-10px); transition: all 0.3s; } .logo-container:hover .logo-actions { opacity: 1; transform: translateY(0); } .logo-btn { width: 28px; height: 28px; border: none; border-radius: var(--radius-sm); background: var(--primary); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: all 0.2s; } .logo-btn:hover { background: var(--primary-dark); transform: scale(1.1); } .logo-btn.delete { background: var(--danger); } /* ===== МОДАЛЬНЫЕ ОКНА ===== */ .modal { 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; } .modal.show { display: flex; } .modal-content { background: white; border-radius: var(--radius-lg); padding: 30px; max-width: 90%; max-height: 90%; position: relative; animation: modalShow 0.3s ease-out; } .modal-close { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 24px; color: var(--gray); cursor: pointer; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); transition: all 0.3s; } .modal-close:hover { background: #f0f0f0; color: var(--danger); } .modal-img { max-width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius); } @keyframes modalShow { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } } /* ===== УВЕДОМЛЕНИЯ ===== */ .alert { padding: 12px 16px; border-radius: var(--radius); margin: 10px 0; display: flex; align-items: center; gap: 10px; border-left: 4px solid transparent; animation: fadeIn 0.3s ease-out; box-shadow: 0 4px 12px rgba(0,0,0,0.15); } .alert-success { background: #d5f4e6; border-color: var(--success); color: #155724; } .alert-error { background: #fde8e8; border-color: var(--danger); color: #721c24; } .alert-info { background: #d1ecf1; border-color: var(--primary); color: #0c5460; } .alert-warning { background: #fff3cd; border-color: var(--warning); color: #856404; } .alert-close { background: none; border: none; font-size: 20px; cursor: pointer; margin-left: auto; color: inherit; opacity: 0.7; } .alert-close:hover { opacity: 1; } /* ===== ПАНЕЛЬ УПРАВЛЕНИЯ ===== */ .control-panel { background: white; border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); display: flex; gap: 15px; align-items: center; flex-wrap: wrap; } .search-box { flex: 1; min-width: 300px; display: flex; gap: 10px; } .search-box input { flex: 1; padding: 12px; border: 2px solid var(--gray); border-radius: var(--radius); font-size: 16px; } .search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); } /* ===== СТАТИСТИКА ===== */ .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; } .stat-card { background: white; border-radius: var(--radius); padding: 25px; text-align: center; box-shadow: var(--shadow); transition: all 0.3s ease; } .stat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); } .stat-icon { font-size: 3rem; margin-bottom: 15px; } .stat-value { font-size: 2.5rem; font-weight: bold; color: var(--primary); margin-bottom: 5px; } .stat-label { color: var(--gray); font-size: 0.9rem; } #overallStats.loading { opacity: 0.7; pointer-events: none; } /* ===== ФОРМА ДОБАВЛЕНИЯ ===== */ .add-form-container { background: white; border-radius: var(--radius-lg); padding: 25px; margin-bottom: 20px; box-shadow: var(--shadow); display: none; border: 2px solid transparent; transition: all 0.3s ease-in-out; opacity: 1; transform: translateY(0); } .add-form-container.show { display: block; animation: slideDown 0.3s ease-out; border-color: var(--primary); } .add-form-container.hidden { opacity: 0; transform: translateY(-20px); pointer-events: none; } .add-form-container h3 { color: var(--dark); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--light); } .form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--light); } @keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } /* ===== ИНФО-БЛОКИ ТАБЛИЦЫ ===== */ .table-info { margin-top: 20px; padding: 15px; background: var(--light); border-radius: var(--radius); display: flex; justify-content: space-between; color: var(--dark); font-size: 14px; } .table-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding: 15px; background: white; border-radius: var(--radius); border: 1px solid #eee; } .table-stats { display: flex; gap: 20px; align-items: center; } .stat-item { display: flex; align-items: center; gap: 8px; } /* ===== ПАГИНАЦИЯ ===== */ .pagination { display: flex; justify-content: center; gap: 5px; margin-top: 30px; } .page-link { padding: 8px 16px; border: 1px solid var(--gray); border-radius: var(--radius); color: var(--dark); text-decoration: none; transition: all 0.3s; cursor: pointer; } .page-link:hover { background: var(--primary); color: white; border-color: var(--primary); } .page-link.active { background: var(--primary); color: white; border-color: var(--primary); cursor: default; } /* ===== БЭДЖИ ===== */ .badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: uppercase; } .badge-success { background: #d5f4e6; color: var(--success); } .badge-danger { background: #fde8e8; color: var(--danger); } .badge-warning { background: #fff3cd; color: var(--warning); } .badge-primary { background: #d6eaf8; color: var(--primary); } /* ===== ЗАГРУЗЧИК ===== */ .loader { width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid var(--primary); border-radius: var(--radius-full); animation: spin 1s linear infinite; margin: 20px auto; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } /* ===== СТИЛИ ДЛЯ СТРАНИЦЫ СТАТИСТИКИ ===== */ .stats-page { padding: 20px; } .page-header { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #eee; } .page-header h1 { margin: 0; color: var(--dark); font-size: 28px; display: flex; align-items: center; gap: 10px; } .page-header .subtitle { color: var(--gray); margin-top: 5px; font-size: 16px; } .stats-section { background: white; border-radius: var(--radius-lg); padding: 25px; margin-bottom: 30px; box-shadow: var(--shadow); } .stats-section h2 { margin-top: 0; margin-bottom: 25px; color: var(--dark); font-size: 22px; display: flex; align-items: center; gap: 10px; } .detail-stats-tabs { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; } .tab-btn { padding: 12px 20px; background: white; border: 2px solid #dee2e6; border-radius: var(--radius); color: #495057; font-weight: 600; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden; min-width: 100px; text-align: center; } .tab-btn:hover { background: #f8f9fa; border-color: var(--primary); } .tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); } .tab-btn::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--primary); transform: scaleX(0); transition: transform 0.3s; } .tab-btn:hover::after { transform: scaleX(1); } .tab-btn.active::after { transform: scaleX(1); background: white; } .detail-stats-content { background: var(--light); border-radius: var(--radius); padding: 25px; border: 1px solid #dee2e6; } .tab-content { display: none; } .tab-content.active { display: block; } .tab-loading, .tab-error { text-align: center; padding: 40px; color: var(--gray); font-size: 16px; display: flex; flex-direction: column; align-items: center; gap: 15px; } .tab-error { color: var(--danger); } .error-icon { font-size: 40px; } .tab-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: center; } .detail-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 25px; } .detail-stat-card { background: white; border-radius: var(--radius); padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 1px solid #eee; overflow-x: hidden; } .detail-stat-card h3 { margin-top: 0; margin-bottom: 15px; color: var(--dark); font-size: 18px; padding-bottom: 10px; border-bottom: 1px solid #eee; } .detail-stat-card table { width: 100%; table-layout: fixed; border-collapse: collapse; min-width: 600px; } .detail-stat-card th, .detail-stat-card td { padding: 10px; text-align: left; border-bottom: 1px solid #eee; word-wrap: break-word; } .detail-stat-card th:last-child, .detail-stat-card td:last-child { text-align: center; width: 80px; } .detail-stat-card th:first-child, .detail-stat-card td:first-child { width: auto; } .detail-stat-card .table-wrapper { margin: 0 -20px; padding: 0 20px; overflow-x: auto; } .mini-stats { display: flex; flex-direction: column; gap: 10px; } .mini-stat { display: flex; align-items: center; gap: 15px; padding: 10px; background: #f8f9fa; border-radius: var(--radius-sm); transition: background 0.2s; } .mini-stat:hover { background: #e9ecef; } .mini-stat-icon { font-size: 20px; width: 30px; text-align: center; } .mini-stat-label { flex: 1; font-size: 14px; color: #495057; } .mini-stat-value { font-weight: bold; color: var(--dark); font-size: 16px; min-width: 50px; text-align: right; } .mini-stat-percentage { font-size: 12px; color: #6c757d; min-width: 60px; text-align: right; } .stats-comparison { display: flex; flex-direction: column; gap: 15px; } .comparison-item { position: relative; } .comparison-label { font-size: 14px; color: #495057; margin-bottom: 5px; } .comparison-value { position: absolute; right: 0; top: 0; font-weight: bold; color: var(--dark); } .comparison-bar { height: 20px; background: linear-gradient(90deg, var(--primary), var(--success)); border-radius: 10px; transition: width 1s ease-out; } .detail-stats-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; } .stats-info { background: #e3f2fd; border-radius: 8px; padding: 15px; margin-top: 20px; border-left: 4px solid #2196f3; } .stats-info p { margin: 5px 0; color: #1565c0; font-size: 14px; } .chart-item { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 5px; } .chart-color { width: 12px; height: 12px; border-radius: 2px; display: inline-block; } .chart-label { flex: 1; display: flex; align-items: center; gap: 8px; } .chart-bar { height: 8px; background: linear-gradient(90deg, #3498db, #2ecc71); border-radius: 4px; transition: width 1s ease-out; } .country-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f8f9fa; border-radius: 6px; margin-bottom: 6px; } .country-flag { font-size: 20px; } .country-name { flex: 1; font-weight: 500; } /* ===== РЕДАКТИРОВАНИЕ В ТАБЛИЦЕ ===== */ tr.edit-mode { background-color: #fff9e6 !important; animation: editPulse 2s infinite; } tr.edit-mode td { background-color: #fff9e6; border-color: #f39c12; } .edit-input { width: 100%; padding: 8px 12px; border: 2px solid #3498db; border-radius: 6px; font-size: 14px; font-family: inherit; background: white; transition: all 0.3s; } .edit-input:focus { outline: none; border-color: #2980b9; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); } .edit-input-small { width: 80px; text-align: center; } .edit-input::placeholder { color: #bdc3c7; } @keyframes editPulse { 0% { background-color: #fff9e6; } 50% { background-color: #fff3cd; } 100% { background-color: #fff9e6; } } .action-buttons { display: flex; gap: 5px; flex-wrap: nowrap; } .action-buttons .btn-small { padding: 6px 10px; font-size: 12px; min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; } button:disabled { opacity: 0.5; cursor: not-allowed !important; } button:disabled:hover { transform: none !important; box-shadow: none !important; } /* ===== БЕЙДЖИ СТАТУСОВ И РОЛЕЙ ===== */ .status-badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; } .status-active { background: #d5f4e6; color: #27ae60; } .status-inactive { background: #fde8e8; color: #e74c3c; } .status-banned { background: #fff3cd; color: #f39c12; } .role-badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; } .role-root { background: #ffd8d8; color: #c0392b; } .role-admin { background: #d6eaf8; color: #2980b9; } .role-editor { background: #d5f4e6; color: #27ae60; } .role-viewer { background: #fcf3cf; color: #f39c12; } /* ===== СЧЕТЧИК МОДЕЛЕЙ ===== */ .models-count-badge { display: inline-block; background: #3498db; color: white; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; min-width: 30px; text-align: center; transition: background 0.3s; } .models-count-badge:hover:not(.zero) { background: #2980b9; cursor: pointer; } .models-count-badge.zero { background: #95a5a6; cursor: default; } /* ===== АДАПТИВНОСТЬ ===== */ @media (max-width: 768px) { .admin-layout { flex-direction: column; } .admin-nav { width: 100%; height: auto; } .admin-nav.collapsed { width: 100%; height: 60px; } .nav-items { display: flex; overflow-x: auto; padding: 10px; } .nav-item { flex-shrink: 0; } .nav-divider, .nav-footer { display: none; } .form-row { flex-direction: column; gap: 10px; } .control-panel { flex-direction: column; align-items: stretch; } .search-box { min-width: auto; } .table-info { flex-direction: column; gap: 10px; align-items: center; } .detail-stats-grid { grid-template-columns: 1fr; } .detail-stats-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 10px; } .tab-btn { white-space: nowrap; } .detail-stats-actions { flex-direction: column; } .detail-stats-actions .btn { width: 100%; } .logo-modal-content { width: 95vw; max-height: 85vh; } .logo-modal-body { padding: 20px; } .logo-modal-actions { flex-direction: column; width: 100%; } .logo-modal-btn { width: 100%; } }