@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&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;

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --header-height: 58px;
}

/* Modern Reset & Base Rules */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--main-bg);
    color: var(--text-primary);
    color-scheme: dark;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow: hidden;
}

/* Custom Sleek Dark Scrollbars (Windows & Modern Browsers) */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 999px;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* App Root Container */
body {
    display: flex;
    flex-direction: row;
    position: relative;
}

/* ==========================================================================
   Top Mobile Header Bar
   ========================================================================== */
.mobile-navbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(2, 6, 23, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1100;
    width: 100%;
    height: var(--header-height);
    flex-shrink: 0;
}

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

.mobile-menu-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    transform: scale(0.95);
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: #f8fafc;
}

.mobile-brand img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-action-btn {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 1050;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    background-color: var(--sidebar-bg);
    z-index: 2;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    color: #f8fafc;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
}

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

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.sidebar-close-btn:hover {
    color: #f87171;
}

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

.nav-title {
    padding: 10px 20px 6px;
    font-size: 10px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
    letter-spacing: 0.08em;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item {
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    margin: 3px 10px;
    border-radius: 8px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

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

.nav-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item-left i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.main-content {
    flex: 1;
    min-width: 0; /* Important for flex child overflow */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Cards & Generic Containers */
.card {
    background-color: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.card-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==========================================================================
   Executive Dashboard Responsive Elements
   ========================================================================== */
.exec-header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.85));
    padding: 20px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.exec-header-title {
    margin: 0;
    font-size: 1.35rem;
    color: #f8fafc;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    word-break: break-word;
}

.exec-header-sub {
    margin: 4px 0 0 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.exec-header-badges {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* KPI Metric Cards Grid */
.exec-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.exec-kpi-card {
    padding: 16px;
    background: rgba(15, 23, 42, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border-radius: 12px;
}

.exec-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.exec-kpi-val {
    font-size: 22px;
    font-weight: 800;
    color: #f8fafc;
    margin-top: 8px;
    line-height: 1.2;
}

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

/* 2-Column Responsive Layout Grid */
.exec-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* 3-Column Visual Analytics Chart Grid */
.exec-charts-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.exec-chart-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.exec-chart-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
}

/* Range Selector (Timeframe) */
.exec-range-box {
    display: flex;
    gap: 3px;
    background: rgba(15, 23, 42, 0.85);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.exec-range-box::-webkit-scrollbar {
    display: none;
}

.exec-range-btn {
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.exec-range-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

.exec-range-btn.active {
    color: #ffffff;
    background: #3b82f6;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

/* Timeline Feed Grid */
.exec-timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

/* Global Threat Map */
.exec-map-container {
    height: 380px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f172a;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Charts & Map View (Infostealer)
   ========================================================================== */
.charts-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.chart-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    width: 100%;
    overflow: hidden;
}

.map-section {
    display: flex;
    gap: 16px;
    width: 100%;
    flex: 1;
    min-height: 260px;
    align-items: center;
}

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

.map-list {
    width: 180px;
    max-height: 260px;
    overflow-y: auto;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    padding-right: 4px;
}

.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;
}

/* ==========================================================================
   Filters & Search Bar
   ========================================================================== */
.filters-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--card-bg);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    margin-top: 0;
}

.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: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.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: 160px;
    background-color: rgba(15, 23, 42, 0.7);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.filter-input:focus {
    border-color: var(--accent-primary);
}

.filter-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Tables & Pagination Controls
   ========================================================================== */
.table-container {
    background-color: var(--card-bg);
    border-radius: 10px 10px 0 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-height: 260px;
    flex: none;
    position: relative;
}

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

th, td {
    padding: 13px 16px;
    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);
    z-index: 2;
    white-space: nowrap;
}

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

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

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

tr {
    cursor: pointer;
    transition: background 0.15s;
}

tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Main Pagination Bar */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: rgba(15, 23, 42, 0.85);
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================================================
   Right Detail Sidebar Panel
   ========================================================================== */
.detail-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(440px, 100vw);
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
    border-left: 1px solid #334155;
    z-index: 1250;
    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.6);
    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.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1240;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.ds-header {
    padding: 18px 20px 14px;
    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: 32px;
    height: 32px;
    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: 100px;
    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; }

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop, .modal {
    display: none;
    position: fixed;
    z-index: 1300;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: min(800px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    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(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.close-modal:hover, .close-btn:hover {
    color: #f87171;
}

/* ==========================================================================
   Admin Panel Responsive Grids
   ========================================================================== */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 130px 140px;
    gap: 12px;
    align-items: end;
}

.admin-tabs-header {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   DRP (Digital Risk Protection) Responsive Elements
   ========================================================================== */
.drp-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.drp-asset-form {
    display: flex;
    gap: 10px;
    max-width: 650px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Banner & Utility Components
   ========================================================================== */
.ransomware-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    backdrop-filter: blur(5px);
}

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

.ransomware-banner-icon {
    font-size: 28px;
    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;
}

.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;
    white-space: nowrap;
}

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

.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);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (Windows, Mac, iPad, Smartphone)
   ========================================================================== */

/* Medium Devices (Tablets, Split-screen Windows/Mac <= 1024px) */
@media (max-width: 1024px) {
    .exec-grid-2col {
        grid-template-columns: 1fr;
    }

    .exec-charts-grid-3 {
        grid-template-columns: 1fr;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .admin-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Small / Tablet Devices (<= 992px) */
@media (max-width: 992px) {
    body {
        flex-direction: column;
    }

    .mobile-navbar {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(290px, 85vw);
        height: 100%;
        height: 100dvh;
        z-index: 1200;
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.85);
    }

    .sidebar-close-btn {
        display: flex;
    }

    .main-content {
        padding: 16px;
        gap: 16px;
    }

    .admin-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* Smartphone Portrait & Landscape (<= 768px) */
@media (max-width: 768px) {
    .main-content {
        padding: 12px;
        gap: 14px;
    }

    .card {
        padding: 16px;
        border-radius: 12px;
    }

    .exec-header-box {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 14px;
    }

    .exec-header-title {
        font-size: 1.15rem;
    }

    .exec-header-badges {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 12px;
    }

    .exec-header-badges > div {
        text-align: left !important;
        border-right: none !important;
        padding-right: 0 !important;
    }

    .exec-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .exec-kpi-val {
        font-size: 18px;
    }

    .exec-threat-map-container {
        height: 290px;
    }

    .charts-row {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 14px;
    }

    .chart-container {
        min-height: 200px;
        height: 220px;
    }

    .table-container {
        min-height: 240px;
        border-radius: 10px 10px 0 0;
    }

    .map-section {
        flex-direction: column;
    }

    .map-list {
        width: 100%;
        max-height: 180px;
    }

    .filters-row {
        padding: 10px 12px;
        gap: 8px;
    }

    .filter-search-wrap {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    .filter-input {
        width: 100%;
        flex: 1 1 100%;
        font-size: 12px;
    }

    .filter-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .drp-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .drp-asset-form {
        flex-direction: column;
    }

    .drp-asset-form > * {
        width: 100% !important;
    }

    .ransomware-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-subscribe-ransomware {
        width: 100%;
        justify-content: center;
    }

    .pagination-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Extra Small Smartphones (<= 480px) */
@media (max-width: 480px) {
    .exec-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .exec-kpi-card {
        padding: 12px;
    }

    .exec-kpi-val {
        font-size: 16px;
    }

    .detail-sidebar {
        width: 100vw;
    }

    .modal-content {
        padding: 16px;
        width: 96vw;
    }
}

/* ==========================================================================
   Leaflet Map Dark Theme Overrides
   ========================================================================== */
.leaflet-container {
    background: #090d16 !important;
    font-family: inherit !important;
}

.leaflet-control-zoom a {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

.leaflet-control-zoom a:hover {
    background: #334155 !important;
}

.leaflet-control-attribution {
    background: rgba(15, 23, 42, 0.8) !important;
    color: #94a3b8 !important;
    font-size: 10px !important;
}

.leaflet-control-attribution a {
    color: #60a5fa !important;
}

/* ==========================================================================
   Visitor Map Overlay Widgets (Top Country & Top ASN)
   ========================================================================== */
.visitor-map-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.visitor-map-widget {
    position: absolute;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    width: 220px;
    max-width: calc(100% - 24px);
    transition: all 0.2s ease;
    pointer-events: auto;
}

.visitor-map-widget:hover {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(99, 102, 241, 0.35);
}

.visitor-widgets-top-group {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    pointer-events: none;
}

.visitor-widgets-top-group .visitor-map-widget {
    position: static;
    pointer-events: auto;
}

.visitor-widget-top-right {
    top: 12px;
    right: 12px;
}

.visitor-widget-bottom-right {
    bottom: 24px;
    right: 12px;
}

.visitor-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.visitor-widget-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.visitor-widget-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.visitor-widget-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 125px;
    overflow-y: auto;
}

.visitor-widget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.15s;
}

.visitor-widget-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.visitor-widget-item-left {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 155px;
    color: #cbd5e1;
}

.visitor-widget-rank {
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
    width: 14px;
    flex-shrink: 0;
}

.visitor-widget-count {
    font-size: 10px;
    font-weight: 700;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    flex-shrink: 0;
}

@media (max-width: 992px) {
    .visitor-widgets-top-group {
        flex-direction: column;
        gap: 6px;
        top: 8px;
        right: 8px;
    }
}

@media (max-width: 768px) {
    .visitor-map-widget {
        width: 175px;
        padding: 8px 10px;
    }
    .visitor-widget-list {
        max-height: 85px;
    }
    .visitor-widget-item-left {
        max-width: 115px;
        font-size: 10px;
    }
    .visitor-widget-top-right {
        top: 8px;
        right: 8px;
    }
    .visitor-widget-bottom-right {
        bottom: 20px;
        right: 8px;
    }
}

@media (max-width: 520px) {
    .visitor-widgets-top-group {
        position: static;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 10px;
    }
    .visitor-map-widget {
        position: static;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
    }
}

/* Map View Switcher (Top Center Global / Indonesia Toggle) */
.visitor-map-view-switcher {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 3px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    gap: 4px;
    pointer-events: auto;
}

.map-switch-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 5px 13px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    outline: none;
}

.map-switch-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

.map-switch-btn.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.45);
}

@media (max-width: 768px) {
    .visitor-map-view-switcher {
        top: 8px;
    }
    .map-switch-btn {
        padding: 4px 10px;
        font-size: 10px;
    }
}

/* ==========================================================================
   Executive Analysis Briefing Modern Reorganization (Enterprise Grade)
   ========================================================================== */
.briefing-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.briefing-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.briefing-sec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.briefing-sec-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.briefing-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.briefing-pill-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.1));
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.briefing-pill-purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(126, 34, 206, 0.1));
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
}

