/* Form 4 - Bilan financier */
/* Бои: #C6B477 и #C5912F */
/* Simplified Box Style */
/* Radio buttons styling - Same colors as Form 3 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.radio-label:hover {
    border-color: #C6B477;
    background: #faf9f5;
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #C5912F;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 500;
    color: #C5912F;
}

.radio-label:has(input:checked) {
    border-color: #C6B477;
    background: #faf9f5;
}

.radio-label span {
    color: #333;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .radio-group {
        gap: 10px;
    }
    
    .radio-label {
        padding: 10px 12px;
        font-size: 14px;
    }
}

.form-4-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-4-container h2 {
    color: #C5912F;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.form-4-container h3.section-title {
    color: #C5912F;
    font-size: 20px;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #C6B477;
}

.form-field {
    margin-bottom: 25px;
}

.form-field label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 10px;
    font-size: 15px;
}

.required-mark {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 3px;
}

.form-field input[type="text"],
.form-field input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-field input:focus {
    outline: none;
    border-color: #C6B477;
    box-shadow: 0 0 0 3px rgba(198, 180, 119, 0.1);
}

/* Bilan row styling */
.bilan-row {
    display: grid;
    grid-template-columns: 200px 1fr 180px;
    gap: 15px;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.bilan-row label {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.bilan-row select {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    cursor: pointer;
}

.bilan-row input[type="number"],
.bilan-row input[type="text"] {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.bilan-row select:focus,
.bilan-row input:focus {
    outline: none;
    border-color: #C6B477;
    box-shadow: 0 0 0 3px rgba(198, 180, 119, 0.1);
}

.calc-field {
    text-align: right;
    font-weight: 600;
}

/* Total styling */
.bilan-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, #C6B477 0%, #C5912F 100%);
    color: #ffffff;
    border-radius: 6px;
    margin: 25px 0 35px;
    font-size: 16px;
}

.bilan-total strong {
    font-size: 17px;
}

.total-value {
    font-size: 20px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Summary section */
.bilan-summary {
    background-color: #faf9f5;
    border: 2px solid #C6B477;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
}

.bilan-summary h3 {
    color: #C5912F;
    font-size: 22px;
    margin-bottom: 25px;
    text-align: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 12px;
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.summary-row span {
    font-size: 16px;
    color: #34495e;
}

.summary-value {
    font-size: 20px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
}

.summary-net {
    background: linear-gradient(135deg, #46b450 0%, #3d9c46 100%);
    color: #ffffff;
    border: none;
    padding: 20px;
    margin-top: 20px;
}

.summary-net span,
.summary-net .summary-value {
    color: #ffffff;
    font-size: 18px;
}

.summary-net .summary-value {
    font-size: 24px;
}

/* Submit button */
.submit-button {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #C6B477 0%, #C5912F 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.submit-button:hover {
    background: linear-gradient(135deg, #C5912F 0%, #b8821a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 145, 47, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Form message */
.form-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.form-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.field-error {
    border-color: #e74c3c !important;
    background-color: #fef5f5 !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-4-container {
        padding: 20px;
        margin: 20px;
    }
    
    .form-4-container h2 {
        font-size: 22px;
    }
    
    .bilan-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .bilan-row label {
        font-size: 14px;
    }
    
    .bilan-total {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .summary-row {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .bilan-summary {
        padding: 20px;
    }
}

/* Print styles */
@media print {
    .submit-button,
    .form-message {
        display: none;
    }
    
    .bilan-row {
        break-inside: avoid;
    }
}