:root {
    --primary: #0052a3;
    --secondary: #d63031;
    --success: #00b894;
    --warning: #fdcb6e;
    --bg-dark: #2d3748;
    --bg-darker: #1a202c;
    --bg-light: #f7fafc;
    --text-primary: #2c3e50;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg-light); color: var(--text-primary); }

.pro-container { display: flex; height: 100vh; overflow: hidden; }

.pro-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: white;
    padding: 24px 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.pro-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255, 0.1);
}

.logo-icon { font-size: 28px; }
.logo-text { font-size: 20px; font-weight: 700; color: #00ff88; }

.pro-menu {
    list-style: none;
    padding: 12px 0;
}

.pro-menu-item { margin: 4px 0; }

.pro-menu-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    color: rgba(255,255,255, 0.7);
    text-decoration: none;
    cursor: pointer;
    transition: all 200ms;
    font-size: 14px;
}

.pro-menu-link:hover {
    background-color: rgba(0, 102, 204, 0.15);
    color: white;
}

.pro-menu-item.active .pro-menu-link {
    background: linear-gradient(90deg, var(--primary) 0%, #003d82 100%);
    color: white;
    font-weight: 600;
    border-radius: 0 8px 8px 0;
}

.pro-icon { font-size: 20px; width: 24px; text-align: center; }

.pro-main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.pro-header {
    background: linear-gradient(135deg, var(--primary) 0%, #003d82 100%);
    color: white;
    padding: 32px;
    border-bottom: 3px solid var(--success);
}

.pro-header h1 { font-size: 28px; margin-bottom: 8px; }
.pro-header p { font-size: 14px; opacity: 0.9; }

/* FILTERS - HORIZONTAL ON ONE LINE */
.pro-filters {
    background: white;
    padding: 16px 32px;
    margin: 16px 16px 0;
    border-radius: 8px 8px 0 0;
    border: 1px solid #e2e8f0;
}

.pro-filters h3 { 
    font-size: 14px; 
    font-weight: 700; 
    margin-bottom: 12px; 
    color: var(--primary); 
}

.pro-filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.pro-select-compact {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 200ms;
}

.pro-select-compact:hover {
    border-color: var(--primary);
    background: #f8f9fa;
}

.pro-select-compact:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 163, 0.1);
}

.btn-filter-action {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 200ms;
    white-space: nowrap;
}

.btn-filter-action:hover {
    background: #003d82;
    transform: translateY(-2px);
}

/* METRICS */
.pro-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 16px 32px;
    background: white;
    margin: 0 16px;
    border: 1px solid #e2e8f0;
}

.pro-metric-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #e6eeff 100%);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.pro-metric-card.alert {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    border-left-color: var(--secondary);
}

.pro-metric-label { 
    font-size: 10px; 
    color: #7f8c8d; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 4px; 
}

.pro-metric-value { 
    font-size: 20px; 
    font-weight: 800; 
    color: var(--primary); 
    margin-bottom: 2px; 
}

.pro-metric-card.alert .pro-metric-value { 
    color: var(--secondary); 
}

.pro-metric-unit { 
    font-size: 10px; 
    color: #7f8c8d; 
}

.pro-metric-sub {
    font-size: 10px;
    color: #7f8c8d;
    margin: 2px 0 0 0;
}

/* CHARTS */
.pro-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
    padding: 16px 32px;
    background: white;
    margin: 0 16px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
}

.pro-chart-container {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fafbfc;
}

.pro-chart-container h3 { 
    font-size: 12px; 
    font-weight: 700; 
    color: var(--primary); 
    margin-bottom: 12px; 
    text-align: center; 
}

.pro-chart-container canvas { 
    max-height: 200px; 
}

/* TABLES */
.pro-section-title {
    padding: 12px 32px;
    background: white;
    margin: 16px 16px 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
}

.pro-section-title h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.pro-table-container {
    padding: 12px 32px;
    background: white;
    margin: 0 16px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
}

.pro-table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 11px; 
}

.pro-table thead { 
    background: #f5f7fa; 
    border-bottom: 2px solid var(--primary); 
}

.pro-table th { 
    padding: 8px; 
    text-align: left; 
    font-weight: 700; 
}

.pro-table td { 
    padding: 8px; 
    border-bottom: 1px solid #e2e8f0; 
}

.pro-table tbody tr:hover { 
    background: #f9fafb; 
}

/* MAP */
.pro-map-container {
    padding: 16px 32px;
    background: white;
    margin: 0 16px;
    border: 1px solid #e2e8f0;
}

.pro-map {
    width: 100%;
    max-height: 400px;
    margin-top: 12px;
}

.pro-map-container h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.district {
    cursor: pointer;
    transition: opacity 0.3s, filter 0.3s;
}

.district:hover {
    opacity: 1 !important;
    filter: brightness(1.15) drop-shadow(0 0 8px rgba(0,0,0,0.3));
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .pro-sidebar { width: 100%; height: auto; }
    .pro-container { flex-direction: column; }
    .pro-filter-row { flex-direction: column; }
    .pro-metrics { grid-template-columns: repeat(2, 1fr); }
    .pro-charts { grid-template-columns: 1fr; }
    .pro-select-compact { min-width: 100%; }
}
