:root {
    --bg-light: #f4f7f9;
    --sidebar-dark: #1e293b;
    --card-bg: #ffffff;
    --accent: #4f46e5;
    --text-main: #334155;
    --text-muted: #64748b;
    --danger: #ef4444;
    --success: #10b981;
}

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

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-light);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    /* ===== ADJUST TOP ROW: enlarge Pie + Radar, shrink Table ===== */
    /* Target the three items inside `.charts-grid.triple`: 1=pie, 2=radar, 3=table */
    .charts-grid.triple .chart-card.compact:nth-child(1),
    .charts-grid.triple .chart-card.compact:nth-child(2) {
        /* Give pie and radar more vertical space */
        min-height: 430px !important;
        max-height: 820px !important;
        padding: 1rem !important;
    }

    .charts-grid.triple .chart-card.compact:nth-child(1) .chart-container.small,
    .charts-grid.triple .chart-card.compact:nth-child(2) .chart-container.small {
        height: 360px !important;
        min-height: 300px !important;
        max-height: 420px !important;
    }

    /* Make the city table in the third column more compact to reclaim space */
    .charts-grid.triple .chart-card.compact:nth-child(3) .table-container.compact-table {
        height: 220px !important;
        /* max-height: 260px !important; */
        min-height: 200px !important;
        overflow-y: auto !important;
    }

    /* Responsive adjustments: scale down proportions on medium/small screens */
    @media (max-width: 1200px) {
        .charts-grid.triple .chart-card.compact:nth-child(1),
        .charts-grid.triple .chart-card.compact:nth-child(2) {
            min-height: 360px !important;
        }
        .charts-grid.triple .chart-card.compact:nth-child(1) .chart-container.small,
        .charts-grid.triple .chart-card.compact:nth-child(2) .chart-container.small {
            height: 300px !important;
            min-height: 260px !important;
            max-height: 340px !important;
        }
        .charts-grid.triple .chart-card.compact:nth-child(3) .table-container.compact-table {
            height: 200px !important;
            max-height: 240px !important;
        }
    }

    @media (max-width: 768px) {
        .charts-grid.triple .chart-card.compact:nth-child(1),
        .charts-grid.triple .chart-card.compact:nth-child(2) {
            min-height: 300px !important;
            max-height: 420px !important;
        }
        .charts-grid.triple .chart-card.compact:nth-child(1) .chart-container.small,
        .charts-grid.triple .chart-card.compact:nth-child(2) .chart-container.small {
            height: 240px !important;
            min-height: 200px !important;
        }
        .charts-grid.triple .chart-card.compact:nth-child(3) .table-container.compact-table {
            height: 160px !important;
            max-height: 200px !important; 
        }
    }
}

/* Dashboard Container ultra compact */
.dashboard-container { 
    display: flex; 
    height: 100vh; 
    gap: 0;
}

/* ===== SIDEBAR ULTRA COMPACTE ===== */
.sidebar {
    width: 200px !important;
    background: var(--sidebar-dark);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 1rem !important;
    flex-shrink: 0;
    overflow-y: auto;
}

.brand { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 20px !important; 
}

.logo-icon { 
    background: var(--accent); 
    padding: 5px 8px !important; 
    border-radius: 4px; 
    font-weight: bold;
    font-size: 0.9rem !important;
}

.sidebar h2 {
    font-size: 1rem !important;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 2px !important;
    margin-bottom: 20px !important;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px !important;
    border-radius: 4px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.8rem !important;
}

.filters-section h3 {
    font-size: 0.7rem !important;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-bottom: 8px !important;
    letter-spacing: 0.5px;
}

.filter-group {
    margin-bottom: 12px !important;
}

.filter-group label {
    display: block;
    font-size: 0.7rem !important;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.8);
}

.filter-group select {
    width: 100%;
    padding: 6px 8px !important;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    font-size: 0.75rem !important;
}

.reset-btn {
    width: 100%;
    padding: 8px !important;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem !important;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 12px !important;
}

.sidebar-stats h3 {
    font-size: 0.7rem !important;
    margin-bottom: 8px !important;
}

.stat-item {
    margin-bottom: 8px !important;
}

.stat-label {
    font-size: 0.7rem !important;
}

.stat-value {
    font-size: 0.9rem !important;
}

/* ===== MAIN CONTENT ULTRA COMPACT ===== */
.main-content {
    flex: 1;
    padding: 1rem !important;
    overflow-y: auto;
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    gap: 1rem !important;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0.75rem !important;
    border-bottom: 1px solid #e2e8f0;
}

.header h1 {
    font-size: 1.2rem !important;
    font-weight: 600;
    color: var(--text-main);
}

.user-info {
    font-size: 0.75rem !important;
    color: var(--text-muted);
    background: #e2e8f0;
    padding: 4px 8px !important;
    border-radius: 3px;
}

