* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F8FAFC;
    direction: rtl;
    font-size: 14px;
    color: #23262F;
    min-height: 100vh;
}

.main-container {
    padding: 32px;
}

.content-container {
    max-width: 864px;
    margin: 0 auto;
    padding: 32px 0;
}

/* Page Title */
.page-title {
    font-size: 24px;
    color: #23262F;
    font-weight: 600;
    margin: 0 0 40px 0;
    padding: 0 32px;
}

/* Form Sections */
.form-section {
    width: 864px;
    margin-bottom: 24px;
    padding: 32px;
    background: #FFFFFF;
    border: 1px solid #F4F5F6;
    border-radius: 12px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.02);
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 16px;
    color: #23262F;
    font-weight: 600;
    margin: 0 0 24px 0;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.radio-option:hover {
    background-color: #F4F5F6;
}

.radio-option input[type='radio'] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #E6E8EC;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.radio-option input[type='radio']:checked + .radio-custom {
    border-color: #2B67F6;
}

.radio-option input[type='radio']:checked + .radio-custom::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #2B67F6;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-text {
    font-size: 14px;
    color: #23262F;
    font-weight: 500;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #777E91;
    font-size: 13px;
    font-weight: 500;
}

/* Select Inputs */
.select-container {
    position: relative;
}

.form-select {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #E6E8EC;
    border-radius: 8px;
    background: #F4F5F6;
    color: #777E91;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:hover {
    border-color: #B1B5C3;
}

.form-select:focus {
    outline: none;
    border-color: #2B67F6;
    background: white;
}

.select-arrow {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #777E91;
    pointer-events: none;
    font-size: 12px;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.half-width {
    flex: 1;
}

.third-width {
    flex: 0 0 calc(33.333% - 16px);
}

/* Text Inputs */
.form-control {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #E6E8EC;
    border-radius: 8px;
    font-size: 14px;
    color: #23262F;
    background: #F4F5F6;
    transition: all 0.3s ease;
}

.form-control:hover {
    border-color: #B1B5C3;
}

.form-control:focus {
    outline: none;
    border-color: #2B67F6;
    background: white;
}

.form-control::placeholder {
    color: #777E91;
}

/* Date Input */
.date-input {
    position: relative;
}

.date-input .form-control {
    padding-left: 40px;
    text-align: center;
    letter-spacing: 1px;
}

.date-input i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #777E91;
    font-size: 14px;
}



/* File Upload */
.file-upload-area {
    border: 1px dashed #E6E8EC;
    border-radius: 12px;
    background: #F4F5F6;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-upload-area:hover {
    border-color: #B1B5C3;
    background: #F8F9FA;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    margin-bottom: 12px;
}

.upload-icon i {
    font-size: 24px;
    color: #777E91;
}

.upload-text p {
    color: #23262F;
    font-size: 14px;
    margin: 0 0 4px 0;
}

.upload-text span {
    color: #777E91;
    font-size: 13px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #E6E8EC;
    border-radius: 6px;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    background: #F4F5F6;
    transition: all 0.3s ease;
}

