:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --secondary: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font-sans: 'DM Sans', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--background);
    height: 100vh;
    overflow: hidden;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* Map Container */
#map {
    width: 100%;
    height: 100vh;
    z-index: 1;
}

/* ==========================================================================
   Sidebar & Navigation
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.closed {
    transform: translateX(-100%);
}

.sidebar-header {
    height: 80px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.close-sidebar-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-sidebar-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--danger);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Menu Items */
.menu-group {
    margin-bottom: 24px;
}

.menu-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    padding-left: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    cursor: pointer;
}

.menu-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.menu-item.active {
    background: rgba(2, 132, 199, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.menu-item i {
    font-size: 20px;
    margin-right: 12px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.menu-item:hover i, .menu-item.active i {
    color: var(--primary);
}

/* ==========================================================================
   Top Search Bar Area
   ========================================================================== */
.search-container {
    position: absolute;
    top: 24px;
    left: 304px; /* 280px sidebar + 24px gap */
    right: 24px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container > * {
    pointer-events: auto; /* Enable clicks on children (buttons/inputs) */
}

/* Route Attention Effects (non-animated for stability) */
.leaflet-overlay-pane .route-blink {
    stroke-dasharray: 6 6;
}
.leaflet-overlay-pane .route-glow {
    opacity: 0.25;
}

body:has(.sidebar.closed) .search-container {
    left: 24px;
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
}

.toggle-sidebar-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.toggle-sidebar-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.95);
}

/* Modern Pill Search Box */
.search-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 48px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    padding: 4px 6px 4px 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.search-box:focus-within {
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(2, 132, 199, 0.4);
}

.search-icon {
    font-size: 20px;
    color: var(--text-muted);
    margin-right: 12px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: var(--font-sans);
    color: var(--text-main);
    background: transparent;
}

.search-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-left: 4px;
    transition: all 0.2s;
}

.search-action:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.search-action.primary {
    background: var(--primary);
    color: white;
}

.search-action.primary:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Base Map Toggle Button */
.basemap-toggle-btn {
    height: 44px;
    padding: 0 16px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s;
}

.basemap-toggle-btn i {
    font-size: 18px;
    color: var(--primary);
}

.basemap-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
}

/* Filter Chips Container - Minimalist Floating Style */
.filter-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0; /* Sedikit padding vertikal untuk shadow */
    max-width: 100%;
    background: transparent; /* Hapus background container */
    border: none;
    box-shadow: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-top: 8px;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

/* Individual Chip/Button Styling */
.chip {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    height: 40px; /* Sedikit lebih tinggi */
    padding: 0 16px;
    border-radius: 100px; /* Full Pill Shape */
    background: rgba(255, 255, 255, 0.9); /* Default white background */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Soft shadow */
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Hover State */
.chip:hover {
    background: white;
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* Active State - Modern Navigation Look */
.chip.active {
    background: var(--primary); /* Solid Primary Color */
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3); /* Colored shadow */
    border-color: transparent;
}

/* Active State Colors - Distinct per Category */
.chip[data-filter="gudang"].active {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.chip[data-filter="kecamatan"].active {
    background: #f59e0b;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.chip[data-filter="desa"].active {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.chip[data-filter="kelurahan"].active {
    background: #1e293b;
    color: white;
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}

/* Reset Button - Distinct Action */
.chip.reset-btn {
    margin-left: auto; 
    background: rgba(254, 226, 226, 0.8);
    color: var(--danger);
    border: 1px solid rgba(254, 202, 202, 0.5);
}

.chip.reset-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.15);
}

.chip.reset-btn i {
    color: inherit;
}

/* ==========================================================================
   Profile Access (Top Right)
   ========================================================================== */
