/* --- Custom CSS for Dashboard --- */
body {
    font-family: 'Prompt', sans-serif;
    background-color: #f0f2f5;
}

.navbar-brand {
    font-weight: 700;
}

.kpi-card {
    border: none;
    border-radius: 0.75rem;
    color: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.kpi-card h1 {
    font-size: 3rem;
    font-weight: 700;
    color: white !important;
}

.kpi-card .card-text {
    font-size: 1.1rem;
}

.bg-card-red { background-color: #dc3545; }
.bg-card-blue { background-color: #0d6efd; }
.bg-card-green { background-color: #198754; }
.bg-card-yellow { background-color: #ffc107; color: #333 !important; }

.chart-container, .map-container, .table-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.chart-container h5, .map-container h5, .table-container h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

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

/* Styles for sidebar layout */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.dashboard-wrapper .navbar {
    flex-shrink: 0;
}

.dashboard-content-area {
    flex: 1;
    overflow: hidden;
    min-height: 0;
    position: relative;
}

.dashboard-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    width: 350px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* 90% opacity (10% transparent) */
    padding: 1rem;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: transform 0.3s ease-in-out, padding 0.3s ease-in-out;
    font-family: var(--bs-font-sans-serif);
}

.dashboard-sidebar.collapsed {
    transform: translateX(-100%);
    padding: 0;
    overflow: hidden;
}

.dashboard-fullmap {
    width: 100%;
    height: 100%;
    position: relative;
}

.dashboard-main-content {
    flex: 1; /* Takes remaining space */
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Map filters styling */
.map-filters {
    border: 1px solid #dee2e6;
}

.map-filters .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.map-filters .form-select-sm {
    font-size: 0.875rem;
}


/* Sidebar toggle button */
#sidebar-toggle {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.375rem 0.75rem;
}

#sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Logo in navbar */
.navbar img {
    height: 40px;
    object-fit: contain;
}

/* Navbar menu active state */
.navbar-nav .nav-link.active {
    color: #fff !important;
    font-weight: 600;
    border-bottom: 2px solid #fff;
    padding-bottom: 0.25rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Spinner Overlay Styles */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Ensure it's on top */
    visibility: hidden; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}