.checkbox-input:checked + .checkbox-custom {
    background: #2B67F6;
    border-color: #2B67F6;
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.checkbox-text {
    font-size: 14px;
    color: #23262F;
}

/* Submit Button Styles */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.btn-add {
    background-color: #2B67F6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 40px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background-color: #1b4fd6;
    transform: translateY(-1px);
}

/* Responsive Design */

/* Large Tablets - 992px to 1199px */
@media (max-width: 1199px) and (min-width: 992px) {
    .main-container {
        padding: 24px 16px;
    }
    
    .content-container {
        max-width: 100%;
        padding: 24px 0;
    }
    
    .form-section {
        width: 100%;
        max-width: 800px;
        margin: 0 auto 24px auto;
        padding: 28px;
    }
    
    .page-title {
        padding: 0 28px;
        font-size: 22px;
    }
}

/* Small Tablets - 768px to 991px */
@media (max-width: 991px) and (min-width: 768px) {
    .main-container {
        padding: 20px 12px;
    }
    
    .content-container {
        max-width: 100%;
        padding: 20px 0;
    }
    
    .page-title {
        font-size: 20px;
        margin-bottom: 32px;
        padding: 0 24px;
    }
    
    .form-section {
        width: 100%;
        max-width: 720px;
        margin: 0 auto 20px auto;
        padding: 24px;
        border-radius: 10px;
    }
    
    .section-title {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 20px;
    }
    
    .half-width,
    .third-width {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control,
    .form-select {
        height: 46px;
        font-size: 15px;
        padding: 0 16px;
    }
    
    .date-input .form-control {
        padding-left: 42px;
    }
    
    .date-input i {
        left: 16px;
        font-size: 16px;
    }
    
    .radio-option {
        padding: 14px 16px;
    }
    
    .radio-custom {
        width: 22px;
        height: 22px;
    }
    
    .radio-option input[type='radio']:checked + .radio-custom::after {
        width: 12px;
        height: 12px;
    }
    
    .radio-text {
        font-size: 15px;
    }
    
    .checkbox-custom {
        width: 22px;
        height: 22px;
    }
    
    .checkbox-text {
        font-size: 15px;
    }
    
    .file-upload-area {
        padding: 28px;
        border-radius: 10px;
    }
    
    .upload-icon i {
        font-size: 28px;
        margin-bottom: 16px;
    }
    
    .upload-text p {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .upload-text span {
        font-size: 14px;
    }
    
    .form-actions {
        margin-top: 32px;
    }
    
    .btn-add {
        padding: 14px 32px;
        font-size: 15px;
        border-radius: 6px;
    }
}

/* Large Mobile - 576px to 767px */
@media (max-width: 767px) and (min-width: 576px) {
    .main-container {
        padding: 16px 8px;
    }
    
    .content-container {
        max-width: 100%;
        padding: 16px 0;
    }
    
    .page-title {
        font-size: 18px;
        margin-bottom: 24px;
        padding: 0 20px;
        text-align: center;
    }
    
    .form-section {
        width: 100%;
        max-width: 540px;
        margin: 0 auto 16px auto;
        padding: 20px;
        border-radius: 8px;
    }
    
    .section-title {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .half-width,
    .third-width {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-control,
    .form-select {
        height: 44px;
        font-size: 14px;
        padding: 0 14px;
        border-radius: 6px;
    }
    
    .date-input .form-control {
        padding-left: 40px;
        font-size: 13px;
    }
    
    .date-input i {
        left: 14px;
        font-size: 15px;
    }
    
    .radio-group {
        gap: 12px;
    }
    
    .radio-option {
        padding: 12px 14px;
        border-radius: 6px;
    }
    
    .radio-custom {
        width: 20px;
        height: 20px;
    }
    
    .radio-option input[type='radio']:checked + .radio-custom::after {
        width: 10px;
        height: 10px;
    }
    
    .radio-text {
        font-size: 14px;
    }
    
    .checkbox-label {
        gap: 10px;
        padding: 8px 0;
    }
    
    .checkbox-custom {
        width: 20px;
        height: 20px;
    }
    
    .checkbox-text {
        font-size: 14px;
    }
    
    .file-upload-area {
        padding: 20px 16px;
        border-radius: 8px;
    }
    
    .upload-icon {
        margin-bottom: 12px;
    }
    
    .upload-icon i {
        font-size: 24px;
    }
    
    .upload-text p {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .upload-text span {
        font-size: 13px;
    }
    
    .form-actions {
        margin-top: 24px;
        padding: 0 20px;
    }
    
    .btn-add {
        width: 100%;
        height: 46px;
        font-size: 14px;
        border-radius: 6px;
    }
}

/* Small Mobile - Less than 576px */
@media (max-width: 575px) {
    .main-container {
        padding: 12px 6px;
    }
    
    .content-container {
        max-width: 100%;
        padding: 12px 0;
    }
    
    .page-title {
        font-size: 16px;
        margin-bottom: 20px;
        padding: 0 16px;
        text-align: center;
    }
    
    .form-section {
        width: 100%;
        margin: 0 auto 12px auto;
        padding: 16px;
        border-radius: 6px;
    }
    
    .section-title {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .half-width,
    .third-width {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .form-control,
    .form-select {
        height: 42px;
        font-size: 13px;
        padding: 0 12px;
        border-radius: 4px;
    }
    
    .form-control::placeholder {
        font-size: 12px;
    }
    
    .date-input .form-control {
        padding-left: 36px;
        font-size: 12px;
    }
    
    .date-input i {
        left: 12px;
        font-size: 14px;
    }
    
    .select-arrow {
        left: 12px;
        font-size: 11px;
    }
    
    .radio-group {
        gap: 10px;
    }
    
    .radio-option {
        padding: 10px 12px;
        border-radius: 4px;
    }
    
    .radio-custom {
        width: 18px;
        height: 18px;
        border-width: 1.5px;
    }
    
    .radio-option input[type='radio']:checked + .radio-custom::after {
        width: 8px;
        height: 8px;
    }
    
    .radio-text {
        font-size: 13px;
    }
    
    .checkbox-label {
        gap: 8px;
        padding: 6px 0;
    }
    
    .checkbox-custom {
        width: 18px;
        height: 18px;
        border-width: 1.5px;
        border-radius: 4px;
    }
    
    .checkbox-input:checked + .checkbox-custom::after {
        font-size: 10px;
    }
    
    .checkbox-text {
        font-size: 13px;
    }
    
    .file-upload-area {
        padding: 16px 12px;
        border-radius: 6px;
    }
    
    .upload-icon {
        margin-bottom: 8px;
    }
    
    .upload-icon i {
        font-size: 20px;
    }
    
    .upload-text p {
        font-size: 13px;
        margin-bottom: 2px;
    }
    
    .upload-text span {
        font-size: 12px;
    }
    
    .form-actions {
        margin-top: 20px;
        padding: 0 16px;
    }
    
    .btn-add {
        width: 100%;
        height: 44px;
        font-size: 13px;
        border-radius: 4px;
    }
}

/* Extra Small Mobile - Less than 400px */
@media (max-width: 399px) {
    .main-container {
        padding: 8px 4px;
    }
    
    .page-title {
        font-size: 15px;
        margin-bottom: 16px;
        padding: 0 12px;
    }
    
    .form-section {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .section-title {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-group label {
        font-size: 11px;
        margin-bottom: 3px;
    }
    
    .form-control,
    .form-select {
        height: 40px;
        font-size: 12px;
        padding: 0 10px;
    }
    
    .date-input .form-control {
        padding-left: 32px;
        font-size: 11px;
    }
    
    .date-input i {
        left: 10px;
        font-size: 12px;
    }
    
    .radio-option {
        padding: 8px 10px;
    }
    
    .radio-custom {
        width: 16px;
        height: 16px;
    }
    
    .radio-option input[type='radio']:checked + .radio-custom::after {
        width: 6px;
        height: 6px;
    }
    
    .radio-text {
        font-size: 12px;
    }
    
    .checkbox-custom {
        width: 16px;
        height: 16px;
    }
    
    .checkbox-input:checked + .checkbox-custom::after {
        font-size: 8px;
    }
    
    .checkbox-text {
        font-size: 12px;
    }
    
    .file-upload-area {
        padding: 12px 8px;
    }
    
    .upload-icon i {
        font-size: 18px;
    }
    
    .upload-text p {
        font-size: 12px;
    }
    
    .upload-text span {
        font-size: 11px;
    }
    
    .form-actions {
        margin-top: 16px;
        padding: 0 12px;
    }
    
    .btn-add {
        height: 42px;
        font-size: 12px;
    }
}

/* Touch Device Optimizations */
@media (pointer: coarse) {
    .form-control,
    .form-select,
    .radio-option,
    .checkbox-label,
    .file-upload-area,
    .btn-add {
        min-height: 44px;
    }
    
    .radio-custom,
    .checkbox-custom {
        min-width: 22px;
        min-height: 22px;
    }
}

/* Landscape Orientation on Mobile */
@media (max-width: 991px) and (orientation: landscape) and (max-height: 500px) {
    .main-container {
        padding: 12px;
    }
    
    .content-container {
        padding: 12px 0;
    }
    
    .page-title {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .form-section {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .section-title {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-actions {
        margin-top: 16px;
    }
}