.briefing-pill-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(29, 78, 216, 0.1));
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.briefing-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

.briefing-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

.briefing-card {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 160px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
}

.briefing-card:hover {
    background: linear-gradient(145deg, rgba(22, 30, 49, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -4px rgba(0, 0, 0, 0.55);
}

.briefing-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}

.briefing-card-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.briefing-card-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.briefing-card-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.briefing-card-value {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
    white-space: nowrap;
}

.briefing-unit {
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
}

/* Modern List & Items */
.briefing-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.briefing-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.18s ease;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.briefing-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.briefing-item-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.briefing-item-icon-circle {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.briefing-item-name {
    font-size: 11.5px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.briefing-badge-threat {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.threat-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.1));
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.threat-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(180, 83, 9, 0.1));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.threat-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(29, 78, 216, 0.1));
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.threat-emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.briefing-cve-badge {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.18);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.briefing-cve-prod {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.briefing-ioc-text {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    color: #a7f3d0;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.briefing-score-badge {
    font-size: 9.5px;
    font-weight: 800;
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 1.5px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Empty State */
.briefing-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 8px;
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
}

.briefing-empty-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 2px;
}

.briefing-empty-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #e2e8f0;
}

.briefing-empty-sub {
    font-size: 10px;
    color: #64748b;
    line-height: 1.35;
    max-width: 260px;
}

