/* =====================================================
   DASHBOARD COMPONENTS STYLESHEET
   ===================================================== */

/* Budget Overview Section */
.budget-overview {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.budget-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-3xl);
}

.budget-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.budget-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.budget-card.primary {
    background: var(--gradient-primary);
    color: white;
}

.budget-card.primary .budget-header h3 {
    color: rgba(255, 255, 255, 0.9);
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.budget-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-500);
}

.currency-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 700;
}

.budget-amount {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
}

.budget-amount span {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.8;
}

.budget-usd {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: var(--spacing-md);
}

.budget-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: white;
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

.budget-comparison {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--success);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Allocation Section */
.allocation-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.allocation-chart-container h3,
.allocation-breakdown h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    color: var(--dark-800);
}

.chart-wrapper {
    position: relative;
    height: 280px;
    max-width: 350px;
    margin: 0 auto;
}

.priority-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.priority-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--light-100);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.priority-item:hover {
    background: var(--light-200);
    transform: translateX(5px);
}

.priority-color {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.priority-info {
    flex: 1;
}

.priority-name {
    font-weight: 600;
    color: var(--dark-800);
    font-size: 0.9rem;
}

.priority-amount {
    font-size: 0.8rem;
    color: var(--dark-500);
}

.priority-percent {
    font-weight: 700;
    color: var(--primary-green);
    font-size: 1rem;
}

/* Sectors Section */
.sectors-section {
    background: var(--light-100);
}

.sector-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-2xl);
}

.sector-tab {
    background: white;
    border: 2px solid transparent;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.sector-tab:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.sector-tab.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.sector-tab i {
    font-size: 1.1rem;
}

.sector-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
}

.sector-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--light-200);
}

.sector-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.sector-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.sector-title h3 {
    margin: 0;
    font-size: 1.5rem;
}

.sector-title p {
    margin: var(--spacing-xs) 0 0;
    font-size: 0.9rem;
}

.sector-budget {
    text-align: right;
}

.sector-budget-label {
    font-size: 0.8rem;
    color: var(--dark-500);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sector-budget-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-green);
}

.sector-budget-percent {
    font-size: 0.9rem;
    color: var(--dark-500);
}

.sector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.sector-stat-card {
    background: var(--light-100);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
}

.sector-stat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto var(--spacing-md);
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.sector-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-800);
}

.sector-stat-label {
    font-size: 0.85rem;
    color: var(--dark-500);
}

.sector-projects {
    margin-bottom: var(--spacing-2xl);
}

.sector-projects h4 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    color: var(--dark-800);
}

.project-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.project-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--light-100);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-green);
}

.project-item i {
    color: var(--primary-green);
    margin-top: 3px;
}

.project-item .project-name {
    font-weight: 600;
    color: var(--dark-800);
    font-size: 0.9rem;
}

.project-item .project-cost {
    font-size: 0.8rem;
    color: var(--dark-500);
}

.sector-timeline {
    background: var(--light-100);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

.sector-timeline h4 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    color: var(--dark-800);
}

.timeline-bar {
    display: flex;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--light-200);
}

.timeline-phase {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-sm);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition-base);
}

.timeline-phase:hover {
    filter: brightness(1.1);
}

.timeline-phase.planning {
    background: var(--accent-blue);
}

.timeline-phase.implementation {
    background: var(--primary-green);
}

.timeline-phase.operation {
    background: var(--accent-gold);
}

/* Timeline Section */
.timeline-section {
    background: white;
}

.timeline-controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-2xl);
}

.timeline-btn {
    background: var(--light-100);
    border: 2px solid transparent;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-600);
    cursor: pointer;
    transition: var(--transition-fast);
}

.timeline-btn:hover {
    border-color: var(--primary-green);
}

.timeline-btn.active {
    background: var(--primary-green);
    color: white;
}

.timeline-container {
    position: relative;
    padding: var(--spacing-xl) 0;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--light-200);
    transform: translateY(-50%);
    border-radius: var(--radius-full);
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.timeline-years {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.timeline-year {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.year-marker {
    width: 40px;
    height: 40px;
    background: white;
    border: 4px solid var(--light-300);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark-500);
    transition: var(--transition-base);
    margin-bottom: var(--spacing-md);
}

.timeline-year.active .year-marker,
.timeline-year.completed .year-marker {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
}

.year-label {
    font-weight: 600;
    color: var(--dark-800);
}

.year-budget {
    font-size: 0.8rem;
    color: var(--dark-500);
}

.milestone-tracker {
    margin-top: var(--spacing-3xl);
}

.milestone-tracker h3 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.milestones-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.milestone-card {
    background: var(--light-100);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border-left: 4px solid var(--primary-green);
    transition: var(--transition-base);
}

.milestone-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.milestone-year {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: var(--spacing-sm);
}

.milestone-title {
    font-weight: 600;
    color: var(--dark-800);
    margin-bottom: var(--spacing-xs);
}

.milestone-desc {
    font-size: 0.85rem;
    color: var(--dark-500);
}

/* Comparison Section */
.comparison-section {
    background: var(--light-100);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-3xl);
}

.comparison-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    position: relative;
    transition: var(--transition-base);
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.country-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--light-200);
}

.country-flag {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.country-info h4 {
    font-size: 1.1rem;
    margin: 0;
}

.country-info span {
    font-size: 0.8rem;
    color: var(--dark-500);
}

.country-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.country-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.country-stat .label {
    font-size: 0.85rem;
    color: var(--dark-500);
}

.country-stat .value {
    font-weight: 700;
    color: var(--dark-800);
}

.relevance-tag {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--primary-green);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-md);
}

