.mfp-wrap {
    direction: rtl;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 10px;
}

.mfp-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px 36px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
}

.mfp-form-title {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 0.5px solid #e5e7eb;
}

.mfp-form-title h1 {
    font-size: 20px;
    font-weight: bold;
    color: #1e3a5f;
    margin: 0 !important;
}

.mfp-form-title .dfp-title-line {
    width: 40px;
    height: 2px;
    background: #2563eb;
    margin: 10px auto 0;
    border-radius: 2px;
}

.mfp-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e3a5f;
    border-right: 4px solid #2b326b;
    padding-right: 10px;
    margin: 24px 0 16px;
}

.mfp-section-title:first-child {
    margin-top: 0;
}

.mfp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mfp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.mfp-field label {
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
}

.mfp-field input[type="text"],
.mfp-field input[type="tel"],
.mfp-field input[type="number"],
.mfp-field select,
.mfp-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    appearance: none;
}

.mfp-field input:focus,
.mfp-field select:focus,
.mfp-field textarea:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

.mfp-field input.mfp-invalid,
.mfp-field select.mfp-invalid,
.mfp-field textarea.mfp-invalid {
    border-color: #ef4444;
    background: #fff5f5;
}

.mfp-field textarea {
    resize: vertical;
    min-height: 100px;
}

.mfp-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.17l3.71-3.94a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0L5.21 8.27a.75.75 0 0 1 .02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 18px;
    padding-left: 36px;
}

.req {
    color: #ef4444;
    margin-right: 2px;
}

.optional {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 400;
}

/* ── Error messages ── */
.mfp-error {
    display: none;
    font-size: 12px;
    color: #dc2626;
    padding: 3px 4px;
    min-height: 18px;
}

.mfp-error.visible {
    display: block;
}

/* ── Upload box ── */
.mfp-upload-box {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.mfp-upload-box:hover,
.mfp-upload-box.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.mfp-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100% !important;
    height: 100% !important;
    z-index: 2;
}

.mfp-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    pointer-events: none;
}

.mfp-upload-label svg {
    color: #3b82f6;
}

.mfp-upload-label span {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.mfp-upload-label small {
    font-size: 12px;
}

/* ── Button ── */
.mfp-actions {
    margin-top: 10px;
}

.mfp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    min-width: 150px;
}

.mfp-btn:hover:not(:disabled) {
    background: #1d4ed8;
}

.mfp-btn:active:not(:disabled) {
    transform: scale(.98);
}

.mfp-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* ── Spinner ── */
.spinner {
    width: 18px;
    height: 18px;
    animation: mfp-spin 1s linear infinite;
}

.spinner circle {
    stroke: #fff;
    stroke-linecap: round;
    stroke-dasharray: 80;
    stroke-dashoffset: 60;
}

@keyframes mfp-spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ── Result messages ── */
.mfp-message {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}

.mfp-message.success {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #166534;
}

.mfp-message.error {
    background: #fff5f5;
    border: 1.5px solid #fca5a5;
    color: #991b1b;
}

@media (max-width: 768px) {
    .mfp-row {
        grid-template-columns: 1fr;
    }

    .mfp-form {
        padding: 20px 18px;
    }

    .mfp-form-title h1 {
        font-size: 18px;
    }

    .mfp-field label {
        font-size: 12px;
    }

    .mfp-field input[type="text"], .mfp-field input[type="tel"], .mfp-field input[type="number"], .mfp-field select, .mfp-field textarea {
        font-size: 13px;
    }

    .mfp-btn {
        font-size: 14px;
    }
}
