/* ========== استایل کلی ========== */
.dsb-container {
    position: relative;
    display: inline-block;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* ========== دکمه ورود (dm-modal) ========== */
.dsb-login .dsb-login-btn,
.dsb-login .dm-anchor {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.dsb-login .dsb-login-btn:hover,
.dsb-login .dm-anchor:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ========== دکمه کاربر لاگین شده ==========*/ 
.dsb-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #374151;
}

.dsb-user-btn:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.dsb-avatar {
    display: flex;
    border-radius: 50%;
    overflow: hidden;
    width: 32px;
    height: 32px;
}

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

.dsb-user-icon {
    font-size: 20px;
}

.dsb-user-name {
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dsb-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    margin-right: auto;
}

.dsb-user-menu.active .dsb-arrow {
    transform: rotate(180deg);
}

/* ========== منوی کشویی ========== */
.dsb-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 280px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    margin-right:-79px;

}

.dsb-user-menu.active .dsb-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    
}


/* هدر منو */
.dsb-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
}

.dsb-header-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #667eea;
}

.dsb-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dsb-header-info {
    flex: 1;
    min-width: 0;
}

.dsb-header-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dsb-header-email {
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* لیست آیتم‌ها */
.dsb-menu-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.dsb-menu-list li {
    margin: 0;
}

.dsb-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    border-right: 3px solid transparent;
}

.dsb-menu-item:hover {
    background: #f9fafb;
    border-right-color: #667eea;
    padding-right: 20px;
}

.dsb-item-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.dsb-item-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.dsb-badge {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* خروج */
.dsb-menu-item.logout {
    color: #dc2626;
}

.dsb-menu-item.logout:hover {
    background: #fef2f2;
    border-right-color: #dc2626;
}


/* ========== Responsive ==========*/ 
@media (max-width: 768px) {
    .dsb-dropdown {
        min-width: 260px;
    }
    
    .dsb-user-name {
        display: none;
    }
}
