/* Cyber Security Admin Dashboard - Точная копия референса */

:root {
    /* Основные цвета фона - точно как в референсе */
    --bg-primary: #030712;
    --bg-secondary: #111827;
    --bg-tertiary: #1F2937;
    --bg-card: #1F2937;
    --bg-sidebar: #111827;
    --bg-header: #111827;
    --bg-input: #1F2937;
    
    /* Текст */
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    
    /* Акценты - фиолетовая палитра из референса */
    --accent-primary: #A855F7;
    --accent-secondary: #9333EA;
    --accent-hover: #C084FC;
    --accent-light: rgba(168, 85, 247, 0.15);
    --accent-bg: rgba(168, 85, 247, 0.1);
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #A855F7 0%, #3B82F6 100%);
    --gradient-purple: linear-gradient(135deg, #A855F7 0%, #9333EA 100%);
    --gradient-blue: linear-gradient(135deg, #3B82F6 0%, #0EA5E9 100%);
    --gradient-pink: linear-gradient(135deg, #EC4899 0%, #F472B6 100%);
    
    /* Статусы */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Границы и тени */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    display: flex;
}

/* Боковая панель - полностью скрыта в свернутом виде */
.sidebar {
    width: 0;
    background: var(--bg-sidebar);
    border-right: none;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sidebar.expanded {
    width: 280px;
    border-right: 1px solid var(--border);
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    position: relative;
}

.sidebar.expanded .sidebar-header {
    justify-content: space-between;
}

.sidebar-logo {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.sidebar.expanded .sidebar-logo {
    opacity: 1;
    width: auto;
    overflow: visible;
}

.sidebar-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    white-space: nowrap;
}

/* Кнопка сворачивания - всегда видна, прижата к левому краю */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: var(--accent-primary);
    border: none;
    border-radius: 0 12px 12px 0;
    width: 32px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
    z-index: 1002;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.sidebar.expanded .sidebar-toggle {
    left: 280px;
    border-radius: 12px 0 0 12px;
}

.sidebar-toggle:hover {
    background: var(--accent-hover);
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 25px rgba(168, 85, 247, 0.5);
}

.sidebar-toggle .toggle-icon-expand {
    display: block;
}

.sidebar-toggle .toggle-icon-collapse {
    display: none;
}

.sidebar.expanded .sidebar-toggle .toggle-icon-expand {
    display: none;
}

.sidebar.expanded .sidebar-toggle .toggle-icon-collapse {
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.sidebar.expanded .sidebar-nav {
    align-items: stretch;
    padding: 1rem 0;
}

.nav-section {
    width: 100%;
    margin-bottom: 1.5rem;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.sidebar.expanded .nav-section {
    opacity: 1;
    height: auto;
    overflow: visible;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    background: transparent;
}

.sidebar.expanded .nav-item {
    width: auto;
    justify-content: flex-start;
    padding: 0.75rem 1.5rem;
    margin: 0;
    gap: 1rem;
}

.nav-item:hover {
    background: var(--accent-bg);
    color: var(--accent-primary);
}

.nav-item.active {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-primary);
    border-radius: 0 2px 2px 0;
}

.sidebar.expanded .nav-item.active::before {
    display: block;
}

.sidebar:not(.expanded) .nav-item.active::before {
    display: none;
}

.nav-item svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.nav-item-text {
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.sidebar.expanded .nav-item-text {
    opacity: 1;
    width: auto;
    overflow: visible;
}

.sidebar-footer {
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    display: none;
    justify-content: center;
}

.sidebar.expanded .sidebar-footer {
    display: flex;
    justify-content: flex-start;
}

.logout-item {
    color: var(--text-secondary);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.sidebar.expanded .logout-item {
    width: auto;
    padding: 0.75rem 1.5rem;
    justify-content: flex-start;
    gap: 1rem;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* Основной контент */
.main-wrapper {
    flex: 1;
    margin-left: 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.expanded ~ .main-wrapper {
    margin-left: 280px;
}

/* Верхняя панель удалена */

/* Основной контент */
.main-content {
    flex: 1;
    padding: 2rem;
    width: 100%;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

/* Переопределение для страниц модулей - более высокий приоритет */
.projects-page h1,
.tables-page h1,
.finance-page h1,
.experiments-page h1,
.tasks-page h1,
.links-page h1,
.vault-page h1,
.xmap-page h1,
.reports-page h1,
.logs-page h1 {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    margin: 0 0 0.5rem 0 !important;
    background: var(--gradient-primary) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Кнопки - точно как в референсе */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn::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.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--gradient-pink);
}

.btn-danger:hover {
    box-shadow: var(--shadow-lg), 0 0 20px rgba(236, 72, 153, 0.3);
}

/* Карточки - современный дизайн */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card-modern {
    padding: 1.75rem;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-xl), 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.card-header-left {
    flex: 1;
}

.card-title {
    margin: 0 0 0.375rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-hint {
    display: block;
    margin-top: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--bg-tertiary);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Таблицы - современный дизайн */
.table-container-modern {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.table-modern thead {
    background: transparent;
}

.table-modern th {
    padding: 1rem 1.25rem;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-modern td {
    padding: 1.25rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.table-modern tbody tr {
    transition: all 0.2s ease;
    background: transparent;
}

.table-modern tbody tr:hover {
    background: var(--accent-bg);
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-cell-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-domain {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--accent-primary);
    font-weight: 500;
    transition: all 0.2s;
}

.table-action-link:hover {
    color: var(--accent-hover);
    gap: 0.5rem;
}

/* Статусы - точно как в референсе */
.status {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-paused {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-archived {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-secondary);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Алерты */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.alert-info {
    background: var(--accent-light);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Ссылки */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Быстрые действия */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.1), transparent);
    transition: left 0.5s;
}

.quick-action-btn:hover::before {
    left: 100%;
}

.quick-action-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.quick-action-primary {
    background: var(--accent-light);
    border-color: var(--accent-primary);
}

.quick-action-primary:hover {
    background: var(--accent-bg);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(168, 85, 247, 0.2);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
    transition: all 0.3s;
}

.quick-action-primary .quick-action-icon {
    background: var(--accent-primary);
    color: white;
}

.quick-action-btn:hover .quick-action-icon {
    transform: scale(1.1);
}

.quick-action-content {
    flex: 1;
    min-width: 0;
}

.quick-action-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.quick-action-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Дашборд */
.dashboard {
    width: 100%;
    max-width: 100%;
}

.dashboard-header {
    margin-bottom: 2.5rem;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Статистические карточки - современный дизайн */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card-primary::before {
    background: var(--gradient-primary);
    opacity: 1;
}

.stat-card-success::before {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    opacity: 1;
}

.stat-card-warning::before {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    opacity: 1;
}

.stat-card-muted::before {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), 0 10px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--border-hover);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
    transition: all 0.3s;
}

.stat-card-success .stat-card-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stat-card-warning .stat-card-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.stat-card-muted .stat-card-icon {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-secondary);
}

.stat-card:hover .stat-card-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-card-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-card-value {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-card-change {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary);
}

.stat-card-change.positive {
    color: var(--success);
}

.stat-card-change.negative {
    color: var(--error);
}

.stat-card-change svg {
    flex-shrink: 0;
}

.stat-card-danger::before {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    opacity: 1;
}

.stat-card-danger .stat-card-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

/* Заголовок страницы */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.page-header-left {
    flex: 1;
}

.page-header-right {
    flex-shrink: 0;
}

/* Фильтры */
.filters-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters-form .form-select,
.filters-form .form-input {
    flex: 1;
    min-width: 150px;
}

/* Действия в таблице */
.table-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.table-action-link:hover {
    color: var(--accent-hover);
    gap: 0.5rem;
}

.table-action-danger {
    color: var(--error) !important;
}

.table-action-danger:hover {
    color: #DC2626 !important;
}

/* Утилита для центрирования текста */
.text-center {
    text-align: center;
}

/* Overlay для мобильного меню */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .search-box {
        min-width: 200px;
    }
}

@media (max-width: 1024px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.875rem;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .card-modern {
        padding: 1.25rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-card-value {
        font-size: 2.25rem;
    }
    
    .table-modern {
        font-size: 0.875rem;
    }
    
    .table-modern th, 
    .table-modern td {
        padding: 0.875rem 0.75rem;
    }
}

@media (max-width: 480px) {
    
    h1 {
        font-size: 1.75rem;
    }
    
    .stat-card-value {
        font-size: 2rem;
    }
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}
