body {
    font-family: 'Vazir', Tahoma, sans-serif; /* Use a Persian font */
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

.form-container {
    background-color: #fff;
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 20px;
}

h2 {
    margin-top: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column; /* Default to column for stacking */
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important for width calculation */
    font-family: inherit; /* Use the font from body */
}

.form-group textarea {
    resize: vertical;
}

/* For inline radio/checkbox groups */
.form-group.inline {
    flex-direction: row;
    align-items: center;
    gap: 15px; /* Spacing between elements */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.form-group.inline label {
    margin-bottom: 0; /* Remove bottom margin for inline labels */
    flex-shrink: 0; /* Prevent label from shrinking */
}

.form-group input[type="radio"],
.form-group input[type="checkbox"] {
    margin-right: 5px;
}


/* Damage Group Styling */
.damage-group {
    border: 1px dashed #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: #fff;
}
.damage-group label:first-child { /* Label for the main damage type */
    font-size: 1.1em;
    color: #0056b3;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}
.damage-group .sub-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap; /* Allow wrapping */
}
.damage-group .sub-group label {
    min-width: 180px; /* Give labels a fixed minimum width */
    margin-bottom: 0;
}
.damage-group .sub-group input {
    flex-grow: 1; /* Allow inputs to take available space */
    min-width: 120px; /* Minimum width for input */
}

/* Styling for radio buttons that control other fields */
#legal-services-options {
    margin-left: 40px; /* Indent under the radio button */
    margin-top: 10px;
    padding-left: 10px;
    border-left: 2px solid #007bff;
}
#legal-services-options label {
    font-weight: normal;
    color: #333;
}

/* Input validation styling */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Error message styling */
.error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
    display: block; /* Make sure it takes space */
}

/* Hide error messages by default */
.form-group .error-message {
    display: none;
}

/* Show error messages when the input has the error class */
.form-group input.input-error,
.form-group select.input-error,
.form-group textarea.input-error {
    border-color: #dc3545;
}


button[type="submit"] {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    display: block; /* Make it a block element */
    width: 100%; /* Full width */
    margin-top: 20px;
}

button[type="submit"]:hover {
    background-color: #218838;
}

/* Message display */
.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight:bold;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
        margin: 20px;
    }
    .damage-group .sub-group {
        flex-direction: column;
        align-items: flex-start;
    }
     .damage-group .sub-group label {
        min-width: auto; /* Reset min-width */
    }
    .form-group.inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
     .form-group.inline label:first-child {
        margin-bottom: 8px;
    }
}

/* Persian Font - Vazir (Example, make sure you have it or use another one) */
@font-face {
    font-family: 'Vazir';
    src: url('path/to/Vazir.woff2') format('woff2'), url('path/to/Vazir.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
/* If you don't have Vazir, you can link to a CDN or use a system font */
/* Example using system font stack */
/* body { font-family: 'Tahoma', 'Arial', sans-serif; } */
        /* Admin Panel Specific Styles */
        .admin-container {
            max-width: 1200px;
            margin: 30px auto;
            padding: 20px;
            background-color: #fff;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
        }
        .report-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        .report-table th, .report-table td {
            border: 1px solid #ddd;
            padding: 12px;
            text-align: right;
            vertical-align: top; /* Align content to the top */
        }
        .report-table th {
            background-color: #0056b3;
            color: white;
            font-size: 1.1em;
        }
        .report-table tr:nth-child(even) {
            background-color: #f2f2f2;
        }
        .report-table td:last-child {
            white-space: nowrap; /* Prevent wrapping for actions */
        }
        .report-details {
            display: none; /* Hidden by default */
            margin-top: 10px;
            padding: 10px;
            border: 1px solid #eee;
            background-color: #fdfdfd;
            font-size: 0.9em;
            border-radius: 4px;
        }
        .report-details.visible {
            display: block;
        }
        .toggle-details {
            cursor: pointer;
            color: #007bff;
            text-decoration: underline;
        }
        .report-data-label {
            font-weight: bold;
            color: #555;
            display: inline-block;
            min-width: 200px; /* Adjust as needed */
        }
        .report-data-value {
             color: #333;
        }
        
        /* Responsive table */
         @media (max-width: 768px) {
            .report-table thead {
                display: none; /* Hide table header on small screens */
            }
            .report-table, .report-table tbody, .report-table tr, .report-table td {
                display: block;
                width: 100%;
            }
            .report-table tr {
                margin-bottom: 15px;
                border: 1px solid #ddd;
            }
            .report-table td {
                text-align: right;
                padding-left: 50%; /* Make space for the label */
                position: relative;
                border: none; /* Remove inner borders */
                padding-top: 8px;
                padding-bottom: 8px;
            }
             .report-table td::before {
                content: attr(data-label); /* Use data-label for pseudo-header */
                position: absolute;
                left: 6px;
                width: 45%;
                padding-right: 10px;
                white-space: nowrap;
                font-weight: bold;
                text-align: left;
            }
             .report-table td:last-child { /* Actions column */
                 text-align: right;
                 padding-left: 6px; /* Reset padding */
             }
              .report-table td:last-child::before {
                 display: none; /* Hide pseudo-header for actions */
              }
         }
/* style.css */

    .message-container {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 5px;
        text-align: right; /* برای فارسی */
        font-weight: bold;
    }

    .success-message {
        background-color: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

    .error-message {
        background-color: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

    .input-error {
        border: 2px solid #dc3545 !important; /* مهم! برای برجسته کردن فیلد خطادار */
        box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    }

    /* اطمینان حاصل کنید که فیلد نوع بیمه وقتی غیرفعاله ظاهر مناسبی داره */
    input[disabled], select[disabled] {
        background-color: #e9ecef; /* رنگ خاکستری ملایم */
        cursor: not-allowed;
    }