/* Subcards (Section 2) */
.briefing-subcard {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s ease;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.briefing-subcard:hover {
    background: linear-gradient(145deg, rgba(22, 30, 49, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.briefing-subcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}

.briefing-subcard-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.briefing-stat-badges {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.briefing-badge-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}

.briefing-tag-orange {
    background: rgba(249, 115, 22, 0.15);
    color: #fdba74;
    border: 1px solid rgba(249, 115, 22, 0.35);
}

.briefing-tag-red {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.briefing-tag-green {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.briefing-tag-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.briefing-subcard-desc {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.5;
}

.briefing-subcard-desc strong {
    color: #e2e8f0;
}

/* Attack Surface Strip */
.briefing-surface-strip {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.55) 0%, rgba(15, 23, 42, 0.65) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.briefing-surface-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.briefing-surface-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.surface-item {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    padding: 4px 9px;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}

.surface-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.surface-item strong {
    color: #f8fafc;
    font-weight: 700;
}

/* Recommendations (Section 3) */
.briefing-rec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.briefing-rec-item {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.65) 0%, rgba(15, 23, 42, 0.75) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.2s ease;
    min-width: 0;
    box-sizing: border-box;
}

.briefing-rec-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(145deg, rgba(22, 30, 49, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.45);
}

.briefing-rec-num {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.briefing-rec-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.briefing-rec-head {
    font-size: 12px;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 7px;
}

.briefing-rec-text {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
}

.briefing-rec-text strong {
    color: #e2e8f0;
}

@media (max-width: 1024px) {
    .briefing-grid-3 {
        grid-template-columns: 1fr;
    }
    .briefing-grid-2 {
        grid-template-columns: 1fr;
    }
    .briefing-rec-grid {
        grid-template-columns: 1fr;
    }
}

/* Hide legacy horizontal tabs row (replaced by modern sidebar navigation) */
.tabs-row {
    display: none !important;
}

/* ==========================================================================
   Floating AI Agent Chatbot (Bottom Right Corner)
   ========================================================================== */
.ai-floating-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9990;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ai-floating-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.ai-floating-btn:active {
    transform: scale(0.95);
}

.ai-fab-glow {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #d946ef);
    opacity: 0.5;
    filter: blur(8px);
    z-index: -1;
    animation: ai-pulse 3s infinite;
}

@keyframes ai-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.ai-fab-icon-wrap {
    color: #ffffff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.ai-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #0f172a;
    letter-spacing: 0.5px;
}

.ai-fab-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.ai-floating-btn:hover .ai-fab-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

/* Chatbot Floating Window */
.ai-floating-window {
    position: fixed;
    bottom: 96px;
    right: 28px;
    width: 480px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100vh - 120px);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(129, 140, 248, 0.35);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.25);
    z-index: 9991;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: ai-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-floating-window.expanded {
    width: 720px;
    height: 84vh;
    max-height: 860px;
}

@keyframes ai-slide-up {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-float-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ai-float-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-float-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    position: relative;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.ai-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid #0f172a;
    border-radius: 50%;
}

.ai-float-title {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.2;
}

.ai-float-status {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}

.ai-float-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-float-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.ai-float-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.ai-float-suggestions {
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    flex-shrink: 0;
}

.ai-float-suggestions::-webkit-scrollbar {
    display: none;
}

.ai-suggestion-chip {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.ai-suggestion-chip:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #ffffff;
    border-color: #818cf8;
    transform: translateY(-1px);
}

.ai-float-history {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(15, 23, 42, 0.65);
    scroll-behavior: smooth;
}

.ai-float-history::-webkit-scrollbar {
    width: 6px;
}

.ai-float-history::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 4px;
}

.ai-float-history::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.45);
    border-radius: 4px;
}

.ai-float-history::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.8);
}

