/* Cyber Security Admin Dashboard - По референсу VertexGuard */
/* https://dribbble.com/shots/24226328-Cyber-Security-Admin-Dashboard-UI-Design */

/* Шрифт Reddit Sans */
@import url('https://fonts.googleapis.com/css2?family=Reddit+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Точные цвета из референса */
    --bg-primary: #030712;
    --bg-secondary: #111827;
    --bg-tertiary: #1F2937;
    --bg-card: #1F2937;
    --bg-sidebar: #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);

    /* Цвета карточек статистики из референса */
    --pink: #EC4899;
    --red: #EF4444;
    --blue: #3B82F6;
    --cyan: #0EA5E9;
    --green: #10B981;
    --orange: #F59E0B;
    --yellow: #FBBF24;

    /* Градиенты */
    --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);
    --border-color: #374151;
    --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);

    /* Размеры sidebar */
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   SIDEBAR - Всегда видимый как в референсе
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Скрыть кнопку toggle - sidebar всегда видим */
.sidebar-toggle {
    display: none;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-logo a::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
}

/* Навигация sidebar */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0.75rem 1.25rem 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.nav-item:hover {
    background: rgba(168, 85, 247, 0.08);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item:hover svg,
.nav-item.active svg {
    opacity: 1;
}

.nav-item-text {
    white-space: nowrap;
}

/* Субменю с стрелкой */
.nav-item-arrow {
    margin-left: auto;
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

/* Footer sidebar */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

/* Upgrade card в sidebar */
.sidebar-upgrade {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 0 0.75rem 1rem;
    text-align: center;
}

.sidebar-upgrade-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.5rem;
}

.sidebar-upgrade-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.sidebar-upgrade-link {
    font-size: 0.8rem;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* Logout */
.logout-item {
    color: var(--text-secondary) !important;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--error) !important;
}

/* ============================================
   MAIN WRAPPER
   ============================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   TOP HEADER - Как в референсе
   ============================================ */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header-welcome {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.header-center {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.header-icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    padding: 1.5rem 2rem;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
    width: 100%;
}

.dashboard-header {
    margin-bottom: 1.5rem;
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.dashboard-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   STATS CARDS - Как в референсе Current Risk
   ============================================ */
.stats-grid {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    min-width: 180px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* Иконка в цветном круге - как в референсе */
.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stat-card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
    position: relative;
    z-index: 1;
}

/* Цветные варианты иконок как в референсе */
.stat-card-pink .stat-card-icon {
    background: var(--pink);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.stat-card-red .stat-card-icon {
    background: var(--red);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.stat-card-blue .stat-card-icon {
    background: var(--blue);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.stat-card-cyan .stat-card-icon {
    background: var(--cyan);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.stat-card-green .stat-card-icon {
    background: var(--green);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.stat-card-orange .stat-card-icon {
    background: var(--orange);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.stat-card-purple .stat-card-icon {
    background: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

/* Старые классы для совместимости */
.stat-card-primary .stat-card-icon {
    background: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.stat-card-success .stat-card-icon {
    background: var(--green);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.stat-card-warning .stat-card-icon {
    background: var(--orange);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.stat-card-muted .stat-card-icon {
    background: var(--text-muted);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4);
}

.stat-card-danger .stat-card-icon {
    background: var(--red);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.stat-card-content {
    width: 100%;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-card-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-change {
    display: none; /* Скрыто, как в референсе */
}

/* Dropdown в карточке */
.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.stat-card-menu {
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.stat-card-menu:hover {
    color: var(--text-primary);
}

/* ============================================
   DASHBOARD GRID - Как в референсе
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================================
   CARDS - Общие стили
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.card-modern {
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-header-left {
    flex: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

/* Select dropdown в карточке */
.card-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.card-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: var(--error);
}

.btn-danger:hover {
    background: #DC2626;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   TABLES
   ============================================ */
.table-container-modern {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
}

.table-modern thead {
    background: rgba(255, 255, 255, 0.02);
}

.table-modern th {
    padding: 0.875rem 1rem;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-modern td {
    padding: 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.table-modern tbody tr {
    transition: background 0.15s;
}

.table-modern tbody tr:hover {
    background: rgba(168, 85, 247, 0.05);
}

.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.8rem;
}

.table-actions {
    display: flex;
    gap: 0.75rem;
}

.table-action-link {
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.table-action-link:hover {
    color: var(--accent-hover);
}

.table-action-danger {
    color: var(--error) !important;
}

.table-action-danger:hover {
    color: #DC2626 !important;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-paused {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-archived {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-secondary);
}

.status-ok {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.status-indexing {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.alert-info {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--accent-primary);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.quick-action-primary {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.quick-action-primary .quick-action-icon {
    background: var(--accent-primary);
    color: white;
}

.quick-action-content {
    flex: 1;
}

.quick-action-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-action-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-header-left {
    flex: 1;
}

.page-header-right {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ============================================
   FILTERS
   ============================================ */
.filters-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.filters-form .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

/* ============================================
   UTILITIES
   ============================================ */
.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; }

.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; }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* Links */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 1.75rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }

    .main-content {
        padding: 1.25rem 1.5rem;
    }

    .stats-grid {
        flex-wrap: wrap;
    }

    .stat-card {
        min-width: calc(50% - 0.5rem);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
        cursor: pointer;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .top-header {
        padding: 1rem;
        padding-left: 4rem;
    }

    .header-center {
        display: none;
    }

    .main-content {
        padding: 1rem;
    }

    .stat-card {
        min-width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .top-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-user-info {
        display: none;
    }

    .filters-form {
        flex-direction: column;
    }

    .filters-form .form-group {
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   SIDEBAR OVERLAY (Mobile)
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   RISK SCORE CARD - Как в референсе
   ============================================ */
.risk-score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.risk-score-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.risk-score-circle {
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
    position: relative;
}

.risk-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.risk-score-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.risk-score-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: var(--orange);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* ============================================
   CHART PLACEHOLDER
   ============================================ */
.chart-placeholder {
    height: 200px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   DONUT CHART (Threats by Virus)
   ============================================ */
.donut-chart-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.donut-chart {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.donut-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ============================================
   THREAT BY DEVICE
   ============================================ */
.device-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.device-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.device-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.device-info {
    flex: 1;
}

.device-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.device-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.device-status {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}
