/* Modern User Menu & Profile Styling */

/* ============================================
   USER MENU CONTAINER
   ============================================ */

.usermenu {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
}

.usermenu a.login {
    margin-left: auto !important;
}

/* ============================================
   USER MENU MODAL
   ============================================ */

.usermenu-modal-userlinks {
    border-radius: 15px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
}

.usermenu-modal-userlinks .modal-header {
    background: linear-gradient(135deg, rgb(52, 152, 219) 0%, rgb(41, 128, 185) 100%) !important;
    border: none !important;
    padding: 30px !important;
    color: white !important;
}

.usermenu-modal-userlinks .modal-header h5 {
    color: white !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.usermenu-modal-userlinks .modal-header.show-avatar {
    padding: 40px 30px !important;
}

.usermenu-modal-userlinks .modal-body {
    padding: 0 !important;
    background: white !important;
}

.usermenu-modal-userlinks .modal-footer {
    border-top: 1px solid #e8e8e8 !important;
    padding: 20px 30px !important;
    background: #f8f9fa !important;
}

.usermenu-modal-tabs {
    display: flex !important;
    height: 500px !important;
}

.usermenu-modal-tabs .tabs-menu-link {
    width: 220px !important;
    background: #f8f9fa !important;
    border-right: 1px solid #e8e8e8 !important;
    overflow-y: auto !important;
    padding: 10px !important;
}

.usermenu-modal-tabs .tabs-menu-link a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 15px !important;
    color: rgb(52, 73, 94) !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    margin-bottom: 5px !important;
}

.usermenu-modal-tabs .tabs-menu-link a i {
    font-size: 1.1rem !important;
    color: rgb(52, 152, 219) !important;
    width: 20px !important;
    text-align: center !important;
}

.usermenu-modal-tabs .tabs-menu-link a:hover {
    background: rgba(52, 152, 219, 0.1) !important;
    color: rgb(52, 152, 219) !important;
    transform: translateX(5px) !important;
}

.usermenu-modal-tabs .tabs-menu-link a.active {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(41, 128, 185, 0.2) 100%) !important;
    color: rgb(52, 152, 219) !important;
    font-weight: 600 !important;
    border-left: 3px solid rgb(52, 152, 219) !important;
    padding-left: 12px !important;
}

.usermenu-modal-tabs-content {
    flex: 1 !important;
    overflow-y: auto !important;
    background: white !important;
    padding: 20px !important;
}

.usermenu-modal-tabs-content .user {
    text-align: center !important;
    margin-bottom: 30px !important;
    padding-bottom: 30px !important;
    border-bottom: 2px solid #e8e8e8 !important;
}

.usermenu-modal-tabs-content .user h2 {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: rgb(52, 73, 94) !important;
    margin-top: 15px !important;
}

.usermenu-modal-tabs-content-internal {
    padding: 20px !important;
}

/* ============================================
   USER MENU DROPDOWN
   ============================================ */

