.dr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    box-sizing: border-box;
}

.dr-modal {
    background: var(--paper);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 1.75rem;
    width: min(460px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

.dr-modal h4 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 800;
    color: var(--navy-text);
    -webkit-text-fill-color: var(--navy-text);
    background: none;
    border-bottom: none;
}

.dr-modal h4::after {
    display: none;
}

.dr-info {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin-bottom: 18px;
    line-height: 1.6;
}

.dr-modal .form-group {
    margin-bottom: 12px;
}

.dr-modal label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-text);
    margin-bottom: 5px;
}

.dr-modal .form-control {
    width: 100%;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 13.5px;
    color: var(--navy-text);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dr-modal .form-control:focus {
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.dr-modal textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* CV modal – download section */
.cv-modal-download {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.cv-modal-download .dr-info {
    margin: 0;
    font-weight: 600;
    color: #166534;
}

.cv-modal-download-btn {
    border-color: #16a34a !important;
    color: #16a34a !important;
    border-radius: 999px !important;
    padding: 8px 18px !important;
    font-size: 13.5px !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.cv-modal-download-btn:hover {
    background: rgba(22, 163, 74, 0.06) !important;
    border-color: #15803d !important;
    color: #15803d !important;
}

.cv-modal-divider {
    position: relative;
    text-align: center;
    margin: 0.25rem 0 1rem;
}

.cv-modal-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color, #e2e8f0);
}

.cv-modal-divider span {
    position: relative;
    background: var(--paper);
    padding: 0 0.75rem;
    font-size: 12px;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

[data-theme="dark"] .cv-modal-download {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
}

[data-theme="dark"] .cv-modal-download .dr-info {
    color: #86efac;
}

[data-theme="dark"] .cv-modal-divider span {
    background: var(--card-bg);
}

/* CV modal – mobile sizing */
@media (max-width: 600px) {
    #cv-request-modal .dr-modal {
        padding: 1.25rem 1rem;
        max-height: 88vh;
        width: min(400px, 95vw);
    }

    #cv-request-modal .dr-modal h4 {
        font-size: 16px;
        margin-bottom: 3px;
    }

    #cv-request-modal .dr-info {
        font-size: 12px;
        margin-bottom: 12px;
    }

    #cv-request-modal .form-group {
        margin-bottom: 8px;
    }

    #cv-request-modal .dr-modal label {
        font-size: 12px;
        margin-bottom: 3px;
    }

    #cv-request-modal .dr-modal .form-control {
        padding: 8px 10px;
        font-size: 13px;
    }

    #cv-request-modal .dr-modal textarea.form-control {
        min-height: 60px;
    }

    #cv-request-modal .cv-modal-download {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
        gap: 0.4rem;
    }

    #cv-request-modal .cv-modal-divider {
        margin: 0.15rem 0 0.75rem;
    }

    #cv-request-modal .cv-modal-divider span {
        font-size: 11px;
    }

    #cv-request-modal .dr-actions {
        margin-top: 10px;
        gap: 8px;
    }
}

.dr-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.dr-actions .btn {
    background: var(--blue);
    color: #fff;
    border-radius: 25px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid var(--blue);
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
}

.dr-actions .btn:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    color: #fff;
}

.dr-actions .btn-secondary {
    background: #f8fafc;
    color: var(--text-muted, #64748b);
    border: 1px solid var(--border-color, #e2e8f0);
}

.dr-actions .btn-secondary:hover {
    background: var(--border-color, #e2e8f0);
    filter: none;
    transform: none;
    color: var(--navy-text);
}

[dir="rtl"] .dr-actions {
    flex-direction: row-reverse;
}
