/* ======================================================
   Budget_kazny.css
   Стили для блока бюджета казны - как в index.html
   ====================================================== */

.budget-section {
    max-width: 800px;
    margin: 30px auto;
    padding: 25px;
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid rgba(19, 135, 58, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.budget-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(19, 135, 58, 0.3);
}

.budget-header h2 {
    color: #13873a;
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.budget-header p {
    color: #adb5bd;
    margin: 0;
    font-size: 1rem;
}

.financial-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

.legend-label {
    font-size: 0.875rem;
    color: #adb5bd;
}

.bar-chart-container {
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bar-label {
    width: 100px;
    text-align: right;
    font-size: 0.875rem;
    color: #adb5bd;
}

.bar-container {
    flex: 1;
    background-color: #374151;
    border-radius: 0.25rem;
    height: 1.5rem;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 0.25rem;
    position: relative;
}

.bar-value {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.total-amount-display {
    text-align: center;
    margin-bottom: 1rem;
}

.total-amount-value {
    font-size: 2rem;
    font-weight: bold;
    color: #22c55e;
}

.total-amount-label {
    font-size: 1rem;
    color: #9ca3af;
}

@media (max-width: 768px) {
    .budget-section {
        margin: 15px;
        padding: 20px;
    }
    .budget-header h2 {
        font-size: 1.5rem;
    }
    .chart-wrapper {
        max-width: 280px;
    }
    .bar-label {
        width: 80px;
        font-size: 0.75rem;
    }
}

.budget-info-card .card-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.budget-info-card.total .card-icon i { color: #22c55e; }
.budget-info-card.expenses .card-icon i { color: #ef4444; }
.budget-info-card.remaining .card-icon i { color: #3b82f6; }

            /* Стили для трёх карточек под диаграммой */
            .budget-cards-row {
                display: flex;
                justify-content: space-between;
                gap: 20px;
                margin-top: 40px;
                flex-wrap: wrap;
            }

            .budget-info-card {
                flex: 1;
                background: rgba(28, 33, 41, 0.7);
                border-radius: 16px;
                padding: 20px;
                text-align: center;
                border: 1px solid rgba(19, 135, 58, 0.2);
                transition: all 0.3s ease;
                min-width: 180px;
            }

            .budget-info-card:hover {
                border-color: #13873a;
                transform: translateY(-3px);
            }

            .budget-info-card .card-icon {
                font-size: 28px;
                margin-bottom: 10px;
            }

            .budget-info-card .card-label {
                font-size: 14px;
                color: #8a9bb5;
                text-transform: uppercase;
                letter-spacing: 1px;
                margin-bottom: 8px;
            }

            .budget-info-card .card-amount {
                font-size: 32px;
                font-weight: 800;
                font-family: monospace;
                margin-bottom: 8px;
            }

            .budget-info-card .card-percent {
                font-size: 13px;
                color: #8a9bb5;
            }

            .budget-info-card.total .card-icon i { color: #22c55e; }
            .budget-info-card.total .card-amount { color: #22c55e; }
            
            .budget-info-card.expenses .card-icon i { color: #ef4444; }
            .budget-info-card.expenses .card-amount { color: #ef4444; }
            
            .budget-info-card.remaining .card-icon i { color: #3b82f6; }
            .budget-info-card.remaining .card-amount { color: #3b82f6; }

            @media (max-width: 768px) {
                .budget-cards-row {
                    flex-direction: column;
                    gap: 12px;
                }
                .budget-info-card .card-amount {
                    font-size: 24px;
                }
            }