/* =============================================
   DASHBOARD LAYOUT SYSTEM — Intel Ops Center
   Elegant Green Theme
   ============================================= */

/* ===== LAYOUT WRAPPER ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-base);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: #FFFFFF;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition-slow);
    box-shadow: 2px 0 16px rgba(15,118,110,0.06);
}

/* Sidebar Logo */
.sidebar-logo {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.sidebar-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(15,118,110,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0F766E, #065F46);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(15,118,110,0.3);
    flex-shrink: 0;
    position: relative;
}

.sidebar-logo-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-md) + 2px);
    background: linear-gradient(135deg, #0F766E, #065F46);
    opacity: 0.2;
    animation: pulse 3s ease-in-out infinite;
}

.sidebar-logo-text h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
    background: linear-gradient(90deg, #1F2937, #0F766E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-logo-text p {
    font-size: 10px;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 16px 8px 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    position: relative;
}

.sidebar-item i {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-item:hover {
    background: #D1FAE5;
    color: #065F46;
}

.sidebar-item:hover i {
    transform: scale(1.1);
    color: var(--accent);
}

.sidebar-item.active {
    background: #D1FAE5;
    color: var(--accent);
    border: 1px solid rgba(15,118,110,0.15);
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-item.active i {
    color: var(--accent);
}

.sidebar-item .nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}

.sidebar-item .nav-badge.danger {
    background: var(--risk-critical);
    animation: pulse 2s ease-in-out infinite;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: #FAFAFA;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-user:hover {
    background: #D1FAE5;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0F766E, #065F46);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 2px solid rgba(15,118,110,0.25);
    position: relative;
}

.sidebar-user-avatar::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 9px;
    height: 9px;
    background: var(--risk-low);
    border-radius: 50%;
    border: 2px solid #FFFFFF;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== TOPBAR ===== */
.topbar {
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    gap: var(--space-lg);
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 99;
    box-shadow: 0 1px 8px rgba(15,118,110,0.06);
}

.topbar-search {
    flex: 1;
    max-width: 400px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-left: auto;
}

.topbar-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: #F5F7F4;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 16px;
}

.topbar-icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.topbar-icon-btn .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: var(--risk-critical);
    border-radius: 50%;
    border: 1.5px solid #FFFFFF;
    animation: pulse 2s ease-in-out infinite;
}

