/* =========================================================
   Complete Profile Modal - أنيق
   ========================================================= */
.cp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 41, .72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
}

.cp-overlay.show {
    display: flex;
    animation: cpOverlayIn .3s ease-out both;
}

@keyframes cpOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cp-modal {
    position: relative;
    width: min(720px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    background: linear-gradient(145deg, rgba(48,43,99,.97), rgba(15,12,41,.99));
    border: 1px solid rgba(240,147,251,.22);
    border-radius: 28px;
    box-shadow: 0 35px 100px rgba(0,0,0,.65), 0 0 60px rgba(245,87,108,.12);
    animation: cpModalIn .4s cubic-bezier(.16,1,.3,1) both;
}

@keyframes cpModalIn {
    from { opacity: 0; transform: translateY(24px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cp-modal::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(240,147,251,.18);
    filter: blur(70px);
    pointer-events: none;
}

.cp-modal::after {
    content: '';
    position: absolute;
    bottom: -140px; left: -100px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(245,87,108,.15);
    filter: blur(80px);
    pointer-events: none;
}

.cp-head {
    position: relative;
    z-index: 1;
    padding: 30px 32px 20px;
    text-align: center;
}

.cp-head .cp-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(240,147,251,.18), rgba(245,87,108,.16));
    border: 1px solid rgba(240,147,251,.25);
    color: #f093fb;
    font-size: 30px;
    box-shadow: 0 10px 35px rgba(0,0,0,.25);
}

.cp-head h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: .2px;
}

.cp-head p {
    margin: 0;
    color: rgba(255,255,255,.7);
    font-size: 14.5px;
    line-height: 1.9;
}

.cp-body {
    position: relative;
    z-index: 1;
    padding: 8px 32px 30px;
}

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

@media (max-width: 640px) {
    .cp-grid { grid-template-columns: 1fr; }
    .cp-head { padding: 24px 20px 16px; }
    .cp-body { padding: 6px 20px 24px; }
}

.cp-field {
    display: flex;
    flex-direction: column;
}

.cp-field label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255,255,255,.78);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
}

.cp-field input,
.cp-field select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,.06);
    border: 2px solid rgba(255,255,255,.1);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    outline: none;
    transition: all .25s ease;
    box-sizing: border-box;
}

.cp-field input:focus,
.cp-field select:focus {
    border-color: #f093fb;
    background: rgba(255,255,255,.1);
    box-shadow: 0 0 0 3px rgba(240,147,251,.15);
}

.cp-field input::placeholder {
    color: rgba(255,255,255,.3);
}

.cp-field select option {
    background: #24243e;
    color: #fff;
}

.cp-field input[readonly] {
    opacity: .7;
    cursor: not-allowed;
}

.cp-field .cp-err {
    display: none;
    margin-top: 5px;
    color: #fca5a5;
    font-size: 12px;
    font-weight: 600;
}

.cp-field.has-error .cp-err {
    display: block;
}

.cp-field.has-error input,
.cp-field.has-error select {
    border-color: #f5576c;
    background: rgba(245,87,108,.08);
}

.cp-full {
    grid-column: 1 / -1;
}

.cp-actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cp-btn {
    padding: 13px 28px;
    border-radius: 14px;
    border: none;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all .25s ease;
    letter-spacing: .3px;
}

.cp-btn-primary {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    box-shadow: 0 10px 32px rgba(245,87,108,.3);
}

.cp-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 42px rgba(245,87,108,.42);
}

.cp-btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.cp-message {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.7;
}

.cp-message.show {
    display: block;
}

.cp-message.error {
    background: rgba(245,87,108,.12);
    border: 1px solid rgba(245,87,108,.3);
    color: #fca5a5;
}

.cp-message.success {
    background: rgba(74,222,128,.12);
    border: 1px solid rgba(74,222,128,.3);
    color: #86efac;
}

.cp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cpSpin .7s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes cpSpin {
    to { transform: rotate(360deg); }
}

/* =========================================================
   Autocomplete Suggestions (Cities & Schools)
   ========================================================= */
.cp-suggest-wrap {
    position: relative;
}

.cp-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid rgba(37,99,235,.25);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15,23,42,.15);
    z-index: 50;
    display: none;
}

.cp-suggestions.show {
    display: block;
}

.cp-suggestions .cp-sugg-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}

.cp-suggestions .cp-sugg-item:last-child {
    border-bottom: none;
}

.cp-suggestions .cp-sugg-item:hover,
.cp-suggestions .cp-sugg-item.active {
    background: #eff6ff;
    color: #1d4ed8;
}

.cp-suggestions .cp-sugg-empty {
    padding: 10px 14px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}