/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Welcome Notification Styles */
.welcome-notification {
    animation: slideInRight 0.3s ease-out;
}

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

.welcome-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.welcome-text h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.welcome-text p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.welcome-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    margin-left: auto;
}

.welcome-close:hover {
    background: rgba(255,255,255,0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #dce1e6, #14486b);
    padding: 1rem 0 -1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: rgb(49, 94, 100);
    font-size: 1.6rem;
    font-weight: bold;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.logo-image {
    height: 100px;
    width: auto;
    margin-right: 12px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 1.2rem;
}

.nav-link:hover {
    color: #74b9ff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Screen Management */
.screen {
    display: none;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-section>* {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Container */
.search-container {
    max-width: 700px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.search-box button {
    padding: 15px 25px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.search-box button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: scale(1.05);
}

.search-filters select {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.search-filters select:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Enhanced Stats Section */
.stats-section {
    padding: 3rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    margin: 2rem 0;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2.5rem;
    border-radius: 25px;
    color: white;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 60px rgba(102, 126, 234, 0.4);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 15px 40px rgba(240, 147, 251, 0.3);
}

.stat-card:nth-child(2):hover {
    box-shadow: 0 25px 60px rgba(240, 147, 251, 0.4);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 15px 40px rgba(79, 172, 254, 0.3);
}

.stat-card:nth-child(3):hover {
    box-shadow: 0 25px 60px rgba(79, 172, 254, 0.4);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 15px 40px rgba(67, 233, 123, 0.3);
}

.stat-card:nth-child(4):hover {
    box-shadow: 0 25px 60px rgba(67, 233, 123, 0.4);
}

.stat-card:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 15px 40px rgba(250, 112, 154, 0.3);
}

.stat-card:nth-child(5):hover {
    box-shadow: 0 25px 60px rgba(250, 112, 154, 0.4);
}

.stat-card:nth-child(6) {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    box-shadow: 0 15px 40px rgba(168, 237, 234, 0.3);
}

.stat-card:nth-child(6):hover {
    box-shadow: 0 25px 60px rgba(168, 237, 234, 0.4);
}

.stat-icon {
    font-size: 3.5rem;
    opacity: 0.9;
    min-width: 80px;
    text-align: center;
    animation: pulse 2s infinite;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-content p {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    opacity: 0.95;
    font-weight: 500;
}

.stat-change {
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    display: inline-block;
}

.stat-change.positive {
    background: rgba(39, 174, 96, 0.3);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.5);
}

.stat-change.negative {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.5);
}

.stat-change.neutral {
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Dashboard Section */
.dashboard-section {
    padding: 4rem 0;
    background: transparent;
}

.dashboard-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
}

.chart-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-header h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-btn {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.9rem;
}

.chart-btn.active,
.chart-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
}

.chart-summary {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s;
}

.summary-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.panel-header h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

.activity-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
    transform: translateY(-1px);
}

.activity-list {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.activity-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-left: 4px solid #3498db;
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    border-radius: 0 15px 15px 0;
    transition: all 0.3s ease;
    position: relative;
}

.activity-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.activity-item.high-priority {
    border-left-color: #e74c3c;
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.05), #f8f9fa);
}

.activity-item.medium-priority {
    border-left-color: #f39c12;
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.05), #f8f9fa);
}

.activity-item.low-priority {
    border-left-color: #27ae60;
    background: linear-gradient(90deg, rgba(39, 174, 96, 0.05), #f8f9fa);
}

.activity-icon {
    color: #3498db;
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
    margin-top: 0.2rem;
}

.activity-content {
    flex: 1;
}

.activity-content strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.activity-content p {
    color: #666;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.activity-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.timestamp {
    color: #666;
    font-weight: 500;
}

.category {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.impact {
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.impact.high {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.impact.medium {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.impact.low {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.view-all-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 1rem;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

/* Budget Screen Enhancements */
.budget-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.budget-header h1 {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-weight: 700;
}

.budget-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.summary-stat {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.summary-stat:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
}

.summary-stat .label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.summary-stat .value {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.summary-stat .change {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
}

.summary-stat .change.positive {
    color: #27ae60;
}

.summary-stat .change.negative {
    color: #e74c3c;
}

.summary-stat .change.neutral {
    color: #666;
}

.budget-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    align-items: end;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.control-group select {
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    transition: all 0.3s;
    min-width: 200px;
    cursor: pointer;
}

.control-group select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.export-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.budget-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.budget-chart-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.chart-options {
    display: flex;
    gap: 0.5rem;
}

.chart-toggle {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.9rem;
}

.chart-toggle.active,
.chart-toggle:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
}

.budget-insights {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border-left: 4px solid #3498db;
}

.budget-insights h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.budget-insights ul {
    list-style: none;
    padding: 0;
}

.budget-insights li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: #666;
    line-height: 1.5;
}

.budget-insights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

.budget-details {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

#budgetDetailsContent {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #3498db #f1f1f1;
}

/* Custom scrollbar for webkit browsers */
#budgetDetailsContent::-webkit-scrollbar {
    width: 8px;
}

#budgetDetailsContent::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#budgetDetailsContent::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
    transition: background 0.3s ease;
}

#budgetDetailsContent::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.budget-details h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.department-item {
    border: 2px solid #f0f0f0;
    border-radius: 20px;
    margin-bottom: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.department-item:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
}

.dept-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.dept-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.dept-icon.education {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.dept-icon.infrastructure {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.dept-icon.safety {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.dept-icon.health {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.dept-info {
    flex: 1;
}

.dept-info h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.dept-info .amount {
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.dept-info .description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.dept-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: end;
}

.change-indicator {
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.change-indicator.positive {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.change-indicator.negative {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.efficiency-score {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.dept-breakdown {
    padding: 0 2rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item span:first-child {
    color: #666;
}

.breakdown-item span:last-child {
    font-weight: 600;
    color: #2c3e50;
}

/* Contracts Section */
.contracts-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-top: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
}

.contract-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.contract-stats .stat {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.contract-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contract-filters select,
.contract-filters input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.contract-filters select:focus,
.contract-filters input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.contract-filters input {
    min-width: 250px;
}

.contracts-table {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contracts-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.contracts-table th {
    padding: 1.5rem 1rem;
    text-align: left;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contracts-table th:first-child {
    border-radius: 15px 0 0 0;
}

.contracts-table th:last-child {
    border-radius: 0 15px 0 0;
}

.contracts-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.contract-row {
    transition: all 0.3s ease;
}

.contract-row:hover {
    background: linear-gradient(90deg, #f8f9fa, #ffffff);
    transform: scale(1.01);
}

.contract-row.high-value {
    border-left: 4px solid #e74c3c;
}

.contract-row.medium-value {
    border-left: 4px solid #f39c12;
}

.contract-row.pending {
    border-left: 4px solid #9b59b6;
}

.contract-info strong {
    color: #2c3e50;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.contract-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.contract-id {
    font-size: 0.8rem;
    color: #999;
    font-family: monospace;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

.vendor-info strong {
    color: #2c3e50;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.3rem;
}

.vendor-info p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.vendor-type {
    font-size: 0.8rem;
    color: #999;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.financial-info strong {
    color: #2c3e50;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.financial-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.budget-status {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.budget-status.on-budget {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.budget-status.completed {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.budget-status.pending {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.timeline-info strong {
    color: #2c3e50;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.3rem;
}

.timeline-info p {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.progress-mini {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
}

.progress-fill.completed {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.status {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.status.active {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status.pending {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status.completed {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.status-details {
    font-size: 0.8rem;
    color: #666;
}

.milestone {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.btn-view {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.85rem;
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-download {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.pagination-controls button {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination-controls button:hover:not(:disabled) {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media screen and (max-width: 1024px) {

    .dashboard-grid,
    .budget-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(135deg, #2c3e50, #3498db);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .budget-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group select {
        min-width: auto;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .contract-stats {
        justify-content: center;
    }

    .dept-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .dept-metrics {
        align-items: center;
    }

    .activity-item {
        flex-direction: column;
        gap: 1rem;
    }

    .activity-meta {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .budget-header h1 {
        font-size: 2.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 2rem;
        flex-direction: column;
        text-align: center;
    }

    .search-box {
        flex-direction: column;
        border-radius: 20px;
    }

    .search-box input {
        border-radius: 20px;
        margin-bottom: 1rem;
    }

    .search-box button {
        border-radius: 20px;
    }

    .contracts-table {
        font-size: 0.8rem;
    }

    .contracts-table th,
    .contracts-table td {
        padding: 1rem 0.5rem;
    }

    .action-buttons {
        flex-direction: row;
    }
}

/* Chart Responsiveness */
.chart-container canvas {
    max-height: 400px;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e0, #a0aec0);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a0aec0, #718096);
}

/* ============================================
   VOTING RECORDS SCREEN STYLES
   ============================================ */

#voting-screen {
    padding: 2rem 0;
}

#voting-screen h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.voting-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.voting-filters input,
.voting-filters select {
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    transition: all 0.3s;
    min-width: 200px;
    cursor: pointer;
}

.voting-filters input:focus,
.voting-filters select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.officials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.official-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.official-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.6s ease;
}

.official-card:hover::before {
    left: 100%;
}

.official-card:hover {
    transform: translateY(-10px);
    border-color: #3498db;
    box-shadow: 0 25px 70px rgba(52, 152, 219, 0.2);
}

.official-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    border: 4px solid #e9ecef;
    transition: all 0.3s;
}

.official-card:hover img {
    border-color: #3498db;
    transform: scale(1.1);
}

.official-card h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.official-card p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.voting-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 1.5rem;
}

.voting-stats span {
    padding: 8px 16px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.vote-yes {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 2px solid rgba(39, 174, 96, 0.3);
}

.vote-no {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 2px solid rgba(231, 76, 60, 0.3);
}

.vote-abstain {
    background: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
    border: 2px solid rgba(149, 165, 166, 0.3);
}

.recent-votes {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.recent-votes h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.votes-timeline {
    position: relative;
    padding-left: 2rem;
}

.votes-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #3498db, #2980b9);
    border-radius: 2px;
}

.vote-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 20px;
    border-left: 4px solid #3498db;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.vote-item::before {
    content: '';
    position: absolute;
    left: -2.2rem;
    top: 2rem;
    width: 16px;
    height: 16px;
    background: #3498db;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
}

.vote-item:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.15);
}

.vote-date {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vote-content h4 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.vote-content p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.vote-results {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.result {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result.passed {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 2px solid rgba(39, 174, 96, 0.3);
}

.result.failed {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 2px solid rgba(231, 76, 60, 0.3);
}

.vote-breakdown {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.voting-patterns-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    padding: 3rem;
    border-radius: 25px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    margin-top: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.voting-patterns-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #e74c3c, #f39c12);
    border-radius: 25px 25px 0 0;
}

.voting-patterns-section h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
}

.voting-patterns-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

.voting-patterns-section .chart-container {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    border: 1px solid #f1f2f6;
    position: relative;
    margin-top: 2rem;
}

.voting-patterns-section .chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(52, 152, 219, 0.02) 50%, transparent 51%);
    pointer-events: none;
    border-radius: 20px;
}

/* Enhanced canvas styling */
#votingPatternsChart {
    max-height: 400px !important;
    height: 400px !important;
    width: 100% !important;
    border-radius: 15px;
    transition: transform 0.2s ease;
}

#votingPatternsChart:hover {
    transform: scale(1.01);
}

.tag {
    display: inline-block;
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    color: #495057;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0.2rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    transform: translateY(-1px);
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.planning {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-badge.trending {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-badge.positive {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.urgent {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
    animation: pulse 1.5s infinite;
}

.verified {
    color: #3498db;
    margin-left: 0.5rem;
}

.search-container {
    position: relative;
}

.btn-download-small {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.btn-download-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* Enhanced mobile responsiveness */
@media screen and (max-width: 480px) {
    .voting-patterns-section {
        padding: 2rem 1rem;
    }

    .voting-patterns-section h2 {
        font-size: 1.8rem;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
        margin: 0.1rem;
    }
}

/* ============================================
   COMMUNITY SCREEN STYLES
   ============================================ */

#community-screen {
    padding: 2rem 0;
}

#community-screen h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.community-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    padding: 12px 30px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 1rem;
    color: #666;
}

.tab-btn.active,
.tab-btn:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.community-tab {
    display: none;
}

.community-tab.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.discussion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.discussions-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.discussion-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    cursor: pointer;
}

.discussion-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(52, 152, 219, 0.15);
}

.discussion-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.discussion-meta i {
    font-size: 1.5rem;
    color: #3498db;
}

.discussion-meta .timestamp {
    color: #999;
    font-size: 0.85rem;
}

.discussion-item h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.discussion-item p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.discussion-stats {
    display: flex;
    gap: 2rem;
    color: #999;
    font-size: 0.9rem;
}

.discussion-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discussion-stats i {
    color: #3498db;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(52, 152, 219, 0.15);
}

.project-card h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.project-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
}

.project-progress span {
    font-weight: 600;
    color: #3498db;
}

.project-card p {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.3);
}

.poll-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.poll-item h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.poll-options {
    margin-bottom: 1.5rem;
}

.poll-option {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
}

.option-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.2), rgba(52, 152, 219, 0.1));
    transition: width 0.3s ease;
    border-radius: 10px;
}

.poll-option span {
    position: relative;
    z-index: 2;
    font-weight: 600;
    color: #2c3e50;
}

/* ============================================
   REPORT SCREEN STYLES
   ============================================ */

#report-screen {
    padding: 2rem 0;
}

#report-screen h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.report-description {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.report-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.radio-group label:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.radio-group input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #3498db;
}

.form-section select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
}

.form-section select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-section textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
    transition: all 0.3s;
}

.form-section textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-section input[type="file"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px dashed #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
}

.form-section input[type="file"]:hover {
    border-color: #3498db;
    background: #e3f2fd;
}

.form-section small {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
}

.anonymity-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border-left: 4px solid #3498db;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #3498db;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.contact-fields {
    display: grid;
    gap: 1rem;
    transition: all 0.3s;
}

.contact-fields.hidden {
    opacity: 0.3;
    pointer-events: none;
}

.contact-fields input {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.contact-fields input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-section button {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    margin-right: 1rem;
}

.form-section .btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.form-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.form-section .btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.report-guidelines {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #f39c12;
}

.report-guidelines h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.report-guidelines ul {
    list-style: none;
    padding: 0;
}

.report-guidelines li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    color: #666;
    line-height: 1.6;
}

.report-guidelines li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 1.5rem 0 0.5rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-section h4 {
    color: #74b9ff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #74b9ff;
}

.footer-bottom {
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* ============================================
   ADDITIONAL RESPONSIVE UPDATES
   ============================================ */

@media screen and (max-width: 768px) {
    .voting-filters {
        flex-direction: column;
    }

    .voting-filters input,
    .voting-filters select {
        min-width: auto;
    }

    .officials-grid {
        grid-template-columns: 1fr;
    }

    .vote-item {
        padding-left: 1rem;
    }

    .votes-timeline {
        padding-left: 1rem;
    }

    .votes-timeline::before {
        left: 0.5rem;
    }

    .vote-item::before {
        left: -1.7rem;
    }

    .community-nav {
        flex-wrap: wrap;
    }

    .radio-group {
        gap: 0.5rem;
    }

    .radio-group label {
        padding: 0.8rem;
    }

    .anonymity-toggle {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .discussion-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Pre
vent infinite canvas height growth - CRITICAL FIX */
#detailedBudgetChart {
    max-height: 400px !important;
    height: 400px !important;
    width: 100% !important;
    max-width: 100% !important;
}

#budgetOverviewChart {
    max-height: 400px !important;
    height: 400px !important;
    width: 100% !important;
    max-width: 100% !important;
}

.budget-chart-container canvas {
    max-height: 400px !important;
    height: 400px !important;
}

/* Prevent any canvas from growing infinitely */
canvas {
    max-height: 500px !important;
}

/* Responsive adjustments for Department Analysis scrolling */
@media (max-width: 768px) {
    #budgetDetailsContent {
        max-height: 400px;
        padding-right: 5px;
    }

    .budget-details {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    #budgetDetailsContent {
        max-height: 350px;
    }
}

/* E
nhanced width for larger screens */
@media screen and (min-width: 1400px) {
    .budget-grid {
        grid-template-columns: 1fr 1.15fr;
        gap: 4rem;
    }

    .budget-chart-container {
        padding: 3rem;
    }

    .budget-details {
        padding: 3rem;
    }
}

@media screen and (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }

    .nav-container {
        max-width: 1600px;
    }

    .budget-grid {
        gap: 5rem;
    }
}

/* 
Vote Details Modal - Official Avatar Sizing */
.official-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.official-avatar:hover {
    border-color: #3498db;
}

/* Vote Details Modal Styling */
.votes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.votes-list .vote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: none;
    margin-bottom: 0.5rem;
}

.official-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.official-details {
    display: flex;
    flex-direction: column;
}

.official-details strong {
    font-size: 0.95rem;
    color: #2c3e50;
    margin-bottom: 0.2rem;
}

.official-details span {
    font-size: 0.85rem;
    color: #666;
}

.vote-decision {
    display: flex;
    align-items: center;
}

.vote-result {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.vote-result.yes {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.vote-result.no {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.vote-result.abstain {
    background: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.vote-reasoning {
    margin-left: 66px;
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: rgba(52, 152, 219, 0.05);
    border-left: 3px solid #3498db;
    border-radius: 0 8px 8px 0;
}

.vote-reasoning p {
    margin: 0;
    font-style: italic;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Modal responsiveness for vote details */
@media (max-width: 768px) {
    .official-avatar {
        width: 40px !important;
        height: 40px !important;
    }

    .votes-list .vote-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .vote-reasoning {
        margin-left: 0;
        margin-top: 0.8rem;
    }
}

/*
 Official Profile Modal - Top Section Alignment */
.official-detail {
    max-width: 800px;
    margin: 0 auto;
}

.official-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: start;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.official-photo {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #3498db;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2);
}

.official-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    /* Allows text to wrap properly */
}

.official-info h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.official-info .position {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #3498db;
    line-height: 1.3;
}

.official-info .party {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.term-info {
    margin-top: 0.3rem;
}

.term-info span {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
    background: rgba(52, 152, 219, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-end;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: flex-start;
}

.contact-item:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.contact-item i {
    color: #3498db;
    width: 16px;
    text-align: center;
}

.contact-item a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #3498db;
}

/* Responsive adjustments for official profile header */
@media (max-width: 768px) {
    .official-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 1.5rem;
    }

    .official-photo {
        width: 100px !important;
        height: 100px !important;
        justify-self: center;
    }

    .official-info {
        align-items: center;
        text-align: center;
    }

    .contact-info {
        align-items: center;
    }

    .contact-item {
        min-width: auto;
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .official-header {
        padding: 1rem;
        gap: 1rem;
    }

    .official-photo {
        width: 80px !important;
        height: 80px !important;
    }

    .official-info h2 {
        font-size: 1.5rem;
    }

    .official-info .position {
        font-size: 1rem;
    }
}

/* Cha
rt description styling */
.chart-description {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Medium 
screen adjustments for stats grid */
@media screen and (max-width: 1200px) and (min-width: 769px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 1000px;
    }
}

@media screen and (max-width: 900px) and (min-width: 481px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