/* ===== KPI CARDS ULTRA COMPACTES ===== */
.kpi-row.compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px !important;
    margin-bottom: 1rem !important;
}

.kpi-card {
    background: white;
    padding: 0.75rem !important;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-top: 2px solid #6366f1;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kpi-label {
    font-size: 0.6rem !important;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 1.1rem !important;
    font-weight: 700;
    color: #1e293b;
    margin: 2px 0;
}

.kpi-subtext {
    font-size: 0.65rem !important;
    color: #94a3b8;
    margin-top: 0;
}

/* ===== NOUVELLE STRUCTURE DE GRID POUR 3 COLONNES ===== */
.charts-grid.triple {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
}

.charts-grid.double {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
}

/* ===== CHART CARDS ULTRA COMPACTES ===== */
.chart-card.compact {
    background: white;
    padding: 0.75rem !important;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 280px !important;
    max-height: 300px !important;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid #f1f5f9;
    min-height: 30px;
    flex-shrink: 0;
}

.card-header h3 {
    margin: 0;
    font-size: 0.85rem !important;
    color: #1e293b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

/* ===== CHART CONTAINERS ULTRA COMPACTS ===== */
.chart-container.small {
    width: 100% !important;
    height: 200px !important;
    min-height: 180px !important;
    max-height: 200px !important;
    flex: 1;
    overflow: hidden !important;
    position: relative;
    margin: 0 auto;
}

/* Contrôle absolu de tous les SVGs */
.chart-container svg,
#depression-pie svg,
#radar-chart svg,
#multi-bar-chart svg,
#us-map svg {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
    margin: 0 auto !important;
    overflow: visible !important;
}

/* ===== CHART CONTROLS ULTRA COMPACTS ===== */
.chart-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chart-controls select {
    padding: 4px 6px !important;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
    font-size: 0.7rem !important;
    font-family: 'Inter', sans-serif;
    max-width: 130px;
    cursor: pointer;
}

.control-btn.small, 
.export-btn.small {
    padding: 4px 8px !important;
    border-radius: 3px;
    border: none;
    background-color: #6366f1;
    color: white;
    font-size: 0.7rem !important;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

/* ===== CHART FOOTER ULTRA COMPACT ===== */
.chart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 6px !important;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px !important;
    min-height: 30px;
    flex-shrink: 0;
}

/* ===== LÉGENDES COMPACTES ===== */
.compact-legend {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    font-size: 0.6rem !important;
    justify-content: center !important;
    align-items: center !important;
}

/* ===== TABLEAU ULTRA COMPACT ===== */
.table-container.compact-table {
    width: 100% !important;
    max-height: 180px !important;
    min-height: 160px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 3px !important;
    background: white !important;
    margin: 0 auto !important;
    font-size: 0.7rem !important;
}

#city-table table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.65rem !important;
    table-layout: fixed !important;
}

#city-table th {
    padding: 6px 4px !important;
    font-size: 0.6rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#city-table td {
    padding: 4px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Colonnes ultra compactes */
#city-table th:nth-child(1),
#city-table td:nth-child(1) { width: 25% !important; }
#city-table th:nth-child(2),
#city-table td:nth-child(2) { width: 15% !important; }
#city-table th:nth-child(3),
#city-table td:nth-child(3) { width: 20% !important; }
#city-table th:nth-child(4),
#city-table td:nth-child(4) { width: 20% !important; }
#city-table th:nth-child(5),
#city-table td:nth-child(5) { width: 20% !important; }

/* ===== INSIGHTS ULTRA COMPACTS ===== */
.chart-card.full-width.compact {
    grid-column: 1 / -1;
    min-height: 160px !important;
    max-height: 180px !important;
    margin-top: 0;
}

.insights-container.compact {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    padding: 8px 0 !important;
}

