.budget-page {
    max-width: var(--small-width);
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
}

.input-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.input-item {
    display: flex;
    flex-direction: column;
}

.input-item label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 500;
}

.input-item input {
    padding: 12px 14px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.input-item input:focus {
    outline: none;
    border-color: #f59e0b;
}

.grade-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grade-item {
    cursor: pointer;
}

.grade-item input[type="radio"] {
    display: none;
}

.grade-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.grade-item input[type="radio"]:checked + .grade-card {
    border-color: #f59e0b;
    background: #fffbeb;
}

.grade-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.grade-price {
    font-size: 12px;
    color: #64748b;
}

.calc-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.calc-btn:hover {
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.total-budget-card {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    color: #fff;
    margin-bottom: 24px;
}

.total-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.total-value {
    font-size: 48px;
    font-weight: 700;
}

.detail-section, .ratio-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 20px;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.detail-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
}

.detail-name {
    flex: 1;
    font-size: 14px;
    color: #475569;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #f59e0b;
}

.ratio-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ratio-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ratio-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ratio-icon {
    font-size: 16px;
}

.ratio-name {
    flex: 1;
    font-size: 13px;
    color: #475569;
}

.ratio-percent {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.ratio-bar-bg {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

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

.tips-box {
    background: #fef3c7;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #fde68a;
}

.tips-title {
    font-size: 16px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 12px;
}

.tips-list {
    margin: 0;
    padding-left: 20px;
}

.tips-list li {
    font-size: 14px;
    color: #b45309;
    margin-bottom: 8px;
    line-height: 1.6;
}

.tips-list li:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .budget-page {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .budget-page {
        padding: 16px;
    }

    .grade-options {
        grid-template-columns: 1fr;
    }

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

    .total-value {
        font-size: 36px;
    }

    .detail-list {
        grid-template-columns: 1fr;
    }
}