.comparison-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.comparison-charts canvas {
    max-height: 220px !important;
}

.chart-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.chart-card h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
    color: var(--dark-800);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card canvas {
    max-height: 250px !important;
}

.chart-card.full-width canvas {
    max-height: 280px !important;
}

/* Projections Section */
.projections-section {
    background: white;
}

.projections-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
}

.projection-kpi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.kpi-card {
    background: var(--light-100);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    transition: var(--transition-base);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.kpi-card.gdp .kpi-icon { background: linear-gradient(135deg, #0077b6, #00b4d8); }
.kpi-card.revenue .kpi-icon { background: linear-gradient(135deg, #2ea44f, #3fb950); }
.kpi-card.roi .kpi-icon { background: linear-gradient(135deg, #d4af37, #f0c855); }
.kpi-card.fdi .kpi-icon { background: linear-gradient(135deg, #7b2cbf, #9d4edd); }

.kpi-content {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--dark-500);
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-800);
}

.kpi-change {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 600;
}

.projection-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.projection-charts-grid canvas {
    max-height: 220px !important;
}

.projection-charts-grid .full-width canvas {
    max-height: 260px !important;
}

/* ROI Calculator */
.roi-calculator {
    background: var(--light-100);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
}

.roi-calculator h3 {
    margin-bottom: var(--spacing-xl);
    color: var(--dark-800);
}

.roi-table-container {
    overflow-x: auto;
}

.roi-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.roi-table th,
.roi-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    border-bottom: 1px solid var(--light-200);
}

.roi-table th {
    background: var(--primary-green);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.roi-table td {
    font-size: 0.9rem;
    color: var(--dark-700);
}

.roi-table tbody tr:hover {
    background: var(--light-100);
}

.roi-table .positive {
    color: var(--success);
    font-weight: 600;
}

/* Implementation Section */
.implementation-section {
    background: var(--light-100);
}

.governance-structure {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-3xl);
}

.governance-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.governance-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.gov-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    margin-bottom: var(--spacing-md);
}

.governance-card h4 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    color: var(--dark-800);
}

.governance-card ul {
    list-style: none;
}

.governance-card li {
    padding: var(--spacing-sm) 0;
    font-size: 0.9rem;
    color: var(--dark-600);
    border-bottom: 1px solid var(--light-200);
    position: relative;
    padding-left: var(--spacing-lg);
}

.governance-card li:last-child {
    border-bottom: none;
}

.governance-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* Risk Matrix */
.risk-matrix {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-2xl);
}

.risk-matrix h3 {
    margin-bottom: var(--spacing-xl);
    color: var(--dark-800);
}

.risk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.risk-item {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid;
}

.risk-item.high {
    background: rgba(248, 81, 73, 0.1);
    border-color: var(--danger);
}

.risk-item.medium {
    background: rgba(210, 153, 34, 0.1);
    border-color: var(--warning);
}

.risk-item.low {
    background: rgba(46, 164, 79, 0.1);
    border-color: var(--success);
}

.risk-level {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.risk-item.high .risk-level { color: var(--danger); }
.risk-item.medium .risk-level { color: var(--warning); }
.risk-item.low .risk-level { color: var(--success); }

.risk-title {
    font-weight: 600;
    color: var(--dark-800);
    margin-bottom: var(--spacing-xs);
}

.risk-mitigation {
    font-size: 0.85rem;
    color: var(--dark-500);
}

/* Success Metrics */
.success-metrics {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-md);
}

.success-metrics h3 {
    margin-bottom: var(--spacing-xl);
    color: var(--dark-800);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.metric-card {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--light-100);
    border-radius: var(--radius-lg);
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-green);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--dark-500);
    margin-top: var(--spacing-xs);
}

.metric-target {
    font-size: 0.75rem;
    color: var(--dark-400);
    margin-top: var(--spacing-xs);
}

/* CTA Section */
.cta-section {
    background: var(--gradient-hero);
    padding: var(--spacing-3xl) 0;
}

.cta-content {
    text-align: center;
    color: white;
}

.cta-content h2 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.cta-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xl);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
}

.cta-buttons .btn-primary {
    background: white;
    color: var(--primary-green);
}

.cta-buttons .btn-secondary {
    border-color: white;
    color: white;
}

.cta-buttons .btn-secondary:hover {
    background: white;
    color: var(--primary-green);
}

/* Footer */
.main-footer {
    background: var(--dark-900);
    color: white;
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
    border-bottom: 1px solid var(--dark-700);
}

.footer-section h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
}

.footer-section p {
    color: var(--light-400);
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: var(--spacing-sm) 0;
}

.footer-section a {
    color: var(--light-400);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: white;
}

.footer-section li i {
    width: 20px;
    margin-right: var(--spacing-sm);
    color: var(--primary-green-light);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: var(--dark-500);
    font-size: 0.85rem;
    margin: var(--spacing-xs) 0;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .budget-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .budget-card.primary {
        grid-column: 1 / -1;
    }
    
    .comparison-grid,
    .governance-structure,
    .projection-kpi,
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .milestones-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .allocation-section {
        grid-template-columns: 1fr;
    }
    
    .sector-grid {
        grid-template-columns: 1fr;
    }
    
    .project-list {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid,
    .governance-structure,
    .projection-kpi,
    .metrics-grid,
    .comparison-charts,
    .projection-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .risk-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}