.insight-card.compact {
    padding: 8px !important;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.insight-card.compact h4 {
    font-size: 0.75rem !important;
    margin-bottom: 4px;
}

.insight-card.compact p {
    font-size: 0.7rem !important;
    line-height: 1.3;
    color: #64748b;
}

/* ===== EXPORT OPTIONS ULTRA COMPACTS ===== */
.export-options.compact {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0;
    justify-content: center;
}

.action-btn.small {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    border-radius: 4px;
    border: none;
    background: #4f46e5;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 150px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1400px) {
    .sidebar {
        width: 180px !important;
        padding: 0.75rem !important;
    }
    
    .main-content {
        padding: 0.75rem !important;
    }
    
    .kpi-row.compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid.triple {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .charts-grid.triple .chart-card.compact:last-child {
        grid-column: 1 / -1;
    }
    
    .chart-container.small {
        height: 180px !important;
        min-height: 160px !important;
    }
    
    .insights-container.compact {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 1200px) {
    .charts-grid.triple,
    .charts-grid.double {
        grid-template-columns: 1fr !important;
    }
    
    .kpi-row.compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-container.small {
        height: 160px !important;
        min-height: 140px !important;
    }
    
    .insights-container.compact {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100% !important;
        padding: 0.75rem !important;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        max-height: 250px;
    }
    
    .brand {
        flex: 0 0 auto;
    }
    
    .menu {
        flex: 0 0 auto;
        flex-direction: row;
        margin-bottom: 0;
    }
    
    .filters-section {
        flex: 1;
        min-width: 250px;
    }
    
    .sidebar-stats {
        flex: 0 0 100%;
        display: flex;
        gap: 20px;
        justify-content: center;
    }
    
    .main-content {
        padding: 0.75rem !important;
    }
    
    .chart-container.small {
        height: 140px !important;
        min-height: 120px !important;
    }
}

@media (max-width: 768px) {
    .kpi-row.compact {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .kpi-card {
        padding: 0.5rem !important;
    }
    
    .kpi-value {
        font-size: 1rem !important;
    }
    
    .chart-container.small {
        height: 120px !important;
        min-height: 100px !important;
    }
    
    .chart-card.compact {
        padding: 0.5rem !important;
        min-height: 200px !important;
        max-height: 220px !important;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Simplifier les tableaux sur mobile */
    #city-table th:nth-child(4),
    #city-table td:nth-child(4),
    #city-table th:nth-child(5),
    #city-table td:nth-child(5) {
        display: none;
    }
    
    #city-table th:nth-child(1),
    #city-table td:nth-child(1) { width: 40% !important; }
    #city-table th:nth-child(2),
    #city-table td:nth-child(2) { width: 30% !important; }
    #city-table th:nth-child(3),
    #city-table td:nth-child(3) { width: 30% !important; }
    
    .export-options.compact {
        flex-direction: column;
    }
    
    .action-btn.small {
        width: 100%;
        min-width: auto;
    }
    
    /* Cacher les légendes sur mobile */
    .compact-legend {
        font-size: 0.5rem !important;
    }
}

/* ===== SCROLLBAR ULTRA FINE ===== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.table-container.compact-table::-webkit-scrollbar {
    width: 3px !important;
    height: 3px !important;
}

/* ===== LOADING OVERLAY ===== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.loading-spinner {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    font-size: 0.75rem !important;

}

.filter-group select option {
    background: var(--sidebar-dark);
    color: white;
    to { transform: rotate(360deg); }
}

#loading-overlay p {
    color: #64748b;
    font-size: 0.8rem;
}

/* ===== FORCER LA VISIBILITÉ DES GRAPHIQUES ===== */
.d3-chart,
.d3-container {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
}

/* Assurer que les textes sont lisibles */
.tick text,
.axis-label,
.chart-label {
    font-size: 0.6rem !important;
}

.tooltip {
    font-size: 0.65rem !important;
    padding: 4px 8px !important;
}

/* ===== OVERRIDE POUR GRAPHIQUES D3 ===== */
#depression-pie,
#radar-chart,
#multi-bar-chart,
#us-map {
    position: relative !important;
    overflow: hidden !important;
}

/* Profile radar spécifique */
#profile-radar {
    width: 100%;
    height: 400px;
    min-height: 350px;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.india-map .highlighted {
    animation: pulse 1.5s infinite;
    stroke-width: 1.5px;
}

/* ===== METRIC SELECTOR ===== */
.metric-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
}

.metric-selector label {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
}

.metric-selector select {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background-color: white;
    font-family: 'Inter', sans-serif;
    color: #334155;
    cursor: pointer;
    min-width: 150px;
    font-size: 0.8rem;
}

/* ===== ENLARGE CHARTS FOR BETTER VISIBILITY ===== */
.chart-card.compact {
    min-height: 350px !important;   /* bigger chart card */
    max-height: 750px !important;   /* allow more room */
    padding: 1rem !important;       /* more space inside */
}

.chart-container.small {
    height: 320px !important;       /* taller chart area */
    min-height: 300px !important;
    max-height: 360px !important;
}

/* Make only the multi-bar chart card taller when it has the `tall` class */
.chart-card.compact.tall {
    /* Increased heights so full chart + legends are visible */
    min-height: 520px !important;
    max-height: 920px !important;
    padding: 1.25rem !important;
}

.chart-card.tall .chart-container.small,
.chart-card.compact.tall .chart-container.small {
    /* Make inner chart area taller to ensure axes, labels and legends fit */
    height: 700px !important;
    min-height: 640px !important;
    max-height: 780px !important;
}

.tick text,
.axis-label,
.chart-label {
    font-size: 0.85rem !important;  /* more readable */
}

.tooltip {
    font-size: 0.85rem !important;  /* easier to read tooltips */
    padding: 6px 10px !important;
}

/* Profile radar chart */
#profile-radar {
    height: 500px;
    min-height: 450px;
}

/* Make sure all SVG charts fill their containers */
.d3-chart,
.d3-container,
#depression-pie,
#radar-chart,
#multi-bar-chart,
#us-map {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* On smaller screens, still visible */
@media (max-width: 1200px) {
    .chart-card.compact {
        min-height: 300px !important;
        max-height: 350px !important;
    }
    .chart-container.small {
        height: 250px !important;
        min-height: 220px !important;
    }
}

@media (max-width: 768px) {
    .chart-card.compact {
        min-height: 280px !important;
        max-height: 320px !important;
    }
    .chart-container.small {
        height: 220px !important;
        min-height: 200px !important;
    }
}


/* Adjust chart card height for insights */
.chart-card.full-width.compact {
    grid-column: 1 / -1;
    min-height: 220px !important;   /* bigger to fit content */
    max-height: none !important;    /* allow growth */
    margin-top: 0;
}

/* Make insights container responsive */
.insights-container.compact {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 12px !important;
    padding: 12px 0 !important;
}

/* Allow insight cards to grow */
.insight-card.compact {
    padding: 10px !important;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    min-height: 100px;   /* ensure enough space for text */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Icons alignment */
.insight-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}


/* Make city table chart card fill its area */
#city-table {
    width: 100% !important;
     height: 343px !important;  
    display: block;
}