.topbar-time {
    font-size: 12px;
    color: var(--text-muted);
    border-left: 1px solid var(--border);
    padding-left: var(--space-md);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

.topbar-time small {
    display: block;
    font-size: 10px;
    color: rgba(107,114,128,0.7);
}

/* Threat Level Badge */
.threat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid;
}
.threat-badge.threat-low      { background: rgba(22,163,74,0.08);   color: #16A34A; border-color: rgba(22,163,74,0.25); }
.threat-badge.threat-medium   { background: rgba(245,158,11,0.08);  color: #F59E0B; border-color: rgba(245,158,11,0.25); }
.threat-badge.threat-high     { background: rgba(249,115,22,0.08);  color: #F97316; border-color: rgba(249,115,22,0.25); }
.threat-badge.threat-critical { background: rgba(239,68,68,0.10);   color: #EF4444; border-color: rgba(239,68,68,0.25); animation: pulse 1.5s ease-in-out infinite; }
.threat-badge .threat-dot     { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ===== MAIN CONTENT AREA ===== */
.content-area {
    margin-left: var(--sidebar-width);
    padding-top: var(--navbar-height);
    flex: 1;
    min-width: 0;
}

.content-inner {
    padding: var(--space-xl);
    max-width: 1600px;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.page-header-left h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

.page-header-left p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.page-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}
.page-breadcrumb a:hover { color: var(--accent); }
.page-breadcrumb i { font-size: 10px; }

/* ===== KPI STRIP ===== */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: default;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    opacity: 0;
    transition: var(--transition);
}

.kpi-card:hover::before { opacity: 1; }

.kpi-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.kpi-card-bg-orb {
    position: absolute;
    bottom: -20px; right: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: 0.06;
    transition: var(--transition);
}

.kpi-card:hover .kpi-card-bg-orb {
    opacity: 0.12;
    transform: scale(1.2);
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.kpi-trend {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.kpi-trend.up   { color: var(--risk-low);      background: rgba(22,163,74,0.10); }
.kpi-trend.down { color: var(--risk-critical);  background: rgba(239,68,68,0.10); }
.kpi-trend.warn { color: var(--risk-medium);    background: rgba(245,158,11,0.10); }

.kpi-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}

.kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
}

/* ===== GRID SYSTEMS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.three-col-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.main-sidebar-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* ===== CHART PANEL ===== */
.chart-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.chart-panel:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.chart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.chart-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-panel-title i { color: var(--accent); font-size: 15px; }

.chart-panel-meta {
    font-size: 11px;
    color: var(--text-muted);
    background: #F5F7F4;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

/* ===== MAP SECTION ===== */
.dashboard-map-wrap {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    background: #EFF6FF;
    height: 560px;
}

#world-map { height: 100%; width: 100%; }

/* Map Overlay Controls */
.map-controls {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-ctrl-group {
    display: flex;
    gap: 4px;
}

.map-ctrl-btn {
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-family: inherit;
}

.map-ctrl-btn:hover,
.map-ctrl-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: #D1FAE5;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 500;
    background: rgba(255,255,255,0.97);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
}

.map-legend h6 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Country Panel */
.country-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 300px;
    z-index: 500;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(15,118,110,0.08);
    display: none;
    animation: slideInRight 0.3s cubic-bezier(0.4,0,0.2,1);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.country-panel.visible { display: block; }

.panel-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-flag {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.panel-country-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.panel-region       { font-size: 11px; color: var(--text-muted); }

.panel-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    transition: color 0.2s;
}
.panel-close:hover { color: var(--text-primary); }

.panel-body { padding: 16px; }

.panel-risk-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px;
    background: #F5F7F4;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.panel-risk-number {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.panel-metric {
    background: #F5F7F4;
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    border: 1px solid var(--border);
}

.panel-metric-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.panel-metric-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-actions { display: flex; gap: 8px; }

.panel-actions a,
.panel-actions button {
    flex: 1;
    text-align: center;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.panel-btn-detail {
    background: linear-gradient(135deg, #0F766E, #065F46);
    color: white;
    border: none;
    box-shadow: 0 2px 10px rgba(15,118,110,0.25);
}
.panel-btn-detail:hover { opacity: 0.9; color: white; }

.panel-btn-compare {
    background: #F5F7F4;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.panel-btn-compare:hover { border-color: var(--accent); color: var(--accent); }

.panel-btn-watch {
    width: 38px;
    flex: none;
    background: #F5F7F4;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}
.panel-btn-watch.active { color: #F59E0B; border-color: rgba(245,158,11,0.4); }
.panel-btn-watch:hover  { border-color: var(--accent); color: var(--accent); }

/* Map Loading */
.map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245,247,244,0.7);
    z-index: 600;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== RISK LIST (sidebar) ===== */
.risk-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

.risk-list-item:hover {
    background: var(--accent-subtle);
    border-color: var(--border-hover);
    transform: translateX(3px);
}

.risk-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.risk-score-bar {
    height: 4px;
    border-radius: 2px;
    margin-top: 4px;
    transition: width 1s ease;
}

/* ===== INTEL RISK TABLE ===== */
.intel-risk-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 2px;
}

.intel-risk-table thead th {
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    background: transparent;
}

.intel-risk-table tbody tr {
    transition: var(--transition);
    cursor: pointer;
}

.intel-risk-table tbody tr td {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.intel-risk-table tbody tr:hover td {
    background: #F0FDF4;
}

.intel-risk-table tbody tr:hover td:first-child {
    border-left-color: var(--accent);
}

.intel-risk-table tbody td {
    padding: 11px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(229,231,235,0.8);
    vertical-align: middle;
}

.risk-rank-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #F5F7F4;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.risk-rank-num.top {
    background: #D1FAE5;
    border-color: rgba(15,118,110,0.25);
    color: var(--accent);
}

.score-bar-wrap {
    width: 100%;
    min-width: 60px;
    background: #F5F7F4;
    border-radius: 3px;
    height: 5px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1.2s ease;
}

/* ===== NEWS INTEL FEED ===== */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.news-card {
    background: #F9FAFB;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: var(--transition);
    border-left: 3px solid var(--border);
}

.news-card:hover {
    border-color: var(--border-hover);
    background: #F0FDF4;
    transform: translateX(2px);
    color: inherit;
}

.news-card.sentiment-negative-card { border-left-color: var(--risk-critical); }
.news-card.sentiment-positive-card { border-left-color: var(--risk-low); }
.news-card.sentiment-neutral-card  { border-left-color: var(--text-muted); }

.news-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.news-card-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
}

/* ===== REGION BARS ===== */
.region-bar-item { margin-bottom: 14px; }

.region-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.region-bar-name  { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.region-bar-score { font-size: 13px; font-weight: 700; color: var(--text-primary); }

.region-bar-track {
    height: 5px;
    background: #F5F7F4;
    border-radius: 3px;
    overflow: hidden;
}

.region-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1.2s ease;
}

/* ===== LEAFLET STYLES ===== */
.map-container {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.leaflet-container {
    background: #EFF6FF !important;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
}

.leaflet-popup-content-wrapper {
    background: #FFFFFF !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text-primary) !important;
}

.leaflet-popup-tip { background: #FFFFFF !important; }
.leaflet-popup-close-button { color: var(--text-muted) !important; }

.intel-tooltip {
    background: rgba(255,255,255,0.98) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: 8px 12px !important;
    backdrop-filter: blur(8px) !important;
    color: var(--text-primary) !important;
    font-size: 12px !important;
    box-shadow: var(--shadow-md) !important;
    white-space: nowrap !important;
}
.intel-tooltip::before { display: none !important; }

/* ===== SECTION HEADER (shared) ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-title span {
    width: 3px;
    height: 16px;
    background: linear-gradient(135deg, #0F766E, #065F46);
    border-radius: 2px;
    display: inline-block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .kpi-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1200px) {
    .main-sidebar-grid { grid-template-columns: 1fr; }
    .three-col-grid    { grid-template-columns: 1fr 1fr; }
    .charts-grid       { grid-template-columns: 1fr; }
    .kpi-strip         { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .kpi-strip  { grid-template-columns: 1fr 1fr; }
    .news-grid  { grid-template-columns: 1fr; }
    .two-col-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --sidebar-width: 0px; }

    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); width: 260px; }
    .content-area { margin-left: 0; }
    .topbar { left: 0; }

    .three-col-grid  { grid-template-columns: 1fr; }
    .stats-grid      { grid-template-columns: 1fr 1fr; }
    .kpi-strip       { grid-template-columns: 1fr 1fr; }
    .news-grid       { grid-template-columns: 1fr; }
    .content-inner   { padding: var(--space-md); }
    .dashboard-map-wrap { height: 380px; }
    .country-panel   { width: 260px; right: 8px; top: 8px; }
    .threat-badge .threat-label { display: none; }
}