@charset "UTF-8";
/* CSS Document */

        :root {
            --congo-green: #009639;
            --congo-yellow: #FBDE4A;
            --congo-red: #DC241F;
            --primary: #0D47A1;
            --primary-light: #1976D2;
            --success: #00C853;
            --success-light: #69F0AE;
            --warning: #FF9800;
            --warning-light: #FFB74D;
            --danger: #F44336;
            --danger-light: #EF5350;
            --info: #2196F3;
            --purple: #7C4DFF;
            --cyan: #00BCD4;
            --pink: #E91E63;
            --teal: #009688;
            
            --bg-dark: #0a0e17;
            --bg-card: #111827;
            --bg-card-hover: #1a2332;
            --bg-surface: #1e293b;
            --bg-input: #0f172a;
            
            --border-color: rgba(255, 255, 255, 0.08);
            --border-light: rgba(255, 255, 255, 0.12);
            
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            
            --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
            
            --sidebar-width: 280px;
            --header-height: 70px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-dark);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
        }

        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--bg-dark);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--bg-surface);
            border-radius: 4px;
        }

        .app-container {
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--bg-card);
            border-right: 1px solid var(--border-color);
            position: fixed;
            top: 0;
            left: 0;
            height: 100vh;
            z-index: 100;
            display: flex;
            flex-direction: column;
        }

        .sidebar-header {
            padding: 24px;
            border-bottom: 1px solid var(--border-color);
        }

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

        .logo-icon {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, var(--congo-green), var(--congo-yellow), var(--congo-red));
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
        }

        .logo-title {
            font-size: 20px;
            font-weight: 800;
            background: linear-gradient(135deg, var(--congo-green), var(--congo-yellow));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .logo-subtitle {
            font-size: 11px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .sidebar-nav {
            flex: 1;
            padding: 16px 12px;
            overflow-y: auto;
        }

        .nav-section-title {
            font-size: 10px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1.5px;
            padding: 8px 12px;
            margin: 16px 0 8px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-radius: 10px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            margin-bottom: 4px;
            position: relative;
        }

        .nav-item:hover {
            background: var(--bg-surface);
            color: var(--text-primary);
        }

        .nav-item.active {
            background: linear-gradient(135deg, rgba(0, 150, 57, 0.2), rgba(0, 150, 57, 0.1));
            color: var(--congo-green);
            border: 1px solid rgba(0, 150, 57, 0.3);
        }

        .nav-item i {
            width: 20px;
            font-size: 16px;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            margin-left: var(--sidebar-width);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* Top Header */
        .top-header {
            height: var(--header-height);
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 32px;
            position: sticky;
            top: 0;
            z-index: 50;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 24px;
        }

        .page-title {
            font-size: 20px;
            font-weight: 700;
        }

        .header-breadcrumb {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            color: var(--text-muted);
        }

        .header-breadcrumb a {
            color: var(--text-secondary);
            text-decoration: none;
        }

        .header-breadcrumb a:hover {
            color: var(--congo-green);
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .header-time {
            text-align: right;
        }

        .header-clock {
            font-size: 20px;
            font-weight: 700;
        }

        .header-date {
            font-size: 11px;
            color: var(--text-muted);
        }

        .header-btn {
            width: 40px;
            height: 40px;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .header-btn:hover {
            background: var(--bg-card-hover);
            color: var(--text-primary);
        }

        /* Stats Content */
        .stats-content {
            flex: 1;
            padding: 24px 32px;
            overflow-y: auto;
        }

        /* Sub Navigation Tabs */
        .sub-nav {
            display: flex;
            gap: 4px;
            background: var(--bg-card);
            padding: 6px;
            border-radius: 14px;
            margin-bottom: 24px;
            border: 1px solid var(--border-color);
            overflow-x: auto;
        }

        .sub-nav-item {
            padding: 12px 20px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .sub-nav-item:hover {
            background: var(--bg-surface);
            color: var(--text-primary);
        }

        .sub-nav-item.active {
            background: var(--congo-green);
            color: white;
        }

        .sub-nav-item i {
            font-size: 14px;
        }

        /* Tab Content */
        .tab-content {
            display: none;
        }

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

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

        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }

        .stat-mini {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            transition: all 0.2s ease;
        }

        .stat-mini:hover {
            border-color: var(--border-light);
            transform: translateY(-2px);
        }

        .stat-mini-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 12px;
            font-size: 18px;
        }

        .stat-mini-value {
            font-size: 24px;
            font-weight: 800;
            margin-bottom: 4px;
        }

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

        /* Card Component */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            overflow: hidden;
            margin-bottom: 24px;
        }

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

        .card-title {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 16px;
            font-weight: 700;
        }

        .card-title i {
            color: var(--congo-green);
        }

        .card-subtitle {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 4px;
        }

        .card-actions {
            display: flex;
            gap: 8px;
        }

        .card-btn {
            padding: 8px 16px;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 12px;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .card-btn:hover {
            background: var(--bg-card-hover);
            color: var(--text-primary);
        }

        .card-btn.primary {
            background: var(--congo-green);
            border-color: var(--congo-green);
            color: white;
        }

        .card-body {
            padding: 24px;
        }

        .card-body.no-padding {
            padding: 0;
        }

        /* Chart Container */
        .chart-container {
            height: 350px;
            position: relative;
        }

        .chart-container.small {
            height: 250px;
        }

        .chart-container.large {
            height: 450px;
        }

        /* Grid Layouts */
        .grid-2 {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 24px;
        }

        .grid-3 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
        }

        .grid-4 {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px;
        }

        /* Data Tables */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 14px 16px;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 1px solid var(--border-color);
            background: var(--bg-surface);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .data-table td {
            padding: 14px 16px;
            font-size: 13px;
            border-bottom: 1px solid var(--border-color);
            vertical-align: middle;
        }

        .data-table tbody tr {
            transition: background 0.2s ease;
        }

        .data-table tbody tr:hover {
            background: var(--bg-surface);
        }

        .data-table tbody tr:last-child td {
            border-bottom: none;
        }

        .table-container {
            max-height: 500px;
            overflow-y: auto;
        }

        /* Progress Bars */
        .progress-bar {
            width: 100%;
            height: 8px;
            background: var(--bg-dark);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        .progress-fill.green { background: linear-gradient(90deg, var(--success), var(--success-light)); }
        .progress-fill.blue { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
        .progress-fill.orange { background: linear-gradient(90deg, var(--warning), var(--warning-light)); }
        .progress-fill.red { background: linear-gradient(90deg, var(--danger), var(--danger-light)); }
        .progress-fill.purple { background: linear-gradient(90deg, var(--purple), #9c7cff); }
        .progress-fill.cyan { background: linear-gradient(90deg, var(--cyan), #4dd0e1); }

        /* Candidate Colors */
        .color-1 { background: linear-gradient(135deg, #1e88e5, #1565c0); }
        .color-2 { background: linear-gradient(135deg, #43a047, #2e7d32); }
        .color-3 { background: linear-gradient(135deg, #fb8c00, #ef6c00); }
        .color-4 { background: linear-gradient(135deg, #8e24aa, #6a1b9a); }
        .color-5 { background: linear-gradient(135deg, #00acc1, #00838f); }
        .color-6 { background: linear-gradient(135deg, #c0ca33, #9e9d24); }
        .color-7 { background: linear-gradient(135deg, #6d4c41, #4e342e); }

        /* Candidate Photo */
        .candidate-photo {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 700;
            color: white;
            flex-shrink: 0;
        }

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

        .candidate-name {
            font-weight: 600;
        }

        .candidate-party {
            font-size: 11px;
            color: var(--text-muted);
        }

        /* Vote Numbers */
        .vote-value {
            font-weight: 700;
            font-variant-numeric: tabular-nums;
        }

        .vote-percent {
            font-size: 11px;
            color: var(--text-muted);
        }

        .winner-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            background: rgba(0, 200, 83, 0.15);
            color: var(--success);
            font-size: 10px;
            font-weight: 700;
            border-radius: 20px;
            text-transform: uppercase;
        }

        /* Location Hierarchy */
        .location-cell {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .location-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
        }

        .location-icon.dept {
            background: rgba(0, 150, 57, 0.15);
            color: var(--congo-green);
        }

        .location-icon.district {
            background: rgba(33, 150, 243, 0.15);
            color: var(--info);
        }

        .location-icon.commune {
            background: rgba(124, 77, 255, 0.15);
            color: var(--purple);
        }

        .location-icon.bv {
            background: rgba(255, 152, 0, 0.15);
            color: var(--warning);
        }

        .location-name {
            font-weight: 600;
        }

        .location-meta {
            font-size: 11px;
            color: var(--text-muted);
        }

        /* Expandable Rows */
        .expandable-row {
            cursor: pointer;
        }

        .expand-icon {
            transition: transform 0.3s ease;
            color: var(--text-muted);
            margin-right: 8px;
        }

        .expandable-row.expanded .expand-icon {
            transform: rotate(90deg);
        }

        .child-row td:first-child {
            padding-left: 48px;
        }

        .child-row.level-2 td:first-child {
            padding-left: 72px;
        }

        .child-row.level-3 td:first-child {
            padding-left: 96px;
        }

        /* Filter Bar */
        .filter-bar {
            display: flex;
            gap: 16px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .filter-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        .filter-select {
            padding: 10px 16px;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 13px;
            color: var(--text-primary);
            cursor: pointer;
            min-width: 180px;
        }

        .filter-select:focus {
            outline: none;
            border-color: var(--congo-green);
        }

        .filter-input {
            padding: 10px 16px;
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 13px;
            color: var(--text-primary);
            min-width: 250px;
        }

        .filter-input:focus {
            outline: none;
            border-color: var(--congo-green);
        }

        .filter-btn {
            padding: 10px 20px;
            background: var(--congo-green);
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            align-self: flex-end;
        }

        .filter-btn:hover {
            background: #00a83f;
        }

        /* Summary Cards */
        .summary-row {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }

        .summary-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .summary-icon {
            width: 56px;
            height: 56px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }

        .summary-icon.green {
            background: rgba(0, 200, 83, 0.15);
            color: var(--success);
        }

        .summary-icon.blue {
            background: rgba(33, 150, 243, 0.15);
            color: var(--info);
        }

        .summary-icon.purple {
            background: rgba(124, 77, 255, 0.15);
            color: var(--purple);
        }

        .summary-icon.orange {
            background: rgba(255, 152, 0, 0.15);
            color: var(--warning);
        }

        .summary-content {
            flex: 1;
        }

        .summary-value {
            font-size: 28px;
            font-weight: 800;
        }

        .summary-label {
            font-size: 12px;
            color: var(--text-muted);
        }

        .summary-change {
            font-size: 12px;
            font-weight: 600;
            margin-top: 4px;
        }

        .summary-change.up {
            color: var(--success);
        }

        .summary-change.down {
            color: var(--danger);
        }

        /* Comparison Table */
        .comparison-header {
            display: grid;
            grid-template-columns: 200px repeat(7, 1fr);
            background: var(--bg-surface);
            border-radius: 12px 12px 0 0;
            overflow: hidden;
        }

        .comparison-header-cell {
            padding: 16px;
            text-align: center;
            border-right: 1px solid var(--border-color);
        }

        .comparison-header-cell:last-child {
            border-right: none;
        }

        .comparison-row {
            display: grid;
            grid-template-columns: 200px repeat(7, 1fr);
            border-bottom: 1px solid var(--border-color);
        }

        .comparison-row:last-child {
            border-bottom: none;
        }

        .comparison-cell {
            padding: 14px 16px;
            text-align: center;
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .comparison-cell:last-child {
            border-right: none;
        }

        .comparison-cell:first-child {
            text-align: left;
            align-items: flex-start;
        }

        .comparison-value {
            font-size: 16px;
            font-weight: 700;
        }

        .comparison-percent {
            font-size: 11px;
            color: var(--text-muted);
        }

        .comparison-bar {
            width: 100%;
            height: 6px;
            background: var(--bg-dark);
            border-radius: 3px;
            margin-top: 6px;
            overflow: hidden;
        }

        .comparison-bar-fill {
            height: 100%;
            border-radius: 3px;
        }

        /* Export Panel */
        .export-panel {
            display: flex;
            gap: 12px;
            padding: 16px 24px;
            background: var(--bg-surface);
            border-top: 1px solid var(--border-color);
        }

        .export-btn {
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            border: none;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.2s ease;
        }

        .export-btn.excel {
            background: #107c41;
            color: white;
        }

        .export-btn.pdf {
            background: #dc2626;
            color: white;
        }

        .export-btn.csv {
            background: var(--purple);
            color: white;
        }

        .export-btn.print {
            background: var(--bg-card);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }

        .export-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        /* Insights Cards */
        .insights-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }

        .insight-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            padding: 20px;
            position: relative;
            overflow: hidden;
        }

        .insight-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
        }

        .insight-card.green::before {
            background: var(--congo-green);
        }

        .insight-card.blue::before {
            background: var(--info);
        }

        .insight-card.orange::before {
            background: var(--warning);
        }

        .insight-title {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .insight-value {
            font-size: 28px;
            font-weight: 800;
            margin-bottom: 4px;
        }

        .insight-desc {
            font-size: 12px;
            color: var(--text-muted);
        }

        /* Responsive */
        @media (max-width: 1600px) {
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
            }
            
            .grid-4 {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 1200px) {
            .stats-grid {
                grid-template-columns: repeat(3, 1fr);
            }
            
            .grid-3 {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .summary-row {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* Print Styles */
        @media print {
            .sidebar, .top-header, .sub-nav, .card-actions, .export-panel {
                display: none !important;
            }
            
            .main-content {
                margin-left: 0;
            }
            
            .card {
                break-inside: avoid;
            }
        }