/* ==========================================
   PROFILE MODAL POLISH
========================================== */

#profileModal .modal-dialog {
    max-width: 540px;
}

#profileModal .modal-content {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    padding: 1.5rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

#profileModal .modal-header {
    border-bottom: none;
    padding: 0 0 1rem;
}

#profileModal .modal-title {
    color: #0b6f8f;
    font-weight: 800;
}

#profileModal .btn-close {
    box-shadow: none;
}

/* ==========================================
   AVATAR PREVIEW FIX
========================================== */

#profileModal .profile-avatar-preview,
#profileModal .profile-modal-avatar,
#profileModal #currentAvatar,
#profileModal #profileAvatarPreview,
#profileModal #avatarPreview {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 auto 0.75rem !important;
    padding: 4px;
    background: #ffffff;
    border: 3px solid #ffffff;
    box-shadow: 0 12px 30px rgba(11, 111, 143, 0.18);
}

#profileModal img {
    max-width: 100%;
}

/* ==========================================
   TEXT
========================================== */

#profileModal label {
    color: #2f3a4a;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

#profileModal .profile-section-title,
#profileModal h3,
#profileModal h4 {
    color: #0b6f8f;
    font-weight: 800;
}

#profileModal p,
#profileModal small {
    color: #5f6b7a;
}

/* ==========================================
   FORM CONTROLS
========================================== */

#profileModal .form-control,
#profileModal .form-select {
    border-radius: 14px;
    border: 1px solid rgba(11, 111, 143, 0.18);
    padding: 0.85rem 1rem;
}

#profileModal .form-control:focus,
#profileModal .form-select:focus {
    border-color: #f45b69;
    box-shadow: 0 0 0 0.18rem rgba(244, 91, 105, 0.18);
}

/* ==========================================
   EMAIL CHECKBOX
========================================== */

#profileModal .form-check {
    margin: 1rem 0;
}

#profileModal .form-check-input {
    cursor: pointer;
}

#profileModal .form-check-label {
    color: #5f6b7a;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
}

/* ==========================================
   PASSWORD FIELDS
========================================== */

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 3rem;
}

.profile-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    width: auto;
    height: auto;
    padding: 0;
}

.profile-password-toggle:hover {
    color: #0b6f8f;
}

/* ==========================================
   SAVE BUTTON
========================================== */

#profileModal .btn-primary,
#profileModal .save-profile-btn,
#profileModal button[type="submit"] {
    width: 100%;
    border: none !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #e94b5a, #ff6f81) !important;
    color: #ffffff !important;
    font-weight: 800;
    padding: 0.95rem 1.5rem;
    box-shadow: 0 14px 30px rgba(244, 91, 105, 0.28);
    transition: all 0.25s ease;
}

#profileModal .btn-primary:hover,
#profileModal .save-profile-btn:hover,
#profileModal button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(244, 91, 105, 0.34);
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 576px) {
    #profileModal .modal-dialog {
        margin: 0.75rem;
    }

    #profileModal .modal-content {
        padding: 1.2rem;
        border-radius: 20px;
    }

    #profileModal .profile-avatar-preview,
    #profileModal .profile-modal-avatar,
    #profileModal #currentAvatar,
    #profileModal #profileAvatarPreview,
    #profileModal #avatarPreview {
        width: 84px !important;
        height: 84px !important;
        max-width: 84px !important;
        max-height: 84px !important;
    }
}