/* Custom Styles for Dashboard */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

.sidebar .nav-link.active {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 3px solid #0d6efd;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
}

/* Main Content */
main {
    margin-top: 56px;
    padding-top: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f8f9fa;
    font-weight: 600;
}

/* Indicator Cards */
.indicator-card {
    position: relative;
    overflow: hidden;
}

.indicator-card .card-body {
    padding: 1.5rem;
}

.indicator-card .icon {
    font-size: 2.5rem;
    opacity: 0.2;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.indicator-card .value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.indicator-card .label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.indicator-card .variation {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.variation.positive {
    color: #dc3545;
}

.variation.negative {
    color: #198754;
}

.variation.neutral {
    color: #6c757d;
}

/* Color Variants */
.bg-primary-light {
    background-color: #cfe2ff !important;
}

.bg-success-light {
    background-color: #d1e7dd !important;
}

.bg-danger-light {
    background-color: #f8d7da !important;
}

.bg-warning-light {
    background-color: #fff3cd !important;
}

.bg-info-light {
    background-color: #cff4fc !important;
}

/* Map */
#map {
    border-radius: 0.25rem;
    width: 100%;
    height: 600px;
}

#map .leaflet-container {
    width: 100%;
    height: 100%;
}

/* Table */
.table-responsive {
    max-height: 550px;
    overflow-y: auto;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

/* Loading */
#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

/* Filters */
.form-select-sm {
    font-size: 0.875rem;
}

.form-label.small {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        top: 0;
    }
    
    main {
        margin-top: 0;
    }
    
    .indicator-card .value {
        font-size: 1.5rem;
    }
    
    .indicator-card .icon {
        font-size: 2rem;
    }
}

/* Chart containers */
canvas {
    max-height: 400px;
}

/* Navbar */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

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

