/* ============ MESSAGES DROPDOWN ============ */
.messages-dropdown {
    position: fixed;
    top: 80px;
    right: 32px;
    width: 380px;
    max-height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    overflow: hidden;
}

.messages-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.messages-dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.messages-dropdown-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.messages-dropdown-badge {
    background: #FF4053;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.messages-dropdown-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
    font-size: 14px;
}

.messages-dropdown-close:hover {
    background: #f0f0f0;
}

.messages-dropdown-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.messages-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.messages-dropdown-item:hover {
    background: #f8f8f8;
}

.messages-dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #04E061;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.messages-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.messages-dropdown-info {
    flex: 1;
    min-width: 0;
}

.messages-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.messages-dropdown-preview {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.messages-dropdown-unread {
    background: #FF4053;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    flex-shrink: 0;
}

.messages-dropdown-all {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #00AAFF;
    text-decoration: none;
    border-top: 1px solid #eee;
    margin-top: 4px;
}

.messages-dropdown-all:hover {
    background: #f8f8f8;
}

.messages-dropdown-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.messages-dropdown-empty i {
    font-size: 40px;
    opacity: 0.3;
    display: block;
    margin-bottom: 12px;
}

.messages-dropdown-empty p {
    margin: 0;
    font-size: 14px;
}

@media (max-width: 576px) {
    .messages-dropdown {
        right: 8px;
        left: 8px;
        width: auto;
        top: 60px;
    }
}