/* Site-wide custom styles extracted from audiance-dashboard.html
  This file should be included in all pages AFTER the Bootstrap CSS link.
*/

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

#sidebar {
    min-height: 100vh;
    background-color: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    z-index: 1000;
}

#main-content {
    margin-left: 280px;
    padding: 20px;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.kpi-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
}

.kpi-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Specific KPI card text colors */
.kpi-card .kpi-label {
    opacity: 0.8;
}

/* Ensure default card KPIs have correct colors */
.card:not(.kpi-card) .kpi-label {
    color: var(--accent-color);
}
.card:not(.kpi-card) .kpi-value {
    color: var(--primary-color);
}


#map {
    height: 400px;
    border-radius: 12px;
    width: 100%;
    background-color: #e9ecef; /* Placeholder background */
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.btn-ai {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    transition: all 0.3s;
}

.btn-ai:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
    color: white;
}

.filter-section label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

/* Loading Overlay */
#loading {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Responsive adjustments for sidebar */
@media (max-width: 768px) {
    #sidebar {
        width: 100%;
        height: auto;
        min-height: 0;
        position: relative;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    #main-content {
        margin-left: 0;
    }
}