.ai-msg-row {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.ai-msg-row.user {
    justify-content: flex-end;
}

.ai-msg-row.assistant {
    justify-content: flex-start;
}

.ai-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.ai-msg-row.assistant .ai-msg-avatar {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.ai-msg-row.user .ai-msg-avatar {
    background: #0ea5e9;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

.ai-msg-row.assistant .ai-msg-bubble {
    flex: 1;
    min-width: 0;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(129, 140, 248, 0.25);
    color: #f1f5f9;
    border-radius: 4px 16px 16px 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.6;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
}

.ai-msg-row.user .ai-msg-bubble {
    max-width: 82%;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    border-radius: 16px 4px 16px 16px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
    padding: 10px 15px;
    font-size: 13px;
    line-height: 1.5;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Markdown typography inside floating chat bubbles */
.ai-msg-bubble.ai-markdown-content > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.ai-msg-bubble.ai-markdown-content > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.ai-msg-bubble.ai-markdown-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.ai-msg-bubble.ai-markdown-content ul, 
.ai-msg-bubble.ai-markdown-content ol {
    margin-left: 0 !important;
    padding-left: 20px !important;
    margin-bottom: 10px;
}

.ai-msg-bubble.ai-markdown-content li {
    margin-bottom: 6px;
    line-height: 1.55;
    color: #e2e8f0;
}

.ai-msg-bubble.ai-markdown-content strong {
    color: #ffffff;
    font-weight: 700;
}

.ai-msg-bubble.ai-markdown-content h1,
.ai-msg-bubble.ai-markdown-content h2,
.ai-msg-bubble.ai-markdown-content h3 {
    color: #f8fafc;
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 700;
    border: none !important;
    padding: 0 !important;
}

.ai-msg-bubble.ai-markdown-content code {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    word-break: break-word;
    white-space: pre-wrap;
}

.ai-msg-bubble.ai-markdown-content pre {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 14px;
    overflow-x: auto;
    margin: 10px 0;
    max-width: 100%;
    box-sizing: border-box;
}

.ai-msg-bubble.ai-markdown-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #f1f5f9;
}

/* Table formatting inside markdown (Zero Overflow) */
.ai-markdown-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 12px 0;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(129, 140, 248, 0.2);
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
}

.ai-markdown-content table::-webkit-scrollbar {
    height: 5px;
}

.ai-markdown-content table::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.45);
    border-radius: 3px;
}

.ai-markdown-content th {
    background: rgba(99, 102, 241, 0.2);
    color: #f8fafc;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    white-space: nowrap;
}

.ai-markdown-content td {
    padding: 8px 12px;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 240px;
}

.ai-markdown-content tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

.ai-markdown-content a {
    color: #60a5fa;
    text-decoration: none;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.ai-markdown-content a:hover {
    text-decoration: underline;
    color: #93c5fd;
}

.ai-float-footer {
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ai-float-input {
    flex: 1;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 13px;
    padding: 10px 14px;
    outline: none;
    resize: none;
    font-family: inherit;
    max-height: 90px;
    transition: border-color 0.2s;
}

.ai-float-input:focus {
    border-color: #818cf8;
}

.ai-float-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.ai-float-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.ai-float-send-btn:active {
    transform: scale(0.95);
}

.ai-float-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .ai-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .ai-floating-window {
        bottom: 80px;
        right: 16px;
        width: calc(100vw - 32px);
        height: 520px;
    }

    .ai-floating-window.expanded {
        width: calc(100vw - 32px);
        height: 85vh;
    }
}