@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

        :root {
            --bg-color: #0f172a;
            --sidebar-bg: #020617;
            --sidebar-text: #f8fafc;
            --sidebar-hover: #1e293b;
            --sidebar-active-bg: #4f46e5; /* Indigo 600 */
            --sidebar-active-text: #ffffff;
            
            --main-bg: #0f172a;
            --card-bg: #1e293b; /* Slate 800 */
            --text-primary: #f8fafc;
            --text-secondary: #94a3b8;
            --border-color: #334155; /* Slate 700 */
            --accent-primary: #6366f1; /* Indigo 500 */
            --accent-primary-hover: #4f46e5;
            --table-header-bg: #0f172a;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--main-bg);
            color: var(--text-primary);
            display: flex;
            height: 100vh;
            overflow: hidden;
            color-scheme: dark;
        }

        /* Sidebar */
        .sidebar {
            width: 260px;
            background-color: var(--sidebar-bg);
            color: var(--sidebar-text);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        
        .sidebar-header .logo {
            font-weight: 700;
            font-size: 20px;
        }

        .logo {
            width: 36px;
            height: 36px;
            background-color: white;
            color: var(--sidebar-bg);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 18px;
        }

        .nav-menu {
            list-style: none;
            padding: 15px 0;
            flex: 1;
        }

        .nav-item {
            padding: 12px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 14px;
            margin: 4px 12px;
            border-radius: 8px;
        }

        .nav-item:hover {
            background-color: rgba(255,255,255,0.1);
        }

        .nav-item-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .nav-item.active {
            background-color: var(--sidebar-active-bg);
            color: var(--sidebar-active-text);
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        }

        .nav-item i.fa-chevron-right, .nav-item i.fa-chevron-down {
            font-size: 10px;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            padding: 20px;
            gap: 20px;
        }

        /* Top Charts Section */
        .charts-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            min-height: 350px;
        }

        .card {
            background-color: var(--card-bg);
            border-radius: 12px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border-color);
            padding: 24px;
            display: flex;
            flex-direction: column;
        }

        .card-header {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 20px;
        }

        .chart-container {
            flex: 1;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .map-section {
            display: flex;
            gap: 20px;
            height: 100%;
            flex: 1;
            width: 100%;
        }

        .map-visual {
            flex: 1;
            background-image: url('https://upload.wikimedia.org/wikipedia/commons/8/80/World_map_-_low_resolution.svg');
            background-size: 100% 100%;
            background-repeat: no-repeat;
            background-position: center;
            opacity: 0.7;
            position: relative;
            min-height: 250px;
            min-width: 50%;
            aspect-ratio: 2 / 1;
            max-width: 700px;
            margin: 0 auto;
        }

        .map-list {
            width: 200px;
            overflow-y: auto;
            font-size: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .map-list-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .map-list-item-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .flag {
            width: 16px;
            height: 12px;
            border-radius: 2px;
            background-color: #262626;
            display: inline-block;
        }

        /* Tabs */
        .tabs-row {
            display: none;
        }

        /* Filters */
        .filters-row {
            display: flex;
            align-items: center;
            gap: 10px;
            background-color: var(--card-bg);
            padding: 10px 15px;
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            flex-wrap: wrap;
        }

        .filter-btn {
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background-color: var(--card-bg);
            color: var(--text-primary);
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }
        
        .filter-btn.dark {
            background-color: var(--accent-primary);
            color: white;
            border-color: var(--accent-primary);
        }

        .filter-input {
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 13px;
            outline: none;
            flex: 1;
            min-width: 150px;
            background-color: var(--card-bg);
            color: var(--text-primary);
        }
        
        .filter-actions {
            margin-left: auto;
            display: flex;
            gap: 10px;
        }

        /* Table */
        .table-container {
            background-color: var(--card-bg);
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            overflow: auto;
            flex: 1;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        th, td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
        }

        th {
            font-weight: 600;
            color: var(--text-secondary);
            position: sticky;
            top: 0;
            background-color: var(--card-bg);
        }

        .checkbox-cell {
            width: 40px;
            text-align: center;
        }

        .action-cell {
            text-align: right;
            color: var(--text-secondary);
            cursor: pointer;
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            align-items: center;
            justify-content: center;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background-color: var(--card-bg);
            padding: 25px;
            border-radius: 8px;
            width: 400px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .modal-header {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .close-btn {
            cursor: pointer;
            color: var(--text-secondary);
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .form-group input {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 14px;
            outline: none;
            background-color: #000;
            color: var(--text-primary);
        }

        .btn-primary {
            background-color: var(--accent-primary);
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 6px;
            cursor: pointer;
            width: 100%;
            font-weight: 600;
        }
        
        .btn-primary:hover {
            opacity: 0.9;
        }

        /* ─── Right Detail Sidebar ─── */
        .detail-sidebar {
            position: fixed;
            top: 0;
            right: 0;
            width: 400px;
            height: 100vh;
            background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
            border-left: 1px solid #334155;
            z-index: 1000;
            overflow-y: auto;
            transform: translateX(100%);
            transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: -8px 0 32px rgba(0,0,0,0.5);
            padding: 0;
            display: flex;
            flex-direction: column;
        }

        .detail-sidebar.open {
            transform: translateX(0);
        }

        .detail-sidebar-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.45);
            z-index: 999;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        .detail-sidebar-overlay.show {
            opacity: 1;
            pointer-events: all;
        }

        .ds-header {
            padding: 20px 20px 16px;
            border-bottom: 1px solid #334155;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            position: sticky;
            top: 0;
            background: #1e293b;
            z-index: 2;
        }

        .ds-header-left { flex: 1; min-width: 0; }

        .ds-title {
            font-size: 15px;
            font-weight: 700;
            color: #f8fafc;
            word-break: break-word;
            line-height: 1.4;
        }

        .ds-sub {
            font-size: 11px;
            color: #94a3b8;
            margin-top: 4px;
        }

        .ds-close {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            border: 1px solid #334155;
            background: transparent;
            color: #94a3b8;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.15s;
        }
        .ds-close:hover { background: #ef4444; color: white; border-color: #ef4444; }

        .ds-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }

        .ds-section { display: flex; flex-direction: column; gap: 8px; }

        .ds-section-title {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #6366f1;
            border-bottom: 1px solid #1e3a5f;
            padding-bottom: 6px;
        }

        .ds-row {
            display: flex;
            gap: 10px;
            align-items: flex-start;
            font-size: 12px;
        }
        .ds-row-label {
            min-width: 110px;
            color: #94a3b8;
            font-weight: 500;
            flex-shrink: 0;
        }
        .ds-row-value {
            color: #f1f5f9;
            word-break: break-word;
            flex: 1;
        }

        .ds-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 10px;
            font-weight: 600;
            background: #334155;
            color: #f1f5f9;
            margin: 2px 2px 0 0;
        }
        .ds-badge.danger { background: rgba(239,68,68,0.2); color: #f87171; }
        .ds-badge.success { background: rgba(34,197,94,0.15); color: #4ade80; }
        .ds-badge.info { background: rgba(99,102,241,0.2); color: #a5b4fc; }
        .ds-badge.warn { background: rgba(245,158,11,0.2); color: #fbbf24; }

        .ds-hibp-box {
            border-radius: 10px;
            border: 1px solid #334155;
            padding: 12px 14px;
            background: rgba(0,0,0,0.2);
        }
        .ds-hibp-box.breach-found { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.06); }
        .ds-hibp-box.breach-safe { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.05); }

        .ds-hibp-count {
            font-size: 28px;
            font-weight: 800;
            color: #ef4444;
        }
        .ds-hibp-count.safe { color: #4ade80; font-size: 16px; }

        .ds-loading {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #94a3b8;
            font-size: 12px;
            padding: 6px 0;
        }
        .ds-spinner {
            width: 14px; height: 14px;
            border: 2px solid #334155;
            border-top-color: #6366f1;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            flex-shrink: 0;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        .ds-pwned-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
        .ds-pwned-item {
            font-size: 11px;
            padding: 6px 10px;
            border-radius: 6px;
            background: rgba(0,0,0,0.25);
            border: 1px solid #334155;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }
        .ds-pwned-item strong { color: #f1f5f9; font-size: 12px; }
        .ds-pwned-item span { color: #94a3b8; white-space: nowrap; }

        .ds-row a { color: #818cf8; text-decoration: none; }
        .ds-row a:hover { text-decoration: underline; }

        tr.selected-row { background: rgba(99,102,241,0.12) !important; }
        tr { cursor: pointer; }
        tr:hover { background: rgba(255,255,255,0.03); }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #f87171;
    text-decoration: none;
}

/* Subscribe Ransomware ID Button */
.btn-subscribe-ransomware {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-subscribe-ransomware::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.5s ease;
}

.btn-subscribe-ransomware:hover::before {
    left: 100%;
}

.btn-subscribe-ransomware:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.btn-subscribe-ransomware i {
    font-size: 16px;
    animation: pulseIcon 2s infinite;
}

@keyframes pulseIcon {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.ransomware-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(5px);
}

.ransomware-banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ransomware-banner-icon {
    font-size: 30px;
    color: #ef4444;
}

.ransomware-banner-text h3 {
    margin: 0;
    color: white;
    font-size: 15px;
    font-weight: 600;
}

.ransomware-banner-text p {
    margin: 4px 0 0 0;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Executive Dashboard Styles */
.exec-kpi-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.exec-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.badge-threat-critical {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-threat-high {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.tabs-row {
    display: none !important;
}