/* ═════════════════════════════════════════════════════════════
   TOPBAR USER DROPDOWN - PREMIUM 2026 STYLE
   ═════════════════════════════════════════════════════════════ */

/* CONTAINER */
.user-profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

/* ═════════════════════════════════════════════════════════════
   TOGGLE BUTTON (Avatar + Name) 
   ═════════════════════════════════════════════════════════════ */

.user-profile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.user-profile-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.user-profile-toggle:active {
    transform: translateY(0);
}

/* Avatar in Toggle */
.user-profile-toggle .user-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(120, 181, 47, 0.5);
    object-fit: cover;
}

/* Name Text */
.user-profile-toggle .user-name {
    display: none;
    font-weight: 600;
    color: #ffffff;
}

/* Chevron Icon */
.user-profile-toggle i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.user-profile-toggle.active i {
    transform: rotate(180deg);
}

/* ═════════════════════════════════════════════════════════════
   DROPDOWN MENU - INITIALLY HIDDEN!
   ═════════════════════════════════════════════════════════════ */

.user-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    
    /* HIDDEN BY DEFAULT */
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    overflow: hidden;
}

/* SHOW ON ACTIVE */
.user-profile-menu.active {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ═════════════════════════════════════════════════════════════
   PROFILE MENU HEADER
   ═════════════════════════════════════════════════════════════ */

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f5ff 100%);
    border-bottom: 1px solid rgba(120, 181, 47, 0.1);
}

.profile-menu-avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: 3px solid #78B52F;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-menu-info {
    flex: 1;
}

.profile-menu-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.profile-menu-email {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═════════════════════════════════════════════════════════════
   DIVIDER
   ═════════════════════════════════════════════════════════════ */

.profile-menu-divider {
    height: 1px;
    background: rgba(120, 181, 47, 0.1);
}

/* ═════════════════════════════════════════════════════════════
   MENU ITEMS
   ═════════════════════════════════════════════════════════════ */

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.profile-menu-item:hover {
    background: rgba(120, 181, 47, 0.08);
    border-left-color: #78B52F;
    padding-left: 22px;
}

.profile-menu-item i {
    width: 20px;
    text-align: center;
    color: #78B52F;
    font-size: 1rem;
}

/* LOGOUT ITEM (Special) */
.profile-menu-item.logout-item {
    color: #dc3545;
}

.profile-menu-item.logout-item:hover {
    background: rgba(220, 53, 69, 0.08);
    border-left-color: #dc3545;
}

.profile-menu-item.logout-item i {
    color: #dc3545;
}

/* ═════════════════════════════════════════════════════════════
   RESPONSIVE
   ═════════════════════════════════════════════════════════════ */

/* Show name on desktop */
@media (min-width: 1200px) {
    .user-profile-toggle .user-name {
        display: inline;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .user-profile-toggle {
        padding: 6px 10px;
    }

    .user-profile-toggle .user-name {
        display: none !important;
    }

    .user-profile-menu {
        min-width: 250px;
        right: -50%;
        transform: translateY(-10px) translateX(50%);
    }

    .user-profile-menu.active {
        transform: translateY(0) translateX(50%);
    }
}

/* ═════════════════════════════════════════════════════════════
   ANIMATIONS
   ═════════════════════════════════════════════════════════════ */

@keyframes profileMenuBounce {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-profile-menu.active {
    animation: profileMenuBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