.top-right-profile {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Pill Style for Profile Toggle */
.profile-avatar-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.profile-avatar-btn::before {
    content: attr(data-initial);
}

.profile-avatar-btn img {
    display: none;
}

.profile-avatar-btn:hover {
    transform: scale(1.05);
}

.icon-btn.grid-menu {
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn.grid-menu:hover {
    background: #f8fafc;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .entry-layout {
        width: 100%;
        padding-inline: 4px;
    }
    .entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .entry-grid-lokasi {
        grid-template-columns: 1fr !important;
    }
    .entry-grid-coords {
        grid-template-columns: 1fr !important;
    }
    .entry-grid-photos {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Map Legend
   ========================================================================== */
.map-legend {
    position: absolute;
    bottom: 30px;
    left: 24px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    z-index: 900;
    width: 220px;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-legend.minimized {
    width: auto;
    padding: 12px 16px;
    border-radius: 24px;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.legend-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.minimize-legend-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.minimize-legend-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
}

.map-legend.minimized .legend-content {
    display: none;
}

.map-legend.minimized .minimize-legend-btn i {
    transform: rotate(180deg);
}

.legend-content {
    margin-top: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.legend-icon.gudang { background: #ef4444; }
.legend-icon.kecamatan { background: #f59e0b; }
.legend-icon.kelurahan-officer { background: #8b5cf6; }
.legend-icon.desa-officer { background: #3b82f6; }
.legend-icon.desa { background: #10b981; }

.legend-item span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   Bottom Controls
   ========================================================================== */
.bottom-controls {
    position: absolute;
    bottom: 30px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 900;
}

.zoom-controls, .layer-control {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.zoom-controls button, .layer-control {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-main);
    transition: background 0.2s;
}

.zoom-controls button:hover, .layer-control:hover {
    background: #f1f5f9;
}

.zoom-controls button:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

/* ==========================================================================
   Info Panel
   ========================================================================== */
.info-panel {
    position: fixed;
    top: 24px;
    right: 24px;
    bottom: 24px;
    width: 400px;
    background: white;
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
}

.info-panel.open {
    transform: translateX(0);
}

.info-header {
    position: relative;
    padding: 0 !important;
    height: 180px;
    background: #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.info-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.info-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 2;
    padding: 24px;
    display: flex;
    align-items: flex-end;
}

.info-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.info-close-btn:hover {
    background: white;
    color: var(--text-main);
}

.info-title-badge {
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 3;
}

.info-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.info-main-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.info-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.info-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
}

.stat-card:hover {
    background: white;
    box-shadow: var(--shadow-sm);
    border-color: #cbd5e1;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.panel-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.action-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.analysis-action-btn {
    background: #f97316;
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.analysis-action-btn:hover {
    background: #ea580c;
    transform: translateY(-2px);
}

/* Analysis Sidebar (Modern Redesign) */
.analysis-sidebar {
    position: fixed;
    top: 24px;
    right: 24px;
    bottom: 24px;
    width: 400px; /* Slightly wider for better layout */
    background: #f8fafc; /* Light gray background for contrast */
    z-index: 1000;
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.analysis-sidebar.open {
    transform: translateX(0);
}

.analysis-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.9);
}

.analysis-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.close-analysis-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.close-analysis-btn:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: rotate(90deg);
}

.analysis-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 100px; /* Extra padding for bottom actions */
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.analysis-content::-webkit-scrollbar {
    width: 6px;
}
.analysis-content::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.analysis-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.2s;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title i {
    color: var(--primary);
    font-size: 18px;
    background: #eff6ff;
    padding: 6px;
    border-radius: 8px;
}

/* Header Card Specifics */
.header-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-left: 4px solid var(--primary);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.icon-box.gudang { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.icon-box.location { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }

.location-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.location-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-high { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-medium { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-low { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }

/* Metric Row */
.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.metric-item {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.metric-item:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.metric-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.metric-value small {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.metric-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.3;
}

/* Progress Section */
.progress-section {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 16px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
}

.progress-value {
    color: var(--primary);
    font-weight: 700;
}

.progress-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Admin Stats */
.admin-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #eff6ff;
    border-radius: 12px;
    border: 1px solid #dbeafe;
}

.admin-stat-item .val {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.admin-stat-item .lbl {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Kecamatan List */
.kecamatan-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kecamatan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.kecamatan-item:hover {
    background: white;
    border-color: #cbd5e1;
}

.kec-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.kec-status {
    color: #059669;
    font-size: 16px;
}

.more-items {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    font-weight: 500;
    font-style: italic;
}

/* Buttons */
.btn-primary-full {
    width: 100%;
}

/* ==========================================================================
   Route Labels & Animations
   ========================================================================== */
.route-label-icon {
    background: transparent;
    border: none;
}

/* Ensure label content is visible and not clipped */
.route-label-icon > div {
    position: relative;
    pointer-events: none; /* Let clicks pass through to map/lines */
}

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

.animate-fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