.dropdown-menu {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    padding: 0 !important;
    min-width: 320px !important;
    animation: slideDown 0.3s ease-out !important;
    backdrop-filter: blur(10px) !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

.dropdown-menu.show {
    display: block !important;
}

/* ============================================
   PROFILE HEADER
   ============================================ */

.dropdown-header {
    padding: 20px 20px !important;
    border-bottom: 1px solid #e8e8e8 !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    border-radius: 12px 12px 0 0 !important;
}

.user-profile-header {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

.user-avatar {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: 3px solid rgb(52, 152, 219) !important;
    object-fit: cover !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2) !important;
}

.user-info {
    flex: 1 !important;
}

.user-name {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: rgb(52, 73, 94) !important;
    margin: 0 !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.user-email {
    font-size: 0.85rem !important;
    color: #95a5a6 !important;
    margin: 0 !important;
    display: block !important;
}

/* ============================================
   MENU SECTIONS
   ============================================ */

.dropdown-menu .dropdown-divider {
    margin: 0 !important;
    border-top: 1px solid #e8e8e8 !important;
}

.menu-section {
    padding: 12px 0 !important;
}

.menu-section:first-child {
    padding-top: 0 !important;
}

.menu-section-title {
    padding: 10px 20px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #95a5a6 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 4px !important;
}

/* ============================================
   MENU ITEMS
   ============================================ */

.dropdown-item {
    padding: 12px 20px !important;
    color: rgb(52, 73, 94) !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    white-space: normal !important;
}

.dropdown-item i {
    font-size: 1.1rem !important;
    color: rgb(52, 152, 219) !important;
    width: 20px !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
}

.dropdown-item:hover {
    background: rgba(52, 152, 219, 0.08) !important;
    color: rgb(52, 152, 219) !important;
    padding-left: 24px !important;
}

.dropdown-item:hover i {
    color: rgb(41, 128, 185) !important;
}

.dropdown-item:active,
.dropdown-item:focus {
    background: rgba(52, 152, 219, 0.12) !important;
    color: rgb(52, 73, 94) !important;
}

/* ============================================
   SPECIAL MENU ITEMS
   ============================================ */

.dropdown-item.logout {
    color: #e74c3c !important;
    border-top: 1px solid #e8e8e8 !important;
    padding-top: 12px !important;
}

.dropdown-item.logout i {
    color: #e74c3c !important;
}

.dropdown-item.logout:hover {
    background: rgba(231, 76, 60, 0.08) !important;
    color: #c0392b !important;
}

.dropdown-item.logout:hover i {
    color: #c0392b !important;
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.user-profile-container {
    max-width: 900px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
}

.profile-header-section {
    background: linear-gradient(135deg, rgb(52, 152, 219) 0%, rgb(41, 128, 185) 100%) !important;
    border-radius: 15px !important;
    padding: 50px 40px !important;
    color: white !important;
    margin-bottom: 40px !important;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2) !important;
    text-align: center !important;
}

.profile-avatar-large {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    border: 5px solid white !important;
    object-fit: cover !important;
    margin: 0 auto 20px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

.profile-name-large {
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}

.profile-email-large {
    font-size: 1.1rem !important;
    opacity: 0.95 !important;
}

.profile-content {
    background: white !important;
    border-radius: 12px !important;
    padding: 40px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.profile-section {
    margin-bottom: 40px !important;
}

.profile-section:last-child {
    margin-bottom: 0 !important;
}

.profile-section-title {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: rgb(52, 73, 94) !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #e8e8e8 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.profile-section-title i {
    color: rgb(52, 152, 219) !important;
    font-size: 1.4rem !important;
}

.profile-field {
    margin-bottom: 20px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.profile-field:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.profile-field-label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #95a5a6 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 6px !important;
    display: block !important;
}

.profile-field-value {
    font-size: 1rem !important;
    color: rgb(52, 73, 94) !important;
    font-weight: 500 !important;
}

.profile-field-value a {
    color: rgb(52, 152, 219) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.profile-field-value a:hover {
    color: rgb(41, 128, 185) !important;
    text-decoration: underline !important;
}

/* ============================================
   BUTTON STYLES IN PROFILE
   ============================================ */

.profile-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 24px !important;
    background: linear-gradient(135deg, rgb(52, 152, 219) 0%, rgb(41, 128, 185) 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 0.95rem !important;
    margin-right: 10px !important;
    margin-bottom: 10px !important;
}

.profile-action-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3) !important;
}

.profile-action-btn i {
    font-size: 1.1rem !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 280px !important;
    }

    .dropdown-header {
        padding: 15px 15px !important;
    }

    .user-profile-header {
        gap: 12px !important;
    }

    .user-avatar {
        width: 50px !important;
        height: 50px !important;
    }

    .profile-header-section {
        padding: 30px 20px !important;
    }

    .profile-avatar-large {
        width: 100px !important;
        height: 100px !important;
    }

    .profile-name-large {
        font-size: 1.6rem !important;
    }

    .profile-content {
        padding: 25px !important;
    }

    .dropdown-item {
        padding: 10px 15px !important;
    }
}

/* ============================================
   DARK MODE
   ============================================ */

@media (prefers-color-scheme: dark) {
    [data-bs-theme=auto] {
        .dropdown-menu {
            background: rgba(40, 40, 40, 0.98) !important;
        }

        .dropdown-header {
            background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%) !important;
            border-bottom-color: #444 !important;
        }

        .dropdown-divider {
            border-top-color: #444 !important;
        }

        .dropdown-item {
            color: #ecf0f1 !important;
        }

        .dropdown-item:hover {
            background: rgba(52, 152, 219, 0.15) !important;
        }

        .user-name {
            color: #ecf0f1 !important;
        }

        .user-email,
        .menu-section-title {
            color: #bdc3c7 !important;
        }

        .profile-header-section {
            background: linear-gradient(135deg, rgb(52, 152, 219) 0%, rgb(41, 128, 185) 100%) !important;
        }

        .profile-content {
            background: #1a1a1a !important;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
        }

        .profile-section-title {
            color: #ecf0f1 !important;
            border-bottom-color: #444 !important;
        }

        .profile-field {
            border-bottom-color: #333 !important;
        }

        .profile-field-label {
            color: #bdc3c7 !important;
        }

        .profile-field-value {
            color: #ecf0f1 !important;
        }
    }
}

[data-bs-theme=dark] {
    .dropdown-menu {
        background: rgba(40, 40, 40, 0.98) !important;
    }

    .dropdown-header {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%) !important;
        border-bottom-color: #444 !important;
    }

    .dropdown-divider {
        border-top-color: #444 !important;
    }

    .dropdown-item {
        color: #ecf0f1 !important;
    }

    .dropdown-item:hover {
        background: rgba(52, 152, 219, 0.15) !important;
    }

    .user-name {
        color: #ecf0f1 !important;
    }

    .user-email,
    .menu-section-title {
        color: #bdc3c7 !important;
    }

    .profile-header-section {
        background: linear-gradient(135deg, rgb(52, 152, 219) 0%, rgb(41, 128, 185) 100%) !important;
    }

    .profile-content {
        background: #1a1a1a !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    }

    .profile-section-title {
        color: #ecf0f1 !important;
        border-bottom-color: #444 !important;
    }

    .profile-field {
        border-bottom-color: #333 !important;
    }

    .profile-field-label {
        color: #bdc3c7 !important;
    }

    .profile-field-value {
        color: #ecf0f1 !important;
    }
}