/* Allow the table container to take full height */
.table-container.compact-table {
    width: 100% !important;
    height: calc(100% - 40px) !important; /* leave room for header */
    min-height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Optional: make table cells fill width */
#city-table table {
    width: 100% !important;
    height: 100% !important;
    border-collapse: collapse !important;
}


/* Make card header wrap nicely */
.chart-card.compact .card-header {
    display: flex;
    flex-direction: row; /* default layout */
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;      /* allow wrapping */
    gap: 6px;             /* spacing between elements */
}

/* Ensure chart-controls don't push the header off */
.chart-card.compact .chart-controls {
    flex: 0 0 auto;       /* don't shrink */
    display: flex;
    gap: 6px;
    flex-wrap: wrap;      /* wrap dropdowns/buttons if needed */
}

/* Prevent h3 titles from overlapping */
.chart-card.compact .card-header h3 {
    margin: 0;
    font-size: 0.85rem;
    white-space: normal; /* allow line breaks */
    overflow: visible;
}

/* Make radar chart fill its card */
#radar-chart {
    width: 100% !important;
    height: 100% !important;   /* fill the chart-card */
    min-height: auto !important;
    max-height: none !important;
    display: block;
}

/* Ensure the container stretches */
.chart-card.compact {
    display: flex;
    flex-direction: column;
}

/* Let chart container grow */
.chart-card.compact .chart-container {
    flex: 1 1 auto;       /* take all available space */
    height: auto !important;
    min-height: 0;        /* prevent old min-height from restricting it */
}

/* Make all SVGs inside fill container */
#radar-chart svg {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}



#radar-chart {
    width: 100%;
    height: 400px; /* Adjust height as needed */
    min-height: 350px;
    margin-top: 20px; /* Add space above the chart */
    padding-top: 40px; /* Add padding for the title */
    position: relative; /* Ensure the chart is positioned correctly */
}

#radar-chart-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px; /* Add space between the title and the chart */
    color: var(--text-main); /* Use a consistent color */
}

#radar-chart {
    width: 100%;
    height: 400px; /* Adjust height as needed */
    min-height: 350px;
    margin-top: 10px; /* Space between the title and the chart */
    padding: 0; /* Remove unnecessary padding */
    position: relative;
}

#radar-chart-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin: 0; /* Reset margins */
    padding: 10px 0; /* Add padding for better spacing */
    color: var(--text-main);
}

#depression-pie path:active,
#depression-pie path:focus {
    fill: inherit !important;
}

/* Comment button / help box styling */
.comment-button {
    position: absolute; /* set via JS too, but ensure visual defaults */
    z-index: 30;
    background: #0b1220;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    cursor: pointer;
}

.comment-button i {
    pointer-events: none;
}

.comment-box {
    position: absolute;
    z-index: 30;
    background: #ffffff;
    border: 1px solid #e6eef6;
    border-radius: 8px;
    padding: 10px;
    width: 240px;
    box-shadow: 0 6px 18px rgba(15,23,42,0.08);
    font-size: 13px;
    display: none;
}

/* Slightly increase bottom padding inside chart cards so circular button doesn't overlap content */
.chart-card.compact { padding-bottom: 1.25rem !important; }
